ZenCoderZenCoder

CLI Reference

Every ZenCoder CLI command โ€” syntax, flags, and examples. Plus the full list of REPL slash commands you can use mid-session.

โ„น๏ธ
All commands talk to the local daemon at ZENCODER_ADDR (default: http://127.0.0.1:7777). Start zencoderd first.

Interactive REPL

Run zencoder with no arguments to enter the interactive REPL. It auto-selects the best available model (Anthropic, Ollama, or whatever you have configured), shows token usage after each response, and lets you switch models without restarting.

zencoder โ€” REPL chat
ZenCoder REPL chat session showing a live question answered by claude-haiku with token metrics

โ†‘ Real session: mode: auto ยท model: anthropic/claude-haiku-4-5-20251001. Response streams token-by-token. Token usage (โ†‘ sent ยท โ†“ received) and latency shown at the bottom of each reply.

REPL slash commands

Slash commands work in both chat and agent modes. They are only interpreted when typed at the start of an empty line โ€” mid-message content is never treated as a command.

๐Ÿ’ก
Two key commands to remember:
/model โ€” switch the AI model without leaving the session.
/mode agent โ€” unlock file editing; ZenCoder can now read and write files in your workspace.

/modelโ€” interactive model picker

Opens a scrollable TUI list of every model available to the daemon. Navigate with arrow keys or j / k, press Enter to switch. The current model is marked (current).

/model โ€” usagebash
> /model
# Opens interactive picker:
#   1  ollama/qwen2.5-coder:7b      (current)
#   2  ollama/llama3.2:3b
#   3  anthropic/claude-3-haiku-4-5  (cloud)
#   4  nvidia/meta/llama-3.1-405b    (cloud)
# โ†‘โ†“ or j/k to move ยท Enter to select ยท q to cancel

# Or switch directly:
> /model ollama/qwen2.5-coder:7b
Switched model to: ollama/qwen2.5-coder:7b

/mode agentโ€” enable file editing

Switches the current session from stateless chat to full Agent mode. In agent mode ZenCoder has six workspace tools: file_read, file_glob, workspace_search, list_directory, file_edit, and file_remove.

/mode agent โ€” editing filesbash
# Start in chat mode, then switch to agent mid-session
> /mode agent
Switching to agent mode...

> Add input validation to all POST handlers in internal/server/
[Agent] Reading: internal/server/server.go
[Agent] Reading: internal/server/handlers.go
[Agent] Proposing edit to internal/server/handlers.go
[Agent] Apply? (y/n): y
[Agent] โœ“ Edit applied

# Switch back to chat when done
> /mode chat
CommandWhat it doesAvailable in
/helpShow all available REPL commands
chatagent
/modelOpen the interactive model picker โ€” navigate with arrow keys, press Enter to switch
chatagent
/model <provider/name>Switch directly to a specific model without the picker
chatagent
/modelsAlias for /model โ€” opens the interactive picker
chatagent
/mode agentSwitch to Agent mode โ€” gives ZenCoder file read/write tools to edit files autonomously
chat
/mode chatSwitch back to Chat mode โ€” stateless, no file access
agent
/skillsList all available AI skill categories (code-review, refactor, debug, explain, โ€ฆ)
chatagent
/clearClear conversation history for this session โ€” starts fresh context
chatagent
/healthCheck daemon connectivity and currently active model
chatagent
/versionShow CLI and daemon version
chatagent
/quitExit the REPL
chatagent

Skills

ZenCoder auto-detects the right skill for each conversation. Use /skills in the REPL to list all available categories, or run zencoder skills from the terminal.

/skills โ€” in the REPLbash
> /skills
# Available skills:
#   code-review       Analyse code for bugs, style, performance
#   test-generation   Generate unit/integration tests
#   refactor          Restructure code without changing behaviour
#   debug             Diagnose and fix runtime errors
#   explain           Plain-English explanation of code
#   documentation     Generate docstrings and README sections
#   security-audit    Identify security vulnerabilities
#   architecture      High-level design and system diagrams
#   generate          Generate new code from a spec
โ„น๏ธ
Skills are auto-detected from your prompt. You can also pin one with the --skill flag on the CLI:zencoder chat --skill refactor "Clean up this function"

Next

VSCode Extension Guide