CLI and terminal reference
Commands, installation channels, environment variables, PATH, shortcuts, fullscreen, voice, deep links, and caching.
This combines CLI, setup, environment, terminal, keybinding, fullscreen, voice, and deep-link references. For installation/login failures, start with Troubleshooting.
#Common CLI commands
| Command | Purpose | Cache effect |
|---|---|---|
| claude | Interactive session | New or directory-associated history |
| claude "task" | Interactive with initial prompt | First message |
| claude -p "query" | Print result and exit | Often a new prefix |
| cat file piped to claude -p | Process stdin | Input enters context |
| claude -c | Continue latest session | More likely reuse |
| claude -r session | Resume selected session | Its history |
| claude update | Update version | No request directly |
| claude install stable | Install/reinstall native binary | No request directly |
| claude auth login | Official authentication | Changes account/provider context |
| claude auth status | Inspect auth | No model call |
| claude agents | Agent View | Local session management |
| claude mcp login name | MCP OAuth | Tool changes can affect prefix |
| claude plugin | Plugin management | Extensions can affect prefix |
| claude remote-control | Remote-control server | Local session continues |
| claude doctor | Diagnostics | Low impact |
Minimal Passion8 test:
ANTHROPIC_BASE_URL="https://passion8.cc" \
ANTHROPIC_AUTH_TOKEN="sk-YOUR_PASSION8_API_KEY" \
claude -p "Reply with ping in one sentence"#Installation and versions
| Channel | Suitable for |
|---|---|
| Native installer | Most local users |
| Homebrew/apt/dnf/apk | Package-managed machines |
| npm | Legacy or Node-based deployments |
| Pinned version | Enterprise stability/rollback |
| Minimum-version policy | Administrator requirements |
| Disable updates | Strictly managed environments |
| Windows choice | Use |
|---|---|
| Native | Windows-native projects |
| WSL2 | Linux tooling, sandboxing, servers |
| WSL1 | Only when WSL2 unavailable and supported |
Verify:
claude --version
claude doctor
claude auth status --text#Environment variables
| Variable | Purpose |
|---|---|
| ANTHROPIC_BASE_URL | Passion8 root https://passion8.cc |
| ANTHROPIC_AUTH_TOKEN | Bearer credential |
| ANTHROPIC_API_KEY | API-key authentication |
| HTTPS_PROXY / HTTP_PROXY | Corporate proxy |
| NO_PROXY | Proxy exceptions |
| NODE_EXTRA_CA_CERTS | Additional CA |
| CLAUDE_CODE_CLIENT_CERT | mTLS client certificate |
| CLAUDE_CODE_CLIENT_KEY | mTLS private key |
| CLAUDE_CONFIG_DIR | Configuration/transcript/state root |
| CLAUDE_CODE_DISABLE_AUTO_MEMORY | Disable automatic memory |
| ENABLE_PROMPT_CACHING_1H | Optional one-hour TTL |
| ENABLE_TOOL_SEARCH | MCP tool discovery behavior |
| CLAUDE_CODE_ENABLE_TELEMETRY | Telemetry |
User settings env is suitable for persistent personal configuration. Never put personal keys into shared project files.
#Shortcuts and input
| Feature | Default/recommendation |
|---|---|
| Newline | Shift+Enter, or backslash then Enter |
| Vim mode | Enable interactive Vim bindings |
| Option/Alt | May need terminal configuration on macOS |
| Bell | Notification hook |
| tmux | Check shell integration, copy mode, colors |
| Theme | /theme or custom theme |
If Shift+Enter fails:
/terminal-setupSome terminals, including certain embedded IDE terminals, require alternate bindings.
#Fullscreen rendering
| Capability | Shortcut |
|---|---|
| Transcript mode | Ctrl+o |
| Search | / |
| Next/previous hit | n / N |
| Scroll | j/k or arrows |
| Half page | Ctrl+u / Ctrl+d |
| Exit | Esc or q |
Native selection can remain useful; with tmux also consider its own copy mode.
#Voice dictation
| Command | Behavior |
|---|---|
| /voice | Toggle |
| /voice hold | Hold to record |
| /voice tap | Tap to start, tap to send |
| /voice off | Disable |
| Issue | Action |
|---|---|
| No microphone permission | Grant terminal/IDE access in system settings |
| Poor language recognition | Adjust dictation language |
| Shortcut conflict | Rebind the key |
| SSH/container unavailable | Handle input in the local terminal |
Feature eligibility still depends on the account/provider.
#Deep links
Use claude-cli:// links from runbooks, alerts, dashboards, or internal portals.
| Parameter | Purpose |
|---|---|
| q | URL-encoded prompt, approximately 5,000-character limit |
| cwd | Absolute working directory |
| repo | GitHub owner/name matched to a known local clone |
claude-cli://open?q=Investigate%20the%205xx%20rate&repo=acme/web-gatewayDo not put secrets in links. Read sensitive data through appropriate local tools/storage.
#PATH and conflicts
| Symptom | Action |
|---|---|
| Command not found | Check PATH and restart shell |
| PowerShell cannot find claude | Add installation directory |
| Multiple binaries | which -a claude or where.exe claude |
| Desktop changes CLI selection | Check PATH ordering |
| WSL exec format error | Avoid invoking the Windows binary as Linux |
#Cache strategy
| Action | Effect |
|---|---|
| One-off print task | Usually new history, possibly reusable stable prefix |
| Continue | Recent history more likely warm |
| Resume | Depends on history and TTL |
| Change environment/model/provider | Can change prefix or namespace |
| Toggle MCP/plugins | Tool schemas can invalidate |
| Terminal/theme/voice settings | Usually little direct model-cache impact |
Ordinary API/provider defaults use five-minute TTL unless overridden. For repeated large-context work within an hour, consider supported one-hour caching:
export ENABLE_PROMPT_CACHING_1H=1#Official references
Support
Need help?
For setup, billing, or model issues, email us. Check the status page for uptime.
WeChat / QQ support is available at the bottom right.

