AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
Nikcli — an open-source, provider-agnostic AI development agent with terminal-native control, LSP awareness, MCP integrations, and mobile-ready session orchestration.
Developer toolsTypeScript · HTMLGitHub @nikcliLatest connection check failedOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Loading the full README. The saved excerpt is shown below.
Nikcli is a fork of OpenCode — the open source coding agent. AI-powered development tool: CLI, TUI, server, web, mobile, bots.
Nikcli is a fork of OpenCode, the open source coding agent (the repo previously lived at sst/opencode — same project, same org). All credit for the original project goes to the OpenCode authors and its community — nikcli exists only because that work is open source, and every part of nikcli that came from OpenCode remains theirs.Read the full README ↗Nikcli is a fork of OpenCode — the open source coding agent. AI-powered development tool: CLI, TUI, server, web, mobile, bots.
Nikcli is a fork of OpenCode, the open source coding agent (the repo previously lived at sst/opencode — same project, same org). All credit for the original project goes to the OpenCode authors and its community — nikcli exists only because that work is open source, and every part of nikcli that came from OpenCode remains theirs.
This fork is maintained by nikomatt69. On top of the OpenCode base, nikcli adds new commands (goal, routine, mobile, ads, heap, locale, brain-model / image-model / speak-model, workspace-serve, …), ACP integration, the Loops/Goal/Routines system, mobile pairing with a dedicated Expo app, the web companion UI, multi-channel bots, the Session v2 engine, and Effect Schema throughout the HTTP contract.
Nikcli is not affiliated with, endorsed by, or supported by the OpenCode project. Please report nikcli issues here, not upstream. Full credits, history, and the original license live in the upstream repository: https://github.com/anomalyco/opencode.
[email protected]LICENSE, which retains the upstream OpenCode copyright.Reminder: nikcli is a fork of OpenCode. The architecture below — TUI, headless server, tool registry, session engine, plugin runtime — descends from OpenCode's design; credit for it belongs to the upstream project.
Nikcli is not just a CLI to chat with a model: it is a complete agentic platform that orchestrates models, tools, subagents and project context. Its main surfaces:
HttpApi and Bun.serve, with OpenAPI and a generated TypeScript/JavaScript SDK.run, goal, mission, agent, generate, github, pr, stats, export / import).nikcli web, nikcli companion serve).packages/mobile with QR pairing and nikcli:// deep links.nikcli plug install <mod>).nikcli acp).nikcli mission). Headless, server-side orchestrator.goal command. Manage them through the TUI or HTTP/SDK; the headless LoopEngine keeps firing on schedule when the TUI is closed.OTEL_EXPORTER_OTLP_ENDPOINT and NIKCLI_DISABLE_OTEL_LIVE).Everything is orchestrated by an internal event bus, a SQLite/Drizzle persistence layer, and a service architecture built with Effect (typed schema validation, dependency injection, layer composition).
The install script downloads release binaries from nikcli-ai.dev with GitHub releases as fallback (packages/web/install).
macOS / Linux
curl -fsSL https://nikcli-ai.dev/install | bash
nikcli
Windows (PowerShell 5.1+ or pwsh 7+ — curl | bash needs a bash to pipe into, so use this instead):
irm https://nikcli-ai.dev/install.ps1 | iex
nikcli
Any platform (npm, pnpm, yarn or bun):
npm i -g nikcli-ai@latest
The install location can be overridden with NIKCLI_INSTALL_DIR (or XDG_BIN_DIR); it defaults to
~/.nikcli/bin on every platform. The PowerShell installer also reads NIKCLI_VERSION to pin a version
and NIKCLI_NO_PATH=1 to leave the user PATH alone.
Alternative install methods handled by nikcli upgrade:
nikcli upgrade --method curl # standalone installer (install.ps1 on Windows)
nikcli upgrade --method npm # npm package
nikcli upgrade --method pnpm
nikcli upgrade --method bun
nikcli upgrade --method brew # macOS / Linux
Requirements: Node.js or Bun runtime, Git for most VCS flows,
ghCLI fornikcli prand some GitHub integrations.
bun install
bun run --cwd packages/nikcli --conditions=browser src/index.ts
Useful development scripts:
| Script | Description |
|---|---|
bun run dev | Start the nikcli CLI/TUI from source |
bun run typecheck | bun turbo typecheck across the whole workspace |
bun run build | Build all packages |
bun run web:dev | Dev server for the packages/web site |
bun run --cwd packages/nikcli generate:httpapi-clients | Regenerate clients after modifying the Effect HttpApi contract |
cd packages/nikcli && bun run bench | TUI bench (test/bench/viz.tsx) |
cd packages/nikcli && bun run sandbox:vercel | Vercel sandbox smoke test |
nikcli # opens the TUI in the current directory
nikcli run "..." # one-shot without TUI
nikcli quickstart # 60s walkthrough for first-time users
nikcli doctor # diagnostics: connectivity, config, providers
Connect an LLM provider:
nikcli auth login
# or select from the CLI/TUI with the dedicated dialog
Running nikcli with no arguments opens the TUI, which by default starts a local server in the background and connects to it via WebSocket/SSE. The TUI can also be attached to a remote instance:
nikcli serve --hostname 0.0.0.0 --port 4096
nikcli attach http://other-host:4096
Bun workspace with centralized version catalog (bunfig.toml, package.json).
| Package | Role |
|---|---|
packages/nikcli | Core CLI/TUI/server — main application (@nikcli-ai/cli, nikcli binary) |
packages/sdk | API SDK generated from OpenAPI (@nikcli-ai/sdk for JS, other languages in packages/sdk/*) |
packages/plugin | Plugin system and hooks contract (@nikcli-ai/plugin) |
packages/remote | Tunnels, QR pairing, web client for remote attach |
packages/companion | Companion UI and companion server routes |
packages/terminal-control | Terminal abstraction reused by CLI and IDE |
packages/mobile | Mobile Expo / React Native app with realtime SSE |
packages/app | Main web app (SolidStart) |
packages/web | Documentation site + installer + landing (nikcli-ai.dev) |
packages/desktop | Tauri desktop app |
packages/enterprise | Enterprise SSO / multi-tenant build |
packages/cloud | Cloudflare worker (KV, Durable Objects) |
packages/slack | Slack Bolt adapter and health check |
packages/script | Shared build/release scripts |
packages/util | Shared utilities (effect-zod, locale, log, retry, …) |
packages/llm | Additional AI SDK adapters (e.g. GitLab) |
packages/function | FaaS helpers and queue workers |
packages/inference · inference-dashboard | Inference telemetry and dashboard |
packages/console | Administration panel |
packages/webrenderer · tui-image | Experimental TUI renderers |
packages/http-recorder | HTTP recorder for test/replay |
Internal layout of the core (packages/nikcli/src):
account/ # account management with device code
acp/ # Agent Client Protocol (editor ↔ nikcli)
agent/ # agent system, prompts, generate, subagents
analytics/ # local/aggregated telemetry
auth/ # provider credentials (keychain, file, OAuth)
background/ # background jobs (e.g. TTS, embeddings)
brain/ # brain scheduler (background reasoning)
bus/ # typed global event bus (BusEvent)
chatbot/ # multi-channel bot (chat adapter)
cli/ # command tree, bootstrap, network, UI helpers
command/ # command service (named commands invokable by agents)
config/ # typed config (jsonc) + project config + TUI config
connectors/ # connector service + creds (Linear, GitHub, Slack, …)
database/ # drizzle ORM + migrations
db/ # users, KV, accounts
delegation/ # background subagent runs
effect/ # Effect runtime, layer helpers
file/ # file abstraction (read/write/patch/tree)
filesystem/ # fs helpers
flag/ # environment-variable flags (incl. OTEL/NIKCLI_*)
format/ # formatter (prettier, biome, oxc, …)
git/ # local git operations (status, diff, worktree)
global/ # global paths (~/.config/nikcli)
ide/ # editor integrations (VSCode, Cursor, Zed)
image/ # image tools
installation/ # version, install method, upgrade
interaction/ # user interactions (prompt, confirm, select)
locale/ # localization (language, region, timezone, currency)
loop/ # headless Loop engine (Scheduler + Goal composition)
lsp/ # LSP client for diagnostics and goto
mcp/ # Model Context Protocol (server + client)
mission/ # headless Mission orchestrator (milestones / features / validation)
mobile/ # mobile routines, auth, project detect
monitor/ # background command runner (persistent output)
observability/ # OpenTelemetry (OTLP) export + live telemetry panel
patch/ # unified patch engine
permission/ # permission system (rules, evaluate, ask)
plugin/ # plugin loader and contract
project/ # project, instance, VCS, bootstrap
prompt/ # prompt composition and variants
provider/ # provider registry, auth, transform, models
pty/ # pseudo-terminal reused by the bash tool and TUI
question/ # interactive questions
sandbox/ # sandbox runner (Vercel, Docker, local)
scheduler/ # cron-like scheduler (basis of Loops)
session/ # messages, compaction, revert, prompt, v2
share/ # public/enterprise session sharing
shell/ # shell detection
skill/ # skill discovery and execution
snapshot/ # heap/process snapshot
storage/ # abstract KV/storage
sync/ # workspace sync (projects ↔ server)
tool/ # tool registry (read, write, bash, webfetch, …)
util/ # utilities (log, id, locale, retry, error, …)
workspace/ # multi-project workspace + event server
worktree/ # git worktree management
All main commands (registered in packages/nikcli/src/cli-main.ts):
| Command | Purpose |
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------- | ------------------------------------ |
| nikcli | Default: opens the TUI. |
| nikcli run [message..] | Runs a one-shot prompt non-interactively; supports model variants, agent, session, fork, attachments. |
| nikcli goal [condition..] | Works autonomously until a verifiable condition holds (Goal engine with budget and persistent state). |
| nikcli mission | Headless Mission orchestrator: new, start, pause, resume, cancel, get, list. |
| nikcli routine | Create / list / get / run / pause / resume / delete routines (cron + API trigger). |
| nikcli generate | Prints the server OpenAPI spec with JS SDK samples. |
| nikcli acp | Starts an ACP (Agent Client Protocol) server for external editors. |
| nikcli mcp | Manage MCP servers: add, OAuth auth, list, status, debug. |
| nikcli tui (default) · nikcli attach <url> | Local TUI or attach to a remote server. |
| nikcli serve | Starts a headless Effect HttpApi server (HTTP + SSE + WebSocket) with OpenAPI. |
| nikcli web | Starts the server and opens the web UI in the browser. |
| nikcli workspace-serve | Starts the multi-workspace event server (proactive sync). |
| nikcli companion serve | Server with integrated companion UI (also accessible from mobile). |
| / | Remote control of the session (localtunnel / cloudflared / ngrok / remotosh tunnel, cloud relay). |
| | Mobile pairing: QR + deep link, host server for the device. |
| () | Starts a bot on Slack / Discord / Teams / Google Chat / Linear / GitHub. |
| | Provider credentials: login / logout / list / set / get / remove with device code. |
| | nikcli cloud account (login, logout, list, switch, orgs). |
| / | Generate (via LLM) or list custom agents. |
| | List models from , refresh cache, filter by provider. |
| · · | Configure brain, image-gen and TTS models. |
| | Set language/region/timezone/currency and the model reply language. |
| · · | Local metrics, session/project cost, configurable ads. |
| | Show process memory metrics (rss, heap, external, arrayBuffers). |
| | List and manage saved sessions (with pager). |
| | Export a session as JSON (info + messages + parts). |
| | Import a session from JSON or a share URL. |
| (via TUI) | Generate a public/enterprise URL for the session. |
| · | Install and manage a GitHub App for automations. |
| | Check out a PR and auto-start a review session. |
| () | Install and manage plugins (npm mod or local path) with config patching. |
| | Manage connectors (Linear, GitHub, Slack, Notion, …) with dedicated auth. |
| · · · | Onboarding, diagnostics, upgrade, uninstall. |
| | Generate shell completion scripts. |
| Global flags | , , , . |
--auto (aliases --yolo, --dangerously-skip-permissions) stops nikcli from pausing for
permission confirmations. Intended for unattended runs — CI, scripted sessions, sandboxed
worktrees — where there is nobody to answer a prompt.
It converts every ask into allow. It does not override anything you explicitly set to
deny: a denial is a rail you deliberately put in place, and a flag named "skip permissions"
should not quietly remove it. Combine the flag with permission denials in your config to run
unattended while keeping specific operations off-limits:
// nikcli.json
{ "permission": { "bash": { "rm *": "deny", "git push *": "deny" } } }
nikcli --auto run "migrate the config loader to zod v4"
The flag applies to the whole process, including the session worker the TUI runs in.
These environment variables configure the observability layer described in the Observability docs. They are read at process start and are not hot-reloadable.
| Variable | Default | Purpose |
|---|---|---|
OTEL_EXPORTER_OTLP_ENDPOINT | unset | OTLP/HTTP endpoint. Setting it enables export. |
OTEL_EXPORTER_OTLP_HEADERS | unset | Comma-separated key=value pairs (e.g. Authorization=Bearer%20…) |
OTEL_RESOURCE_ATTRIBUTES | unset | Comma-separated key=value pairs merged into every span resource. |
NIKCLI_DISABLE_OTEL_LIVE | false | Opt out of the in-process span capture (live panel). |
The TUI (packages/nikcli/src/cli/cmd/tui) runs in a dedicated worker (worker.ts) that talks to the server via RPC + SSE. It is built on @opentui/core and @opentui/solid (45 FPS renderer, mouse, kitty keyboard, copy-on-select) and on @solid-primitives/* for storage, event-bus and scheduling.
dialog-model, dialog-mcp, dialog-routine, dialog-status, dialog-usage, dialog-theme-list / create, dialog-settings, dialog-config, dialog-help, dialog-tour, dialog-support, dialog-command (command palette), dialog-agent, dialog-advisor-model, dialog-skills, dialog-session-list / warp / delete-failed / rename, dialog-workspace-list / create / file-changes / unavailable, dialog-variant (model effort selection), dialog-stash (prompt queue), dialog-tag, dialog-login, dialog-onboarding, dialog-auth-manage, dialog-chat (quick chat), dialog-analytics, dialog-web-preview, dialog-image-model, dialog-speak-model, dialog-status, dialog-telemetry-live (live OpenTelemetry spans), dialog-opentelemetry (OTLP configuration), dialog-remote (tunnel status), dialog-provider (provider picker), plugin-route-missing (fallback for missing plugin routes).
textarea-keybindings.ts), sounds (cli-sound).PermissionNext system with rules per tool, path, command; arity evaluation (1st, 2nd, 3rd degree); contextual TUI prompts.fuzzysort), warp (quick jump), delete-failed handling.util/sound).tui-image).feature-plugins/ (home, loops, sidebar, system) and runtime plugins that can mount new slots, routes, and keymaps.The TUI can run as a client to a remote server (nikcli attach), so the same interface can control sessions on a different machine (workstation ↔ cloud server, etc.).
The agent system (packages/nikcli/src/agent/) defines the LLM behavior, the exposed tools, the permissions and the mode (primary / subagent / all).
build — agent with full permissions (edit, bash, write, web, …), primary mode. Default agent for "build anything" use.plan — read-only agent: can analyze code, do research, but cannot modify files or perform side-effects. Primary mode.general — generic fallback.explore — code search and mapping (read-only).@fast-explore — ultra-fast variant for light navigation.@planner — produces structured action plans.@code-reviewer — cognitive PR/diff review.@debugger — failure/log analysis and fix hypotheses.@test-runner — test execution/analysis, case generation.@refactor — conservative refactoring.scout — external exploration (libraries, APIs).researcher — evidence-based research in the background.support — documentation agent, read-only.ultrareview-reviewer — parallel reviewer for ultrareview.delegator — batch delegation with supervisor session.
buildandplanare primary. Subagents are invoked by the primary via thetasktool or through thedelegation/delegatortools with supervised parallel execution.
nikcli agent create uses a meta-prompt (agent/generate.txt) to generate an agent from a description, picking the identifier, system prompt, enabled tools and mode. The resulting file is a Markdown with frontmatter saved to ~/.config/nikcli/agent/ or to the project's .nikcli/agent/. nikcli agent list shows the resolved list with the effective permissions.
primary — user entrypoint only.subagent — invokable only by other agents.all — both roles.The delegation and delegator tools let the primary agent start subagents in the background with a delegation_id and keep working; on completion, a supervisor session synthesizes the results. The task tool runs synchronous subagents.
Tools are registered in packages/nikcli/src/tool/:
| Tool | Purpose |
|---|---|
read · write · edit · multiedit · apply_patch | File I/O with unified diff and safe patch. |
ls · tree · glob · grep · codesearch | Search and listing. |
bash · monitor | Shell execution: bash for short commands, monitor for builds/tests/typecheck/dev servers with persistent logs and wake-on-finish. |
task · delegation · delegator | Subagent orchestration. |
todowrite · todoread · goal | Todo list and Goal engine management. |
webfetch · websearch | Content retrieval and web search. |
plan · plan-enter · plan-exit | Explicit plan mode (read-only enforcement). |
skill | Load and execute a declarative skill. |
apply_patch · batch | Multi-file patch. |
invalid | Fallback for malformed calls. |
context_collect · context_related · context_diagnostics · context_search | Context helpers (LSP, related, diagnostics). |
lsp | LSP operations (definitions, references, hover, symbols, completion, call hierarchy, implementations). |
question | Interactive multi-choice questions (UI). |
generate_image | Image generation (OpenRouter gpt-5-image, nano-banana-pro-2.5). |
speak (and providers elevenlabs, openrouter) | TTS voice synthesis played on the device. |
voice | Speech-to-text (OpenRouter transcription). |
Each tool has a description in tool/<name>.txt consulted by the primary agent for selection.
Skills (packages/nikcli/src/skill/) are Markdown + script packages (e.g. computer-use, orca-cli, effect, opentui, bun-file-io, orchestration, find-skills, emil-design-eng, …) that inject specialized instructions, hooks, and extra tools. They are dynamically loaded and filtered against the agent permissions. The skill tool lets the agent invoke them explicitly.
Nikcli ships four continuous-orchestration primitives:
session/goal.ts, nikcli goal command) — the agent works until a verifiable condition holds, with state active | paused | blocked | usage_limited | budget_limited | complete, token budget and iteration count (MAX_ITERATIONS = 50).loop/engine.ts + TUI feature-plugins/loops) — a loop is a named, persisted workflow that runs an ordered list of stages, each driven by a single goal command. Triggers are manual or interval (Scheduler with scope: "instance"). It keeps running even when the TUI is closed thanks to the server-side engine. The user defines objective + trigger + stop conditions once.mission/orchestrator.ts + TUI feature-plugins/mission) — a higher-altitude workflow that decomposes a goal into milestones, each holding a DAG of features, with a validation checkpoint at the end of every milestone (scrutiny, user-test, or none). The orchestrator drives one feature at a time as a goal command, then runs a validation worker before advancing.mobile/routine.ts, nikcli routine command) — workflows scheduled (cron) or triggerable via API/HTTP, with auth tokens. They expose nikcli procedures as endpoints.These primitives compose existing tools (
Scheduler, Goal,task,delegation): nothing is reinvented, only orchestrated.
Registry in packages/nikcli/src/provider/. Integrated AI SDK adapters: Anthropic, OpenAI, Azure OpenAI, Google, Google Vertex, AWS Bedrock, Groq, Mistral, Cohere, xAI (Grok), Cerebras, DeepInfra, Perplexity, Together AI, OpenRouter, Vercel AI Gateway, GitLab AI Provider, OpenAI-compatible. Custom adapters also included for GitHub Copilot, OpenAI Codex, Cloudflare AI, Cursor.
For each provider:
models.dev via provider/models.ts).provider/transform.ts).provider/auth.ts).Commands:
nikcli auth login
nikcli models # all models
nikcli models openai --verbose
nikcli brain-model # model for the "brain" (background reasoning)
nikcli image-model openrouter openai/gpt-5-image
nikcli speak-model elevenlabs YOq2y2Up4RgXP2HyXjE5
gpt-5-image (OpenAI), nano-banana-pro-2.5 (Google) — via OpenRouter.gpt-audio-mini).First-class MCP server with OAuth auth (packages/nikcli/src/mcp):
nikcli mcp add <name> <url-or-cmd>: adds a server.nikcli mcp auth <name>: dedicated OAuth flow.nikcli mcp list · status · debug.tool/registry.ts).mcp-exa).packages/nikcli/src/connectors/ manages third-party integrations with dedicated credentials and auth (GitHub, GitLab, Linear, Slack, Notion, Jira, …). Commands nikcli connectors (add, list, auth, status) with both CLI and TUI support. Each connector exposes an API reused by the agent tools.
session/ defines Session.Info, MessageV2, parts (text, tool-call, file, patch, image, subagent, …), compaction, revert/unrevert, fork, retry, summary, and a v2 engine (session/v2) rolling out. Storage is SQLite via Drizzle (session.sql.ts).
worktree/ manages managed and unmanaged git worktrees to isolate sessions per branch.
sandbox/ lets you run tools in isolated environments: Vercel Sandbox (@vercel/sandbox), Docker containers, local execution. Sessions can be associated with a sandbox for real isolation.
share/ and share-next.ts generate public/enterprise URLs to read sessions. nikcli export and nikcli import allow JSON serialization. The nikcli import command also accepts share URLs, normalizing enterprise hosts (nikcli-ai.dev, *.dev.nikcli-ai.dev).
background/ — long-running jobs with monitoring.brain/ — brain scheduler that produces background reasoning with a dedicated model (BRAIN_SESSION_TITLE), used by the TUI for titles/tips.permission/next.ts + evaluate.ts + schema.ts with rules per tool/agent/path/command, 3-tier evaluation (arity.ts). The TUI asks for confirmation contextually.
sync/ and workspace/ keep projects and sessions in sync on multi-workspace servers. nikcli serve and nikcli workspace-serve expose event servers; MCP and mobile clients consume via SSE.
packages/nikcli/src/server/server.ts owns the listener and request pipeline. The contract lives in src/server/httpapi/:
HttpApi groups plus raw handlers on Bun.serve. OpenAPI and the generated clients come from PublicApi.bun run generate:httpapi-clients writes @nikcli-ai/sdk/httpapi and the in-process Effect client. There is no Hono app and no hey-api step.EventFeed).server/mdns.ts) with bonjour-service for local discovery.server/proxy.ts) to route to container/sandbox instances.NIKCLI_SERVER_PASSWORD, NIKCLI_SERVER_TAILSCALE_AUTH to trust Tailscale headers on loopback.packages/web (Astro + Tailwind) — public site, install script, docs (hosted on Cloudflare Pages).packages/app (SolidStart) — full web application.packages/companion — companion UI and server routes for nikcli companion serve.packages/mobile (Expo / React Native) with realtime SSE, iOS and Android support (ios/, android/, eas.json).packages/mobile/README.md. Android ships a plain .apk; iOS ships an unsigned .ipa that you re-sign yourself with SideStore/Sideloadly, because the project has no Apple Developer Program membership.nikcli mobile shows a QR + deep link nikcli://connect?server=...&token=...&directory=....MobileAuth server-side (packages/nikcli/src/mobile/auth.ts) handles tokens, device id, scope.nikcli remote start opens a tunnel (localtunnel, cloudflared, ngrok, remotosh) or uses the cloud relay (--cloud) with bearer token.nikcli remote status shows tunnel state.packages/remote contains the web client and QR renderer (qrRenderer, tunnelProvider, cloudService).packages/terminal-control abstracts the terminal session across CLI, TUI and agents.packages/nikcli/src/chatbot/ orchestrates multi-platform bots thanks to @chat-adapter/*:
packages/slack, deployed on slack.nikcli-ai.dev via Wrangler).packages/discord, @nikcli-ai/discord) — native Gateway bot. In the TUI, /discord (alias /discord-setup) walks through the bot token, invite URL, and start/stop. HTTP: GET /discord, POST /discord/setup, /start, /stop.@chat-adapter/discord) — the Chat SDK adapter, managed with /bots.@chat-adapter/teams).@chat-adapter/gchat).@chat-adapter/github).@chat-adapter/linear).@chat-adapter/state-memory).Unified command:
nikcli chat # configure and start the Chat SDK bot
nikcli chatbot # alias
In the TUI, /discord sets up the Discord Gateway bot (token, invite, start). /bots manages Chat SDK webhook adapters.
Bot sessions are full nikcli sessions: prompt, tools, MCP, connectors, history.
packages/nikcli/src/plugin/ supports plugins that add:
mode + tools).tool/registry.ts).@nikcli-ai/plugin exports a hook system: auth, chat.headers, chat.params, tool.execute.before, tool.execute.after, experimental.session.compacting, experimental.text.complete, command.execute.before, …).Install:
nikcli plug install @nikcli-ai/plugin-foo
nikcli plug list
nikcli plug remove @nikcli-ai/plugin-foo
Preconfigured plugins (packages/plugin/plugins):
agent-memory · background · background-agents · context-analysis · direnv · dynamic-context-pruning · envsitter-guard · handoff · safety-net · smart-title.Skills (above) are a lighter format: just Markdown with a description and associated tools.
The TUI feature-plugins (feature-plugins/home, loops, sidebar, system) are declarative extension points to mount views/components without patching the core. The tui/plugin/ system provides api.tsx, runtime.ts, slots.tsx, keymap.ts, internal.ts.
Config resolution (in order of increasing priority):
/.well-known/nikcli for public OAuth providers.~/.config/nikcli/nikcli.jsonc (or nikcli.json, config.json).NIKCLI_CONFIG (path) or NIKCLI_CONFIG_CONTENT (string).nikcli.jsonc or nikcli.json walking up the directory tree.Schema published at: https://nikcli-ai.dev/config.json
Minimal example:
{
"$schema": "https://nikcli-ai.dev/config.json",
"theme": "nikcli",
"provider": {
"openai": { "options": { "apiKey": "sk-..." } },
},
"agent": {
"build": { "model": "anthropic/claude-sonnet-4.5" },
"plan": { "model": "anthropic/claude-haiku-4.5" },
},
"mcp": {
"exa": { "type": "remote", "url": "https://mcp.exa.ai/mcp" },
},
}
Useful sub-configs:
theme, keybinds, tui — TUI look/feel and behavior.provider.<id>.models — pin models per provider.agent.<name> — model, prompt, tools, permission.permission — global rules.mcp — MCP servers.connectors — connectors with creds.compaction, share, experimental — flags and limits.ads — custom ads/announcements for the TUI.locale — language/region/model reply language (it-IT, Europe/Rome, EUR, reply-language: "it").Recognized env flags (see flag/flag.ts): NIKCLI_SERVER_PASSWORD, NIKCLI_SERVER_TAILSCALE_AUTH, NIKCLI_OPENROUTER_API_KEY, NIKCLI_ELEVENLABS_API_KEY, NIKCLI_GIT_BASH_PATH, NIKCLI_LOG_LEVEL, etc.
specs/): start at specs/README.md and specs/ROADMAP.md for the Effect/TUI architecture program.CHANGELOG.md (v1.5.0 — Effect Schema migration, Feb 2026 milestone).Useful repository files:
AGENTS.md — conventions for coding agents.STYLE_GUIDE.md — code style (function-first, no let, avoid else, single-word naming, prefer Bun.*).CONTRIBUTING.md · SECURITY.md · DEPLOYMENT.md · SPEAK_SETUP.md · STATS.md.install — bash install script.Dockerfile · Dockerfile.serve — container images.sst.config.ts · fly.toml · railway.toml · wrangler.toml — deploy configs.Nikcli is a fork of OpenCode, the open source coding agent
(the repo previously lived at sst/opencode). The core architecture, the terminal-first
product idea, and a large share of the code in this repository originate there. Thanks to the OpenCode
authors, maintainers, and contributors for releasing it under a permissive license.
Nikcli is an independent fork, not affiliated with or endorsed by the OpenCode project. Any bug you hit in nikcli should be reported to this repository, never upstream.
MIT — see LICENSE. The license file retains the upstream OpenCode copyright alongside the
copyright for this fork's changes.
packages/containers | Container bundles for deploy |
homebrew-tap · infra · nix · script | Packaging and IaC |
nikcli remote startremote statusnikcli mobilenikcli chatchatbotnikcli authnikcli accountnikcli agent createagent listnikcli models [provider]models.devnikcli brain-modelimage-modelspeak-modelnikcli locale [show | set | reset]nikcli statsnikcli usagenikcli adsnikcli heapnikcli session listnikcli export [sessionID]nikcli import <file>nikcli sharenikcli github installnikcli github runnikcli pr <number>nikcli plugpluginnikcli connectorsnikcli quickstartnikcli doctornikcli upgradenikcli uninstallnikcli completion--print-logs--log-level DEBUG | INFO | WARN | ERROR--help/-h--version/-vmcp-exa| Preconfigured Exa MCP (search/extract). |
memory_search | Search across sessions/projects memory. |
repo_clone · repo_overview | Clone/overview external repos. |
search_tools | Tool discovery (including TUI plugin slots). |
external-directory | External path validation. |
exec_code | Controlled code execution (sandbox). |
truncation · truncation-dir | Output truncation to avoid context saturation. |
opentui · chart-braille-line | OpenTUI/chart render in-terminal. |
advisor | Background strategist for complex decisions. |