# kitsas-addon-library

> Library for Kitsas Addons

Latest version **0.3.3** (published 2026-03-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install kitsas-addon-library
pnpm add kitsas-addon-library
yarn add kitsas-addon-library
bun add kitsas-addon-library
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.3.3 |
| Published | 2026-03-06 |
| First published | 2024-02-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 10 |
| Unpacked size | 111.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Kitsas Oy |
| Maintainers | kitsasoy-arto |
| Keywords | typescript, library, kitsas |

## Links

- npm: https://www.npmjs.com/package/kitsas-addon-library
- Repository: https://github.com/Kitsas-Oy/kitsasaddonlibrary
- Homepage: https://github.com/Kitsas-Oy/kitsasaddonlibrary#readme
- Issues: https://github.com/Kitsas-Oy/kitsasaddonlibrary/issues
- npm.io page: https://npm.io/package/kitsas-addon-library

## Dependencies (10)

- [pug](https://npm.io/package/pug.md) ^3.0.2
- [redis](https://npm.io/package/redis.md) ^4.7.0
- [dotenv](https://npm.io/package/dotenv.md) ^16.4.5
- [morgan](https://npm.io/package/morgan.md) ^1.10.0
- [express](https://npm.io/package/express.md) ^4.18.2
- [connect-redis](https://npm.io/package/connect-redis.md) ^7.1.1
- [@types/express](https://npm.io/package/@types/express.md) ^4.17.21
- [kitsas-library](https://npm.io/package/kitsas-library.md) ^0.1.56
- [express-session](https://npm.io/package/express-session.md) ^1.18.0
- [@types/express-session](https://npm.io/package/@types/express-session.md) ^1.18.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.3.3 (latest) — 2026-03-06
- 0.3.2 — 2026-03-06
- 0.3.1 — 2024-10-04
- 0.3.0 — 2024-09-30
- 0.2.0 — 2024-09-18
- 0.1.0 — 2024-09-17
- 0.0.37 — 2024-09-17
- 0.0.36 — 2024-09-17
- 0.0.35 — 2024-09-16
- 0.0.34 — 2024-09-16
- 0.0.33 — 2024-09-16
- 0.0.32 — 2024-09-13
- 0.0.31 — 2024-09-13
- 0.0.30 — 2024-09-13
- 0.0.29 — 2024-09-13
- … 28 more at https://npm.io/package/kitsas-addon-library/versions

## README

# Kitsas Addon Library

Library for Kitsas Addons. See also [Template for Kitsas Addons](https://github.com/Kitsas-Oy/kitsas-addon-template) and [Kitsas Library](https://github.com/Kitsas-Oy/kitsaslibrary)

[Documentation on GitHub Pages](https://kitsas-oy.github.io/kitsasaddonlibrary/)

## Installation

```bash
npm install --save kitsas-addon-library
```

## Creating an addon

#### Create an addon instance

```typescript
import { KitsasAddon } from 'kitsas-addon-library';
const addon = new KitsasAddon({
  appName: 'My Addon',
});

export default addon;
```

Options can be configured with [AddonOptions](https://kitsas-oy.github.io/kitsasaddonlibrary/interfaces/AddonOptions.html) or environment variables.

#### Create routers

```typescript
import addon from './addon';
import { AddonCall } from 'kitsas-addon-library';
import { Request, Response } from 'express';
const router = addon.createRouter('/addon');

router.get('/', async (req: Request, res: Response) => {
  const call = new AddonCall(req);
  const logs = await call.getLogs();

  if (call.isActive()) {
    res.render('main', { logs: logs });
  } else {
    res.render('introduction');
  }
});

export default router;
```

Usually router handles get an [AddonCall](https://kitsas-oy.github.io/kitsasaddonlibrary/classes/AddonCall.html) object containing information about the call and methods to interact with the Kitsas Server.

#### Create index.ts

```typescript
import addon from './addon';

import addonRouter from './addonRouter';

void addon.start([addonRouter]);
```

Remember to include all the routers in the `start` call!

---
_Source: https://npm.io/package/kitsas-addon-library · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
