Install and Status
This page covers installing Chat2DB CLI, checking the current version, inspecting App/runtime/MCP state, and installing shell completion. Start every CLI workflow with version and status.
Install the CLI
macOS shell:
curl -fsSL https://cdn.chat2db-ai.com/install/cli.sh | shWindows PowerShell:
iwr https://cdn.chat2db-ai.com/install/cli.ps1 -UseBasicParsing | iexAfter installation, reopen the terminal and verify:
command -v chat2db
chat2db version --jsonExample:
{"data":{"command":"version","version":"0.1.25"},"ok":true}Check Current State
chat2db status --jsonstatus checks Chat2DB Pro / Local App, CLI runtime, and MCP state. Important fields:
| Field | Meaning |
|---|---|
data.cli_version | Current CLI version |
summary.pro.app.state | Whether the Pro app is running |
summary.pro.cli.state | Whether the Pro CLI runtime is running |
summary.pro.mcp.enabled | Whether Pro MCP is enabled |
summary.local.* | Local edition state |
next_action | Recommended next command |
safe_to_exit | Whether the edition can be safely exited |
Common states:
| State | Meaning |
|---|---|
running | Process or runtime is running |
stopped | Not running |
not_installed | The edition is not installed |
alive | MCP endpoint is reachable |
not_listening | MCP port is not listening |
ambiguous | State is not unique; inspect both editions before acting |
Install Chat2DB Pro / Local
Install Pro, the default edition:
chat2db install --edition pro --jsonInstall Local:
chat2db install --edition local --jsonPreview without downloading or writing files:
chat2db install --edition pro --dry-run --jsonRun installation in the background:
chat2db install --edition all --background --jsonSee Update and Recovery for install logs.
Start and Stop the App
Open Pro:
chat2db start --edition pro --jsonStop Pro:
chat2db stop --edition pro --jsonStop the Pro App, CLI runtime, and MCP:
chat2db stop --edition pro --all --json--all changes local state and is useful when cleaning up stuck processes or preparing to exit.
CLI Runtime
runtime is the local headless runtime used by datasource and SQL commands. It listens on 127.0.0.1 and is usually started automatically by db / sql commands.
chat2db runtime status --edition pro --json
chat2db runtime start --edition pro --json
chat2db runtime stop --edition pro --jsonIf a db or sql command fails, start with:
chat2db status --json
chat2db runtime status --edition pro --jsonShell Completion
Install completion for the detected shell:
chat2db completions --installChoose a shell explicitly:
chat2db completions --shell zsh
chat2db completions --shell bash
chat2db completions --install --shell fish--install writes to local shell configuration or completion directories. Omit --install if you only want to print the script.
Troubleshooting
chat2db Is Not Found
Reopen the terminal, then check whether the binary is on PATH:
command -v chat2dbIf it is still missing, run the CLI installer again.
App Is Not Installed
If status reports not_installed, install the edition:
chat2db install --edition pro --jsonState Is ambiguous
Inspect both editions:
chat2db status --jsonTo clean up Pro:
chat2db stop --edition pro --all --json