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]
SubcommandWhat it does
statusInventory DB files, caches, reports, jobs, alerts, config counts, and data-health counters.
doctorRun 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-runValidate a data bundle without mutation.
`vacuum [--dry-run--yes]`Inspect or run SQLite VACUUM with explicit consent.

Data Health#

status and doctor expose:

AreaChecks
DBSQLite availability, integrity, schema version, DB/WAL/SHM sizes.
CacheMarketDeck cache and icon-cache inventory with newest timestamps.
CoveragePositions, paper equity snapshots, symbol metadata, paper spot ledger.
BlobsMissing or orphaned analysis snapshot and backtest blob files.
JSON stateAlerts, 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.