Expand description
CLI definition: the five global args (defined exactly once, here) and the subcommand enum.
Placement rules (Phase 1 research, Pattern 1):
- Globals set the
globalarg attribute so they propagate to every subcommand; subcommand structs never redeclare them. - Never mark a global arg
required(clap rejects required globals). - Flags-only, zero interactive prompts — ever (research anti-pattern: “Prompting ever”).
Structs§
- Backup
Args - Backup subcommands (07-02, BKUP-01) — the standalone surface of
the Phase 4 gwbk wire.
restoreis the family’s destructive verb (the 8th--yes-guarded set member: it REPLACES this gateway’s state);downloadis a streamed read, unguarded. - Cli
- EamArgs
- EAM subcommands (07-02, BKUP-02) — the read-heavy surface with
guarded writes. Every runtime verb honestly reports the
controller-mode state gate (
eam_not_controlleron a stock gateway — the README documents the manual flip). - Lint
Args ign lintargs (07-04, INTR-02) — the ignition-lint delegation: PATHS map to--target <path>pairs on the child’s arg vector;--passthrough args ride verbatim after them (power users:--profile,--checks,--fail-on, …).- Loggers
Args - Logs
Args - Logs args: the query filters ride the TOP level so bare
ign logs [-f]lists/tails (must-have truth #1) whiledownloadand theloggerssubtree hang off the optional subcommand — the SessionsArgs precedent. - Profile
Args - Profile subcommands (nested: a struct wrapper carrying the subcommand
enum, so
Commands::Profilegets anArgspayload). - Project
Args - Project subcommands (03-01, PROJ-01/02).
deleteis the family’s ONE destructive verb (--yes-guarded, exit 2 without); copy/ rename/set create or relabel — never destroy — so they carry NO guard (planner decision per research). - Resource
Args - Resource subcommands (03-03, PROJ-05).
deleteis the family’s destructive verb (--yes-guarded, exit 2 without — the sessions-terminate shape);putis an upsert (create-or-replace ONE resource with explicit content) and stays friction-free per the planner decision — agents pass exactly what they want written. - RigArgs
- Rig args (04-01, RIG-01):
--rigrides the TOP level (the SessionsArgs--typeprecedent) so every rig verb shares it. The command enum carries ONLY the wired verbs — later plans extend it one variant at a time (the established extend-per-plan chore; nounimplemented!()stubs, every commit compiles clippy-clean). - Script
Args - Script subcommands (07-03, SCRPT-01) — the smallest family: ONE
verb over the already-shipped, already-secured scriptExec route.
scriptrequires a subcommand (therig trialshape — no bare row); the opt-in is STRUCTURAL (the route deploys only viaign webdev deploy --with-script-exec, which persists the secret at 0600), soruncarries NO--yesguard by design — the deploy flag IS the opt-in and agents need the verb non-interactive (the research-adopted decision). - Sessions
Args - Sessions args: the family filter rides the TOP level so bare
ign sessions [--type X]lists (must-have truth #1) whileign sessions terminate …carries the destructive half. - Tags
Args - Tags args (05-04, TAGS-01..04) — the grouped-subfamily pattern:
tags provider …nests one level deeper (the family’s native REST half), browse/read/write ride the TOP level. The webdev-dependent arms carry--project(defaultign-cli, the same default as deploy — the deployed routes live in that project). - Trial
Args - Trial subcommands (04-03, RIG-02/03).
statusreads the unauthenticated trial endpoint + banners cross-check.resetis the family’s destructive verb (--yes-guarded, exit 2 without — the reset precedent); the password NEVER rides a flag (env/secret only — redaction discipline). - Wait
Args - Wait targets (02-05, HLTH-11).
gatewayandrestartpoll the UNAUTHENTICATED /StatusPing (the dispatch builds a header-less client for them — waiting must work when auth is broken);moduleis an authed read. - Webdev
Args - Webdev subcommands (05-03, WEB-01/02). Deploy is deliberately NOT
--yes-guarded: the dedicated project (defaultign-cli) is CLI-OWNED — born from the first deploy zip and overwrite-replaced on every deploy (replace-not-merge is the CONTRACT here; user projects are never touched — README documents). scriptExec rides only on explicit request, gated by a deploy-time generated shared secret stored in the profile config at 0600.
Enums§
- Backup
Command - CliBackup
Type - CLI value-enum mirror of the core
BackupType(ignition-core stays clap-free;Fromconverts at the dispatch seam). - Collision
Policy - Import collision policy (03-02). Exactly the two values REST
exposes —
mergeis the Designer import popup’s vocabulary and is NOT a value: clap’s invalid-value error lists the two real choices, and the README documents merge as Designer-only (the sanctioned rejection-with-hint shape). - Commands
- Connection
Type - EamCommand
- EamTask
Command eam task …— the guarded writes (07-02 Task 3).newcarries the typed guard ladder (backup+OnDemand unguarded; mutating types and any non-OnDemand schedule need –yes; restore/install/upgrade types refuse outright — see README);forcedispatches NOW, always guarded.- LogLevel
- The seven spec-documented log levels (TRACE..OFF), value-enum form
for clap;
LogLevel::wireyields the uppercase wire token. - Loggers
Cmd - LogsCmd
- Profile
Cmd - Project
Command - Resource
Command - RigCommand
- Schedule
Mode - Schedule modes (the openapi taxonomy’s user-facing subset — SuspendedByFailover is system-owned, not a CLI value).
- Script
Command - Session
Type - CLI value-enum mirrors of the core action enums (ignition-core stays
clap-free;
Fromconverts at the dispatch seam). - Sessions
Cmd - Tags
Alarms Command tags alarms …— the alarm subfamily (05-06, TAGS-07). History needs a JOURNAL-PROVISIONED gateway (database connection + alarm-journal profile + general-alarm-settings — default rigs refuse exit 6 with the provisioning hint); acknowledge is the gateway-scope 3-arg form, so--usernameis REQUIRED (no default-guessing) and ack is deliberately NOT--yes-guarded (acknowledging never un-acknowledges anything — a state-advancing read-adjacent verb).- Tags
Command - Tags
Config Command tags config …— the configuration CRUD subfamily (05-05, TAGS-05): the get→edit-file→write-back surgical loop. Definition files are the configure shape (README’s traps table: tagType discriminator, nested children, alarms-as-LIST).- Tags
History Command tags history …— the historian subfamily (05-06, TAGS-08).- Tags
Provider Command - Tags
UdtCommand tags udt …— the UDT subfamily (05-05, TAGS-06).- Trial
Command - WaitCmd
- Webdev
Command