CachyCLI
Guide13 / CLI reference
Guide · 13

CLI reference

The complete list. Run cachycli --help for the same thing in your terminal.

Common examples

$ cachycli                              open the interface here
$ cachycli "fix the failing test"        open with a first request
$ cachycli -p "review this diff"         answer once and exit
$ cachycli -c                            continue the last session
$ cachycli --provider opencode           use your opencode
$ cachycli --provider claude-code        use Claude Code
$ cachycli agent stdio                   let an editor connect

Flags

FlagWhat it does
-p, --single <PROMPT>Ask one question and exit
-m, --model <MODEL>Use a specific model
-r, --resume [<ID_OR_TITLE>]Resume a session
-c, --continueContinue the most recent session
-s, --session-id <ID>Keep a named session for scripts
-w, --worktree [<NAME>]Work in a new git worktree
--backend <NAME>opencode, native or acp
--opencode-url <URL>Use a running opencode server
--acp-command <CMD>The agent command to connect to
--output-format <FMT>plain, json or streaming formats
--always-approveApprove tools without asking
--permission-mode <MODE>How much the agent may do unattended
--allow / --deny <RULE>Allow or block specific actions
--tools / --disallowed-toolsLimit which tools exist
--max-turns <N>Stop after N turns
--rules <TEXT>Add your own instructions

Subcommands

CommandWhat it does
cachycli agent stdioLet an editor connect to CachyCLI
cachycli mcpManage, test and serve tool servers
cachycli modelsList available models
cachycli sessionsList, search, restore or delete sessions
cachycli exportSave a conversation as Markdown
cachycli inspectShow what was found for this folder
cachycli doctorCheck your setup
cachycli memoryManage saved notes
cachycli completionsShell tab-completion for bash, zsh, fish, PowerShell
cachycli updateCheck for or install updates
cachycli usageShow tokens for a session
cachycli duShow how much disk CachyCLI uses
cachycli worktreeManage git worktrees
cachycli login / logoutStore or remove a key
cachycli dashboardOpen the sessions view

Output formats

FormatShape
plainJust the answer, for humans
jsonOne object at the end — text, session id, stop reason
streaming-jsonOne line per event as it happens
streaming-messages-jsonThe same stream in the widely used messages format
$ cachycli -p "list the TODOs" --output-format json | jq -r .text