Skip to content

CLI API

Alex Stoyanov edited this page Apr 17, 2026 · 4 revisions

CLI API

Ethernity exposes a machine-readable CLI surface under ethernity api for GUI and automation clients.

Current Commands

  • ethernity api backup
  • ethernity api compact
  • ethernity api config get
  • ethernity api config set
  • ethernity api extend
  • ethernity api inspect extend
  • ethernity api inspect mint
  • ethernity api inspect recover
  • ethernity api mint
  • ethernity api recover

These commands write newline-delimited JSON to stdout. Treat stdout as reserved for NDJSON events only.

What To Read For The Full Contract

This wiki page is only a summary. The authoritative contract lives in the repo:

Core Rules

  • schema version: 1
  • transport: one JSON object per line on stdout
  • encoding: UTF-8 text
  • inspect commands do not write files and do not emit artifact events
  • exit code 0: success
  • exit code 2: validation, input, configuration, or runtime failure
  • exit code 130: cancelled by user

Event Types

  • started
  • phase
  • progress
  • warning
  • artifact
  • result
  • error

The exact object shapes are defined by the repo docs and JSON schema.

Client Guidance

  • Parse one JSON object per line as it arrives.
  • Ignore unknown fields for forward compatibility.
  • Use code values for logic and message values for display.
  • Use artifact paths instead of guessing filenames.
  • Treat docs/cli_api.md and the schema as the source of truth, not this summary page.

Related

Clone this wiki locally