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 --jsonUpdate the CLI
Update the current CLI from the official CDN:
chat2db update --jsonUpdate a target path:
chat2db update --target ~/.local/bin/chat2db --jsonVerify afterward:
chat2db version --jsonUninstall the CLI
Remove the current CLI binary:
chat2db uninstall --cli --yesPreview without removing files:
chat2db uninstall --cli --dry-run --jsonUninstall Chat2DB Pro / Local
Uninstall Pro:
chat2db uninstall --edition pro --yes --jsonUninstall Local:
chat2db uninstall --edition local --yes --jsonPreview uninstalling both editions:
chat2db uninstall --edition all --dry-run --jsonUninstall 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 proFollow logs:
chat2db logs install --edition pro --followlogs streams text. Do not pass --json.
Clean Up Runtime State
Stop the Pro app, runtime, and MCP:
chat2db stop --edition pro --all --jsonStop Local:
chat2db stop --edition local --all --jsonStop only the CLI runtime:
chat2db runtime stop --edition pro --jsonDisable only MCP:
chat2db mcp disable --edition pro --jsonRecovery Order
1. Confirm CLI Version
chat2db version --json
chat2db --helpIf this documentation differs from --help, trust local --help.
2. Inspect Overall State
chat2db status --jsonRead 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 --jsonIf it still fails, stop and start again:
chat2db runtime stop --edition pro --json
chat2db runtime start --edition pro --json4. MCP Issues
chat2db mcp status --edition all --json
chat2db mcp restart --edition pro --jsonIf Pro / Local conflict on the MCP port, stop the unused edition:
chat2db stop --edition local --all --json5. Datasource or SQL Issues
Confirm the datasource exists:
chat2db db datasources --edition pro --jsonTest the connection:
chat2db db connection-test --data-source-id <data-source-id> --jsonThen run a minimal query:
chat2db sql query \
--data-source-id <data-source-id> \
--database postgres \
--schema public \
--sql 'select 1' \
--jsonDo 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.