Guides
Eleven step-by-step walkthroughs, every snippet checked against the real types: build a plugin, register a provider, drive the API, stream a response, orchestrate missions, run in CI.
Extend nikcli
Your code runs inside the agent: new tools, new policy, new providers.
Writing a plugin
From an empty file to a loaded plugin with its own tool: the module shape, what the runtime hands you, every hook, and how to ship it on npm.
Plugin recipes
Eight complete plugins that each do one thing — a custom tool, a permission policy, injected shell secrets, request redaction, a Slack notifier.
Custom model providers
Register a provider, its API-key or OAuth flow, and its model list — including an internal gateway that will never be in the public catalogue.
Integrate nikcli
Your code runs outside and drives the agent over its API.
Using the API
Start a server and drive it, with curl and the SDK side by side: sessions,
prompts, files, search, shell commands and permission replies.
Tour with real output
Every request run against a real server, with the response that actually came back — including the two that surprise people.
Streaming a response
Subscribe first, submit asynchronously, print deltas as they arrive, and stop on
session.idle.
Building an interface
Everything a real client owes the user — streaming parts, permission prompts, questions, todos and reconnects — assembled into one working client.
Driving terminals
Create a pseudo-terminal, attach over a websocket, report its size, and wire it to
xterm.js in a browser.
Automate nikcli
Work that runs without you sitting in front of it.
Automating with loops
Staged, repeatable work with its own token budgets, worktree isolation and schedule — including a complete nightly QA loop.
Orchestrating missions
Milestones and features with real dependency graphs, validation gates, and the escape hatch that lets you edit one mid-run.
Parallel workspaces
Three branches at once, each in its own worktree or container, with sessions you can warp between them.
Running in CI
The GitHub Action and its inputs, plus a headless API path that works on any CI — with a review job that fails the build.
How these differ from the reference
A guide walks one task end to end and shows working code. The reference tells you what exists. When you know what you want to do but not how, start here; when you know the shape of the call and need the exact field, go to the reference.
| You want | Go to |
|---|---|
| To get something working | These guides |
| The three ways to build on nikcli, compared | Build |
| Every field of every endpoint | API Reference |
| How the server itself works | Server & API |
| How plugins are installed and configured | Plugins & Skills |
The call shapes in these guides are taken from the generated client and the OpenAPI document, not written from memory. Where an idiom does not typecheck, the guide says so.