Skip to content
Docs
Chat2DB CLI
Update and Recovery

Update and Recovery

This page covers CLI updates, uninstall flows, install logs, and common recovery commands. Before updating or uninstalling, run:

chat2db version --json
chat2db status --json

Update the CLI

Update the current CLI from the official CDN:

chat2db update --json

Update a target path:

chat2db update --target ~/.local/bin/chat2db --json

Verify afterward:

chat2db version --json

Uninstall the CLI

Remove the current CLI binary:

chat2db uninstall --cli --yes

Preview without removing files:

chat2db uninstall --cli --dry-run --json

Uninstall Chat2DB Pro / Local

Uninstall Pro:

chat2db uninstall --edition pro --yes --json

Uninstall Local:

chat2db uninstall --edition local --yes --json

Preview uninstalling both editions:

chat2db uninstall --edition all --dry-run --json

Uninstall commands verify app identity and preserve user data by default. Confirm the edition and target path before running them.

Inspect Install Logs

Background installs write logs to the local state directory. Show install logs:

chat2db logs install --edition pro

Follow logs:

chat2db logs install --edition pro --follow

logs streams text. Do not pass --json.

Clean Up Runtime State

Stop the Pro app, runtime, and MCP:

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

Stop Local:

chat2db stop --edition local --all --json

Stop only the CLI runtime:

chat2db runtime stop --edition pro --json

Disable only MCP:

chat2db mcp disable --edition pro --json

Recovery Order

1. Confirm CLI Version

chat2db version --json
chat2db --help

If this documentation differs from --help, trust local --help.

2. Inspect Overall State

chat2db status --json

Read next_action first; it usually points to the shortest recovery command.

3. Runtime Issues

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

If it still fails, stop and start again:

chat2db runtime stop --edition pro --json
chat2db runtime start --edition pro --json

4. MCP Issues

chat2db mcp status --edition all --json
chat2db mcp restart --edition pro --json

If Pro / Local conflict on the MCP port, stop the unused edition:

chat2db stop --edition local --all --json

5. Datasource or SQL Issues

Confirm the datasource exists:

chat2db db datasources --edition pro --json

Test the connection:

chat2db db connection-test --data-source-id <data-source-id> --json

Then run a minimal query:

chat2db sql query \
  --data-source-id <data-source-id> \
  --database postgres \
  --schema public \
  --sql 'select 1' \
  --json

Do Not Record

Do not paste these into public channels:

  • database passwords
  • MCP tokens
  • Authorization headers
  • JDBC URLs that contain credentials
  • production administrator accounts
  • full local paths that identify a personal machine

It is usually safe to keep command names, error codes, redacted endpoints, edition, version, and next_action.