# 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.

[

Start here

### 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.

Open reference →

](/docs/guides/plugins)[

Copy & paste

### Plugin recipes

Eight complete plugins that each do one thing — a custom tool, a permission policy, injected shell secrets, request redaction, a Slack notifier.

Open reference →

](/docs/guides/plugin-recipes)[

Advanced

### 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.

Open reference →

](/docs/guides/providers)

## Integrate nikcli

Your code runs outside and drives the agent over its API.

[

Quickstart

### 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.

Open reference →

](/docs/guides/api)[

Hands-on

### Tour with real output

Every request run against a real server, with the response that actually came back — including the two that surprise people.

Open reference →

](/docs/guides/api-tour)[

Event feed

### Streaming a response

Subscribe first, submit asynchronously, print deltas as they arrive, and stop on `session.idle`.

Open reference →

](/docs/guides/streaming)[

Capstone

### Building an interface

Everything a real client owes the user — streaming parts, permission prompts, questions, todos and reconnects — assembled into one working client.

Open reference →

](/docs/guides/custom-interface)[

PTY

### Driving terminals

Create a pseudo-terminal, attach over a websocket, report its size, and wire it to `xterm.js` in a browser.

Open reference →

](/docs/guides/terminals)

## Automate nikcli

Work that runs without you sitting in front of it.

[

Cadence

### Automating with loops

Staged, repeatable work with its own token budgets, worktree isolation and schedule — including a complete nightly QA loop.

Open reference →

](/docs/guides/loops)[

Graph

### Orchestrating missions

Milestones and features with real dependency graphs, validation gates, and the escape hatch that lets you edit one mid-run.

Open reference →

](/docs/guides/missions)[

Concurrency

### Parallel workspaces

Three branches at once, each in its own worktree or container, with sessions you can warp between them.

Open reference →

](/docs/guides/workspaces)[

Unattended

### 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.

Open reference →

](/docs/guides/ci)

## 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](/docs/build) |
| Every field of every endpoint | [API Reference](/docs/api) |
| How the server itself works | [Server & API](/docs/server-api) |
| How plugins are installed and configured | [Plugins & Skills](/docs/plugins) |

Every snippet here was checked against the real types

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.

## Related

-   [Build The three ways to build on nikcli, and which to pick.](/docs/build)
-   [API Reference Every endpoint, generated from the server contract.](/docs/api)
-   [Client The typed HTTP client these guides use.](/docs/build/client)
-   [Plugins & Skills Installing and configuring plugins.](/docs/plugins)

---

Source: https://nikcli-ai.dev/docs/guides
