Cherry.CLI (cherry v0.2.0)

Copy Markdown View Source

The single seam behind every Cherry frontend (ADR 0006).

Mix tasks and the standalone binary are thin wrappers around run/1 — verb for verb, flag for flag — so the two can never disagree.

Exit codes

CodeMeaning
0Success
1The command ran and failed
2Usage error: unknown verb or bad flags

Global flags

Every command accepts --json (machine-readable envelope on stdout) and --verbose (extra detail for humans debugging).

Summary

Functions

Runs a Cherry command from raw argv and returns its exit code.

Functions

run(list)

@spec run([String.t()]) :: non_neg_integer()

Runs a Cherry command from raw argv and returns its exit code.

The caller decides what to do with the code: mix tasks translate nonzero into exit({:shutdown, code}), the binary into System.halt/1.