Documentation
Architecture
High-level architecture derived from Instance, Session, Server, and Tool layers.
Runtime Flow
The CLI initializes the Instance context, bootstraps subsystems (plugins, LSP, file watchers), then executes commands through the session engine. Server mode exposes the same runtime via Hono.
Instance Bootstrap
Instance bootstrap is defined in packages/nikcli/src/project/bootstrap.ts and
initializes plugins, share, formatters, LSP, file watchers, VCS, snapshots, and truncation.
Core Modules
State
Session
Session storage, messages, tool parts, and sharing in src/session.
API
Server
HTTP + SSE API surface in src/server and src/server/routes.
Execution
Tools
Tool definitions and registry in src/tool.
Models
Providers
Model loading, auth, and SDK adapters in src/provider.