This matrix summarizes the current command support by database engine. It is intended for maintainers and AI agents choosing a safe command path.
Legend:
- β Supported
β οΈ Supported with limitations or engine-specific behavior- β Not supported / exits with an error
- N/A Not database-engine-specific
Maintenance note: command support statuses in this table are mirrored by src/adapters/capabilities.ts and guarded by tests/unit/adapters/capabilities.test.ts. Update both together when support changes.
| Command / area | PostgreSQL | MySQL | MariaDB | MongoDB | Redis | Elasticsearch | Notes |
|---|---|---|---|---|---|---|---|
init |
β | β | β | β | β | β | MongoDB defaults to a field-by-field wizard (host/port/user/password/authSource/replicaSet/tls/srv); a full uri remains an advanced fallback (--uri for non-interactive use). Redis uses database index (0-15). ES supports Cloud ID/ApiKey. |
Multi-connection use / --use |
β | β | β | β | β | β | v2 config isolates connections and schema caches. |
password rotation |
β | β | β | β | β | β | Changes one connection's password only. Writes to the env var the config references (a literal password is converted to { "$env": ... } once); verifies by connecting before saving unless --skip-test. Blocked in agent mode. |
Read-only query fan-out (--use a,b) |
β | β | β | β | SQL read-only statements, Mongo filters/read-only pipelines, and ES search only. Rejects writes, recovery, UI, CSV, and HTML; mixed outcomes exit 2. | ||
list |
β | β | β | β | β | β | SQL: tables; Mongo: collections; Redis: keys (SCAN); ES: indices. |
schema [table] |
β | β | β | Mongo: sampled; Redis: per-key only (type/TTL/size); ES: flattened mapping. | |||
schema full scan / --refresh / --reset |
β | β | β | β | β | Redis has no full scan/cache. ES iterates non-system indices. | |
query |
β | β | β | SQL: SQL; Mongo: JSON; Redis: commands; ES: DSL/Lucene. | |||
Query output table / json / csv / html |
β | β | β | β | β | β | All engines flow through shared result formatter; HTML and --ui show truncation/security warnings before KPIs, charts, and raw rows. |
| Query auto-limit / size guard | β | β | β | SQL/Mongo/ES apply limits. Redis: SCAN/LRANGE/ZRANGE rewrite + HGETALL/SMEMBERS/KEYS truncate at 1000; --no-limit bypasses. |
|||
q saved query execution |
β | β | β | SQL: SELECT/WITH only. Mongo: JSON find / aggregate body, requires collection frontmatter (CLI --collection overrides), parameter substitutions are JSON-encoded. Redis: read-only allowlist + range/SCAN size guard. ES: JSON DSL with size guard, scripts rejected, requires index frontmatter. |
|||
queries snippet management |
β | β | β | Management works regardless of active connection. | |||
insert |
β | β | β | β | β | Redis/ES writes not exposed via dedicated subcommand (use query). |
|
update |
β | β | β | β | β | Redis/ES writes not exposed via dedicated subcommand. | |
delete |
β | β | β | β | β | Redis/ES deletes not exposed via dedicated subcommand. | |
export |
β | β | β | β | SQL/Mongo plus ES. An auto-limit hit fails closed without writing a partial file; use --no-limit for all rows or --limit N to accept a bound. ES full-index export scrolls in batches. Redis not supported. |
||
blacklist config management |
β | β | β | Rule CRUD engine-independent. Enforcement varies by engine. Redis: key-glob rejection (Redis-native pattern) plus value/hash-field masking ([REDACTED]) via the redis.mask config block. |
|||
check data health |
β | β | β | β | β | SQL-only; best on MySQL/MariaDB. | |
diff snapshots |
β | β | β | β | β | β | Relational schema snapshots only. |
migrate DDL |
β | β | β | β | β | β | SQL-only (Postgres/MySQL/MariaDB). |
shell |
β | β | β | SQL + MongoDB + Redis + ES. ES: Kibana Dev Tools-style REPL (<METHOD> /<path> + optional JSON body, blank-line submit), read-focused, _search auto-capped at 1000. Redis: single-line; SCAN/LRANGE auto-capped at 1000; .no-limit to bypass. |
|||
status |
β | β | β | β | β | β | Safe non-credential config summary. |
doctor |
β | β | β | β | β | β | Engine-specific diagnostics. |
completion |
N/A | N/A | N/A | N/A | N/A | N/A | Shell completion is engine-independent. |
upgrade |
N/A | N/A | N/A | N/A | N/A | N/A | Update checks are engine-independent. |
recover |
N/A | N/A | N/A | N/A | N/A | N/A | Automated remediation and multi-turn protocol; engine-independent logic operating on saved envelopes. |
skill |
N/A | N/A | N/A | N/A | N/A | N/A | Skill generation is engine-independent. New: skill tasks list/show/plan exposes plan-only Agent Task Packs (built-in + .dbcli-shared/tasks/ + .dbcli/tasks/); plans never execute commands. |
verify |
N/A | N/A | N/A | N/A | N/A | N/A | Runs non-executing verification scenarios: safe-backfill (analyzes UPDATE, never writes), migration (analyzes ALTER TABLE DDL, never executes DDL), rollback (analyzes a restore statement via --kind ddl|dml, never executes it), and constraint (generates a read-only COUNT(*) violation query via --check fk|not-null|unique|custom, never writes). All scenarios produce local .dbcli/verification/ artifacts in --after-write mode. SQL engines only. |
verification |
N/A | N/A | N/A | N/A | N/A | N/A | Inspects and manages local VerificationArtifact files. Subcommands: list / show / summary / prune (all local-write or readonly). summary --latest-only narrows to the latest matching artifact plus status counts. Never connects to a database. |
audit |
N/A | N/A | N/A | N/A | N/A | N/A | Cross-engine local capability writing .dbcli/audit/<conn>.jsonl. Subcommands: tail / show / health (readonly), clear (local-write). See assets/reference.md Β§audit. |
Package ./agent-core export |
N/A | N/A | N/A | N/A | N/A | N/A | Semver-stable, database-independent agent CLI helpers: env loading/references, connection selection/name parsing, and applied-limit trimming plus public types. Purity is release-gated. |
These tiers mirror SideEffectTier in src/adapters/capabilities.ts and are used by maintainers and AI agents to choose safe command paths.
| Tier | Meaning | Examples |
|---|---|---|
readonly |
Reads remote or local state without mutating the connected database. Local schema-cache refreshes are still treated as readonly when the command contract says so. | list, schema, query, inspect, report, guide, audit tail, audit show, audit health |
dry-run |
Produces or applies a gated plan only when an explicit dry-run or allow flag is present. | recover, write commands with --dry-run |
local-write |
Writes local project or user configuration/artifacts, but does not mutate the connected database. | use, queries, blacklist, skill, upgrade, audit clear |
db-write |
Mutates the connected database or datastore. Requires permission checks and command-specific safeguards. | insert, update, delete, migrate |
interactive |
Requires prompt/TTY interaction and may write local configuration after user input. | init, shell |
none |
Command is unsupported or not applicable for the engine. | Unsupported engine/command combinations |
The release gate is 9 shell steps encoded in scripts/release-check.sh. The documentation/skill drift-guards (skill:check, platform:check, plugin:check, docs:check, contract:check, plan:check, plus the reference.md command-coverage test in bun test) run in CI on every push/PR via the docs-parity job; the full 9-step gate must pass locally via bun run release:check before tagging a release:
bun audit # 1/9
bunx prettier --check "src/**/*.ts" "tests/**/*.ts" "scripts/**/*.ts" # 2/9
bun run agent-core:check # 3/9
bun run typecheck # 4/9
bun run lint # 5/9
bun test # 6/9
bun run build # 7/9
bun test tests/integration/dist-smoke.test.ts # 8/9
bash scripts/release-check.sh # 9/9 doc-presence (audit row + CHANGELOG version)- Step 3/9 (
bun run agent-core:check) rejects database-specific terms and dependencies outside the stable agent-core boundary. - Step 5/9 (
bun run lint) enforces--max-warnings=0β any new ESLint warning blocks release. - Step 8/9 (dist smoke) guards the packaged
assets/path used bydbcli skill --install(includingSKILL.zh-TW.mdsince v1.20.0). - Step 9/9 (doc-presence) is a shell-grep gate: confirms
docs/feature-matrix.mdhas theauditrow andCHANGELOG.mdhas a## [<package.json version>]heading. Catches doc-vs-version drift before tagging. - Benchmark (
bun run test:perf) is a blocking CI gate across the supported OS/Bun matrix; each budget is based on runner measurements and prints its observed value. - Step 6/9 (
bun test) runs withSKIP_INTEGRATION_TESTS=truein the matrix job, so the database-backed half runs in the separateintegrationjob: docker-compose services, thenbun run services:check(fails with the address of anything not listening), thentests/integrationwithREQUIRE_INTEGRATION_SERVICES=true, which turns the suite's auto-skip into a failure. Without that variable a job that starts no services reports the same green as one that starts all of them, which is how those tests sat in CI doing nothing.
See CONTRIBUTING.md β Release Process for the full pre-tag checklist.
MongoDB support is intentionally narrower than SQL support. Treat it as a document-database path, not a full SQL equivalent.
(See SKILL.md or reference.md for detailed MongoDB workflows.)
initdefaults to a field-by-field wizard (host,srv,port,user,password+authSource, then optionalreplicaSet/tls); pasting a fulluriis an explicit advanced choice.--urikeeps its existing non-interactive behavior unchanged.- Optional per-field connection options:
authSource(auth database; defaults toadminonce a user is configured),replicaSet,tls(boolean), andsrv(boolean, buildsmongodb+srv://and resolves hosts via DNS SRV; ignoresportwhentrue).authSourceandreplicaSetaccept{"$env": "..."}references. - If both
uriand per-field values are present,uriwins and the per-field values are ignored;dbcli doctorreports this, and asrv: trueconnection with a non-defaultport, as warnings. - A field-mode
userwith nopasswordfails closed with an error rather than connecting without authentication.user/database/passwordare percent-encoded when the URI is built. - Connection failures are classified into hints: authentication failures point at
authSource, DNS/SRV failures point atsrv, and TLS failures point at thetlsfield.
Redis connections speak Redis commands. Support is focused on key discovery and basic command execution.
- Required:
host,port. Optional:password,database(logical index 0-15). listreturns β€ 100 000 keys via SCAN.
queryfirst token must be an allow-listed command. Permission tier is derived from the command.schema <key>is synthetic and non-cached. No full database scan is available.
SCAN/HSCAN/SSCAN/ZSCANinjectCOUNT 1000when missing;LRANGE/ZRANGE/ZREVRANGEclamp thestopindex;ZRANGEBYSCOREinjectsLIMIT 0 1000.HGETALL/HKEYS/HVALS/SMEMBERS/KEYSare client-truncated at 1000 entries with aREDIS_SIZE_TRUNCATEwarning.--no-limit(CLI) or.no-limit on(shell) bypasses all size guards.
- Blacklist rules are enforced as Redis-native key globs (
*,?,[abc],[a-z]). Reads and writes whose keys match a rule are rejected with aBlacklistRejection. KEYS/SCAN MATCHpatterns that overlap a blacklist pattern are rejected; non-overlapping listings filter out blacklisted keys.- Value and hash-field masking is available via the
redis.maskconfig block: keys matching akeyPatternglob have their value (or named hashfields) returned as[REDACTED]on read (GET,GETRANGE,HGETALL,HGET,HMGET,HVALS). Key-glob rejection always takes precedence over masking.
dbcli shellopens an interactive single-line Redis REPL with history, tab completion (commands + key prefixes), and a.no-limit on/offtoggle.
Elasticsearch support uses the REST API. It is focused on index discovery and search.
- Supports
host+port,nodes[], orcloudId. - Auth:
apiKeyoruser/password. - Supports HTTPS and custom CA.
queryrequires--collection(or--index). Supports JSON DSL or Lucene query strings.- Hits are flattened into result rows.
schemaflattens mappings and surfaces multi-fields. Supports full-scan caching.- Blacklist column rules apply to flattened rows. Index-level blacklist rejects an index up front.
dbcli shellopens a dedicated Kibana Dev Tools-style REPL: enter<METHOD> /<path>then an optional multi-line JSON body, and submit with a blank line. Responses render as pretty JSON.- Read-focused. Index-level blacklist rejects protected indices up front, and
_searchrequests without an explicitsizeare auto-capped at 1000. - A blank line submits the current block; Ctrl+C cancels the in-progress block; Ctrl+D or
exit/quitleaves the shell.