MarketDeck docs
data
Data inventory, DB health, cache checks, repair plans, exports, imports, and vacuum.
marketdeck data is the read-only Data Ops surface for the local MarketDeck state. It inspects the SQLite database, WAL/SHM sidecar files, JSON state, caches, blobs, reports, jobs, alerts, and data coverage used by Risk, Alerts, Reports, and Monitor.
Usage#
marketdeck data <status|doctor|backfill|repair-plan|export|import|vacuum> [flags]
| Subcommand | What it does | |
|---|---|---|
status | Inventory DB files, caches, reports, jobs, alerts, config counts, and data-health counters. | |
doctor | Run DB integrity/schema, WAL/SHM, JSON, cache, blob, and data coverage checks. | |
backfill [--out PATH] | Generate a read-only plan for refreshing ledgers, reports, reconcile, and caches. | |
repair-plan [--out PATH] | Generate read-only actions from non-OK doctor checks. | |
export [--out PATH] [--include-db] | Write a non-secret data bundle. | |
import --file PATH --dry-run | Validate a data bundle without mutation. | |
| `vacuum [--dry-run | --yes]` | Inspect or run SQLite VACUUM with explicit consent. |
Data Health#
status and doctor expose:
| Area | Checks |
|---|---|
| DB | SQLite availability, integrity, schema version, DB/WAL/SHM sizes. |
| Cache | MarketDeck cache and icon-cache inventory with newest timestamps. |
| Coverage | Positions, paper equity snapshots, symbol metadata, paper spot ledger. |
| Blobs | Missing or orphaned analysis snapshot and backtest blob files. |
| JSON state | Alerts, jobs, strategies, reports, analyses, and export files parse as JSON. |
Examples#
marketdeck data status --format json
marketdeck data doctor
marketdeck data repair-plan --out data-repair.json
marketdeck data backfill
marketdeck data vacuum --dry-run
marketdeck data export --out bundle.json
marketdeck data import --file bundle.json --dry-run
repair-plan and backfill are intentionally non-executable plans: they explain the CLI commands to run next, but do not mutate state.