CLI Guide
This page covers the shellman command line interface.
Install
bash
npm install -g shellmanQuick Start
Start local runtime:
bash
shellman serveStart local runtime and open browser automatically:
bash
shellman serve -oCommand Overview
Show help:
bash
shellman --helpServe runtime:
bash
shellman serve --helpRun DB migration:
bash
shellman migrate upserve Options
--host <value>local listen host--port <value>local listen port--open,-oopen browser after local server starts--config-dir <value>shellman config directory--tmux-socket <value>tmux socket path--webui-dist-dir <value>web ui dist directory--pid <value>pid file path for serve singleton
Common Usage Patterns
Run on all interfaces:
bash
shellman serve --host 0.0.0.0 --port 8000Use custom config directory:
bash
shellman serve --config-dir /path/to/configUse custom pid file:
bash
shellman serve --pid /tmp/shellman.pidUse custom tmux socket:
bash
shellman serve --tmux-socket /tmp/tmux-shellman.sockNotes
serveis singleton-protected by a pid file.- Default pid file path is inside your config directory.
- If another
serveinstance is running, startup will fail with a pid lock error.
AGENTS-SIDECAR Lookup Strategy
For task-completion AI context, Shellman resolves AGENTS-SIDECAR.md in this order:
- Repository-local file (highest priority):
<repo>/AGENTS-SIDECAR.md - Global fallback file:
~/.config/shellman/AGENTS-SIDECAR.md
If both exist, the repository-local file is used first.
Example AGENTS-SIDECAR.md
md
# AGENTS-SIDECAR
You are a **coordinator**.
Avoid doing concrete implementation work directly whenever possible.
Your primary responsibility is to:
- collect context from one Codex process,
- pass the right information to another Codex process,
- keep all processes aligned on the same task state.
## Role Boundaries
- Prefer coordination over execution.
- Delegate coding, script execution, and deep file operations to Codex agents.
- Communicate with Codex agents in natural language.
## Terminal Awareness (Critical)
Always watch the current terminal state before sending any input.
Never type blindly.
## Mode Switching
If you are in bash/zsh mode, run:
```bash
codex -s danger-full-access
```
to enter Codex mode.
## Tool Preference by Mode
- In **Codex mode**, prefer using `input_prompt`.
- In **shell mode**, prefer using `exec_command`.
## Status Message Rule
When setting `flag.status_message`:
- keep it within **50 characters**.