Skip to content

System Health

cs doctor diagnoses the local CloudSlash setup and repairs what it safely can. There is no daemon and no background service: health means the files and plugins the CLI depends on.


cs doctor

cs doctor

How it works

Doctor is dynamic, not static. It discovers your environment and adapts:

  • Credentials: checks the provider credential chain that the installed plugins will use. It validates AWS credentials with aws sts get-caller-identity and reports a single actionable line when they are missing or expired.
  • Plugins: reads every installed manifest, checks the binary is present and executable, and reports the trust state (unsigned local, signed, or pinned).
  • Local stores: verifies the snapshot directory, the audit ledger, and the configuration file are readable and writable.
  • Storage: reports snapshot count, ledger entries, and the size of local data.

Example output

CLOUDSLASH DOCTOR

  Core Infrastructure
  Data directory       [OK]    ~/.cloudslash
  Config file          [OK]    cloudslash.yaml
  Snapshot store       [OK]    42.3 MB

  Credentials
  AWS                  [OK]    verified (arn:aws:iam::123456789012:user/dev)

  Plugins
  aws                  [OK]    ~/.cloudslash/plugins/aws (unsigned local)

  History & Data
  Snapshots            [OK]    12 snapshots (retention: 90 days)
  Audit ledger         [OK]    47 events
  Last scan            [OK]    2h ago: 10,420 nodes, 847 waste

Auto-fix mode

cs doctor --fix

Auto-fix can:

  • Create missing directories (plugins/, snapshots/, logs/)
  • Write a default cloudslash.yaml with sensible defaults
  • Initialize empty snapshot and audit stores
  • Remove stale temporary files left by an interrupted run

It never invents credentials and never touches provider resources.


cs status

Get a quick snapshot of the last scan without launching the TUI:

cs status
CLOUDSLASH STATUS

  Total nodes            10,420
  Waste nodes            847
  Projected savings      $14,230/mo
  S.A.U. blocked         5 nodes

  Last scan              2h ago (+23 since previous scan)

cs status reads the local snapshot. If no snapshot exists yet, it says so and points at cs scan.

History delta

Status compares current waste against the previous snapshot:

  • Green (-15 since last scan): waste decreased
  • Red (+23 since last scan): new waste appeared