Skip to content
nikcli
Docs
Documentation

CLI Debug

Low-level debugging utilities under packages/nikcli/src/cli/cmd/debug — for contributors and support, not everyday use.

When to use

The nikcli debug … tree exposes internal probes: resolved config, global paths, agent tool access, LSP round-trips, and ripgrep-backed file helpers. For install health and common fixes, prefer nikcli doctor (see CLI Reference).

debug config vs doctor

Use debug config when you need the full merged JSONC config and paths as the runtime sees them. Use doctor when you want guided checks (providers, MCP, disk, versions) without dumping raw internals.

Examples
bash
nikcli debug config
nikcli debug agent build
nikcli debug paths

Debug Commands

debug config Print resolved configuration.
debug scrap List known projects (Project.list()).
debug skill List skills discovered by the runtime.
debug agent <name> Inspect agent config and resolved tool access.
debug paths Print global path locations.
debug wait Sleep indefinitely (diagnostic).

LSP Debug

These commands call the same LSP stack documented on LSP. Use them when agent context_diagnostics or the lsp tool misbehaves for a given file.

debug lsp diagnostics <file> Fetch diagnostics via LSP.
debug lsp symbols <query> Search workspace symbols.
debug lsp document-symbols <uri> Document symbol listing.

File + RG

Not a substitute for agent tools

These mirror file/search behavior used by tools like read, glob, and grep, but return JSON for scripting. Agents should still use the public tool surface.

debug file read <path> Read file as JSON payload.
debug file status Show file status information.
debug file list <path> List directory contents.
debug file tree [dir] Tree listing via ripgrep.
debug rg search <pattern> Run ripgrep search.
debug rg files List files via ripgrep.
debug rg tree Print ripgrep tree view.

Snapshots

debug snapshot track Track current snapshot state.
debug snapshot patch <hash> View patch for snapshot hash.
debug snapshot diff <hash> View diff for snapshot hash.