Installation
Install inkan, start an app, try the example.
npm install @vxnsin/inkanThe 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 learnIt 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 ownSix example projects, in reading order, each explained file by file:
hello | one route, one example, inkan check. Five minutes. |
tea-shop | CRUD with named schemas, problem(), groups and beforeEach |
auth | middleware, ctx.state, route-level use, a 401 and a 403 in the contract |
testing | app.check() and app.inject() in node:test, plus a CI workflow |
openapi | export the document, generate a client, keep both in sync |
deploy | Dockerfile, $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