engini CLI is built to be driven programmatically. Everything on this page is stable across the npm and pip distributions.
Exit codes
Output modes
- TTY: human-readable output; progress lines go to stderr.
- Piped or
--json: pretty JSON on stdout - always machine-parseable. --quiet: suppresses non-essential output.- Errors are structured too: a failure prints a JSON error object with a
hintwhere applicable.
Introspection: --schema
Every command supports --schema, printing its argument and output schema as JSON - agents discover flags without parsing help text:
Resumable gates: need:* + exit 5
engini connect never blocks for a non-TTY caller. At each point where it needs input it prints a self-describing payload and exits 5:
methods, fields, sign_in_url, objects…) plus a resume string with the exact next command. The loop is: run → read need → obtain the value (ask your user) → run resume.
Result handles
Tool results larger than--max-bytes (default 4096) are spilled to a local sandbox and replaced by a compact envelope with a handle and a shape preview. Drill in instead of re-fetching:
$XDG_CACHE_HOME/engini/results/ (%APPDATA% on Windows) and are auto-pruned to the most-recent 20, dropping anything older than 24h - handles are short-lived, so drill in during the same session. --inline (or --max-bytes 0) forces the full result inline; --raw / --llm bypass the sandbox.
LLM-shaped output
engini tools call ... --llm openai|anthropic --tool-call-id <id> emits the result already formatted as that vendor’s tool-result message - pipe it straight back into the model conversation.
Previews
Mutating commands accept--dry-run, printing what would happen (e.g. {"would_connect": ...}) without executing.