Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/landing/hanko.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function Hanko() {
})}
</dl>
<p className="mt-4 font-mono text-xs text-muted">
no official middleware brings a dependency along; otel wants @opentelemetry/api beside it
no official middleware brings a dependency along
</p>
<div className="mt-8 flex flex-wrap items-center gap-4 font-mono text-sm">
<Link
Expand Down
2 changes: 1 addition & 1 deletion components/landing/studio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function Studio() {
return (
<section id="studio" data-tone="studio" className="mx-auto w-full max-w-6xl px-5 py-24 sm:px-8">
<div ref={ref}>
<p className="font-mono text-sm text-hot">印 coming in 0.11 · inkan studio</p>
<p className="font-mono text-sm text-hot">印 new in 0.11 · inkan studio</p>
<h2 className="mt-3 max-w-3xl font-mono text-3xl font-extrabold leading-tight sm:text-4xl">Watch your app while it runs.</h2>
<p className="mt-4 max-w-2xl text-soft">
Open <code className="text-ink">/_inkan</code> while you develop. No account, no agent, nothing to install: the studio is a
Expand Down
66 changes: 66 additions & 0 deletions content/blog/inkan-0-11.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: "inkan studio, and a lock for the pages inkan serves"
description: "inkan 0.11 turns the inspector into a studio: live requests, every route with its numbers, a map, the MCP tools to call by hand and the jobs to cancel. And protect puts a password on /docs, /openapi.json and the studio."
date: "2026-11-13"
author: "Vensin"
release:
version: "0.11.0"
badge: "inkan studio, and protect for your docs"
---

An inkan app knows a lot about itself: every route, its contract, its examples, its tool
name, its jobs. Until now you saw most of that in the docs page, and the requests in the
inspector at `/_inkan`. In 0.11 the inspector grows into a studio.

## inkan studio

Start the app in development and open `/_inkan`. Five tabs:

- **live**: the requests as they come, with replay and copy as example as before, and above
them the last minute at a glance: requests, broken answers, p95 and the heap, each with a
sparkline.
- **routes**: every route with its calls, what broke, p50 and p95 since the studio opened,
sortable. The slowest route is one click away.
- **map**: the app as a tree of its paths, with the methods, the MCP tools and the routes
that ask for credentials.
- **mcp**: the tools from 0.10, each with a form to call it as a client would. With MCP off
it shows what it would serve.
- **jobs**: the queues, the next scheduled run, progress as it happens, a cancel button, and
the last jobs that ended with their results.

It is a page the app serves itself. No account, no agent, nothing to install, and nothing
on the request path in production: the numbers are only kept while the studio is on.

## protect

Someone asked me whether the docs page can be switched off, and whether it can have a
password. Switching off was always there (`docs: false`, `openapi: false`), but a password
was not, and could not be added from outside: the pages inkan serves itself are answered
before any hook runs, so an auth hook never sees them.

```ts
inkan({ protect: { user: "team", password: env("DOCS_PASSWORD") } });
```

`protect` puts HTTP Basic auth on `/docs`, `/openapi.json` and the studio, compared in
constant time, or takes a function that decides alone. With it the studio also answers
beyond your own machine, so it can run on a server, behind the password. Your routes and the
MCP endpoint keep their own `security`. The docs now have a page on
[what is open in production](/docs/deploy#what-is-open-in-production) and how to close it.

## About speed

The studio is off in production, and nothing it needs runs on the path of a request there.
The first bench said otherwise, by a little: 0.11 was behind 0.10 in all three runs. One
small thing had moved, a request that is not GET left the built-in pages a few comparisons
later than before. With that back as it was, on the same GitHub runner as always, inkan
scores 91.8 (plain `node:http` as 100), 0.10.0 90.9, Fastify 89.6, Hono 85.1 and Express
50.5, the median of three runs. The runs and every scenario are in
[the report](https://github.com/inkanjs/inkan/blob/main/bench/reports/0.11.0.md).

## Next

Both the studio and `protect` are experimental in 0.11. Tell me what you miss in the studio:
it is the part of inkan I most want to hear about from people who use it every day.

See you next time ✨
7 changes: 7 additions & 0 deletions content/docs/mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ inkan mcp src/app.ts -H "authorization: Bearer $TEA_TOKEN"
`-H` sends a header with every call, such as the token a route asks for. What the app logs
goes to stderr, so stdout carries only the protocol.

In Claude Code it is one line either way:

```sh
claude mcp add --transport http tea-shop http://localhost:3000/mcp
claude mcp add tea-shop -- npx inkan mcp src/app.ts
```

## Proven by check

```sh
Expand Down
12 changes: 10 additions & 2 deletions lib/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,17 @@ export const published = (): Post[] => all.filter((post) => !post.draft);
/** What the blog shows: the published posts, and the drafts too in a preview. */
export const posts = (): Post[] => (showDrafts ? all : published());

/** The newest published post that announces a release, for the badge on the landing page. */
const versionOf = (v: string) => v.split(".").map(Number);
const newer = (a: string, b: string) => {
const [x, y] = [versionOf(a), versionOf(b)];
for (let i = 0; i < 3; i++) if ((x[i] ?? 0) !== (y[i] ?? 0)) return (x[i] ?? 0) > (y[i] ?? 0);
return false;
};

/** The published post of the highest release, for the badge on the landing page; two posts on one day stay in order. */
export const latestRelease = () => {
const post = published().find((p) => p.release);
let post: Post | undefined;
for (const p of published()) if (p.release && (!post || newer(p.release.version, post.release!.version))) post = p;
return post?.release && { ...post.release, url: post.url };
};

Expand Down
Loading