Skip to content

Latest commit

 

History

History
119 lines (97 loc) · 4.33 KB

cli.md

File metadata and controls

119 lines (97 loc) · 4.33 KB

Unified CLI Reference

API Hub · Public API · Error Catalog · Getting Started

Full command-line reference for the heav3ns-press CLI executable.

All commands support the global --json flag to emit structured, machine-readable JSON output on stdout.


Global Options

Usage: heav3ns-press [OPTIONS] <COMMAND>

Commands:
  init        Bootstrap a publishing root directory
  serve       Launch autonomous server daemon & HTTP engine
  status      Show operational status summary
  publish     Publish or schedule an article
  list        List published or draft articles
  get         Retrieve article metadata and body
  search      Full-text search published articles
  revisions   Inspect version history for an article
  rollback    Rollback an article to a prior revision
  doctor      Deep health and environment inspection
  heal        Trigger immediate state reconciliation
  backup      Create, list, or restore Merkle backups
  quarantine  Inspect and resolve quarantined records
  export      Export articles to portable Markdown directory
  import      Import portable Markdown directory
  tick        Execute a single autonomous supervisor cycle
  cache       Inspect and manage the JoyRide execution cache
  queue       Inspect and operate the BroccoliQueue job processor
  mcp         Start Model Context Protocol (MCP) stdio server

Options:
  -d, --dir <DIR>    Path to publishing root [default: .heav3ns]
      --json         Output result as deterministic JSON
  -h, --help         Print help
  -V, --version      Print version

Subcommands

1. init

heav3ns-press init [--dir <DIR>]

Initializes config, creates directory shards (storage/, cas/, backups/, quarantine/), and seeds the welcome article.

2. serve

heav3ns-press serve [--port <PORT>] [--dir <DIR>]

Launches Axum HTTP engine on specified port (default: 8080) and kicks off background autonomous supervisor loop.

3. status

heav3ns-press status [--dir <DIR>] [--json]

Displays active content count, health status, storage size, and recent revisions.

4. publish

heav3ns-press publish <TARGET> [--slug <SLUG>] [--body <BODY>] [--tags <TAGS>] [--schedule <ISO_TIMESTAMP>] [--draft]

Publishes or schedules an article from arguments or an existing markdown file.

5. doctor

heav3ns-press doctor [--dir <DIR>] [--json]

Checks disk writeability, verifies host free space, audits content checksums, and reports system health.

6. heal

heav3ns-press heal [--dir <DIR>] [--json]

Forces immediate execution of the SelfHealingCoordinator to audit and repair discrepancies.

7. backup

heav3ns-press backup [--list] [--restore <BACKUP_ID>] [--dir <DIR>]

Creates a new verified snapshot, lists available snapshots, or restores a historical snapshot.

8. quarantine

heav3ns-press quarantine [list | inspect <ID> | resolve <ID>] [--dir <DIR>]

Inspects and manages isolated corrupt records without data loss.

9. mcp

heav3ns-press mcp [--dir <DIR>]

Runs the stdio Model Context Protocol (MCP 2024-11-05) JSON-RPC 2.0 server.

10. cache

heav3ns-press cache [stats | clear | pressure [--target-bytes <BYTES>] | explain <KEY> | invalidate [--key <KEY>] [--prefix <PREFIX>] [--tag <TAG>]] [--dir <DIR>]

Inspects JoyRide cache telemetry, purges cached entries, triggers memory pressure eviction passes, explains entry validity and TTL, or invalidates by key/prefix/tag.

11. queue

heav3ns-press queue [stats | list | enqueue | claim [--name <QUEUE>] | retry <ID> | retry-all [--name <QUEUE>] | clear-failed [--name <QUEUE>] | promote-delayed [--name <QUEUE>] | drain <QUEUE> | progress --id <ID> --token <TOKEN> --percent <PCT> | pause <NAME> | resume <NAME> | purge] [--dir <DIR>]

Inspects BroccoliQueue background job counts, lists pending/active tasks, enqueues tasks with idempotency keys, claims tasks with fencing tokens (globally or queue-specifically), retries individual or all failed tasks, purges DLQ failed jobs, promotes ready delayed jobs to waiting, drains waiting queues, reports intermediate worker progress, manages paused queues, or prunes terminal rows.