Skip to content
Docs
Chat2DB CLI
Install and Status

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 | sh

Windows PowerShell:

iwr https://cdn.chat2db-ai.com/install/cli.ps1 -UseBasicParsing | iex

After installation, reopen the terminal and verify:

command -v chat2db
chat2db version --json

Example:

{"data":{"command":"version","version":"0.1.25"},"ok":true}

Check Current State

chat2db status --json

status checks Chat2DB Pro / Local App, CLI runtime, and MCP state. Important fields:

FieldMeaning
data.cli_versionCurrent CLI version
summary.pro.app.stateWhether the Pro app is running
summary.pro.cli.stateWhether the Pro CLI runtime is running
summary.pro.mcp.enabledWhether Pro MCP is enabled
summary.local.*Local edition state
next_actionRecommended next command
safe_to_exitWhether the edition can be safely exited

Common states:

StateMeaning
runningProcess or runtime is running
stoppedNot running
not_installedThe edition is not installed
aliveMCP endpoint is reachable
not_listeningMCP port is not listening
ambiguousState is not unique; inspect both editions before acting

Install Chat2DB Pro / Local

Install Pro, the default edition:

chat2db install --edition pro --json

Install Local:

chat2db install --edition local --json

Preview without downloading or writing files:

chat2db install --edition pro --dry-run --json

Run installation in the background:

chat2db install --edition all --background --json

See Update and Recovery for install logs.

Start and Stop the App

Open Pro:

chat2db start --edition pro --json

Stop Pro:

chat2db stop --edition pro --json

Stop 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 --json

If a db or sql command fails, start with:

chat2db status --json
chat2db runtime status --edition pro --json

Shell Completion

Install completion for the detected shell:

chat2db completions --install

Choose 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 chat2db

If 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 --json

State Is ambiguous

Inspect both editions:

chat2db status --json

To clean up Pro:

chat2db stop --edition pro --all --json