inkan

Installation

Install inkan, start an app, try the example.

npm install @vxnsin/inkan

The package is scoped because npm keeps the plain name inkan free of look-alikes. The command it installs is inkan either way.

Node 22 or newer. On Node 22.18 and newer, .ts files run as they are, with no build step and no loader.

New here? Start with the tutorial. It runs in your terminal, offline:

npx @vxnsin/inkan learn

It sets up a small tea shop and gives you twelve quests, one idea each: a first route, typed params, rules for a body, examples as tests, problems, groups, security, hooks, the docs page, changes that break clients, the seal and plugins. inkan checks your work every time you save, says what is still missing, and gives a hint (then a clearer one) when you press h. It keeps your progress, so npx @vxnsin/inkan learn again goes on where you stopped.

Try the example

npx @vxnsin/inkan examples         # pick one, and it lands in a folder of its own

Six example projects, in reading order, each explained file by file:

helloone route, one example, inkan check. Five minutes.
tea-shopCRUD with named schemas, problem(), groups and beforeEach
authmiddleware, ctx.state, route-level use, a 401 and a 403 in the contract
testingapp.check() and app.inject() in node:test, plus a CI workflow
openapiexport the document, generate a client, keep both in sync
deployDockerfile, $PORT, JSON logs, graceful shutdown, warden

Every one has a README that says what to read in which order, something to change first, and a list of ways to break it on purpose to see what inkan catches.

Or the one in this repo:

git clone https://github.com/inkanjs/inkan && cd inkan && npm install
node examples/shop.ts              # then open http://localhost:3000/docs
node src/cli.ts check examples/shop.ts

On this page