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§
- ApiArgs
ign apiargs (09-03, EXT-01) — the raw-passthrough family. One verb today (call); the escape hatch for the 80+ gateway endpoint families no curated command covers.- ApiCall
Args ign api callargs (09-03, EXT-01). Arbitrary verbs accepted — reqwest’sMethodparser validates (usage-class refusal for garbage);--datais RAW TEXT on ANY method (GET/DELETE bodies allowed — curl parity; the gateway’s answer classifies); ONE query mechanism (repeatable--query k=v, never?in--path).- 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
- Diagnostics
Args ign diagnosticsargs (09-05, EXT-02) — the support-bundle family:bundlenests one level (thetags providergrouped- subfamily pattern).- E2eArgs
ign e2eargs (QUICK-tg4) — the browser-E2E pair.- 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). - Edit
Args ign editargs (13-08): the kubectl-edit loop over ONE resource. The resource path scopes what $EDITOR opens (the whole tree still decodes for encode-back context); the push rides the project-import wire behind the ONE confirmation gate.--yesis the GLOBAL flag (globals-once) — never redeclared here.- GanArgs
ign ganargs (09-04, EXT-02) — the Gateway Area Network morning-check family.- License
Args ign licenseargs (09-04, EXT-02) — the license morning-check family. One verb today; room to grow (the uniform-leaf shape).- 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. - McpArgs
- Hidden args for
ign mcp serve(14-01).serveis a RESTRICTED POSITIONAL — not a subcommand — so the clap walk (tui_coverage.rs) yields exactly ONE row-requiring node,mcpitself: anmcp servesubcommand leaf would need a second routes() row and extend the pinned OutOfBand set past its four-member contract (an orphan row fails the walk by design). clap’svalue_parser = ["serve"]keeps every other spelling (ign mcp,ign mcp bogus) a usage-class clap error — exit 2 BEFORE any protocol byte is written. Zero stdout-facing behavior here — the mode owns its own I/O entirely (mcp::serve). - Module
Args - Module subcommands (Phase 19) —
uninstallis the family’s ONE destructive verb: guarded (--yes-refused, therig resetprecedent), and, unlike every other guarded verb in this codebase, NOT undone by re-declaring the module afterward (recovery today meansign rig reset, which destroys the rig’s data volume). - 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). - Redundancy
Args ign redundancyargs (09-04, EXT-02) — the redundancy morning-check family.- 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). - Session
Args ign sessionargs (QUICK-tg4) — the SINGULAR verb family: one gateway login session for this CLI to hand to a browser harness.- 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). - Testing
Args - Testing subcommands (QUICK-p0g) — the standalone wrapper over the
gateway testing bundle’s
testing/runroute.testingrequires a subcommand (thescriptshape — no bare row); there is no--yesguard: running a test suite is a read-shaped operation from the CLI’s side and agents need the verb non-interactive. - 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. - Workspace
Args - Workspace subcommands (13-07): the local edit loop.
checkoutwrites the mapped tree + records.ign-workspace.json(the manifest IS the workspace identity — status/push read it and the user never re-types the project);statusreports PUSH-RELATIVE drift (every row says what push would do);pushis the guarded splice of local edits into a FRESH gateway export.
Enums§
- ApiCommand
- Backup
Command - Bundle
Command - The four bundle verbs (09-05). Nothing here is destructive:
generate creates a support bundle, download writes a local file,
wait polls — none carry
--yes(the backup-download posture). - 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 - Diagnostics
Command - E2eCmd
- EamCommand
- EamTask
Command eam task …— the guarded writes (07-02 Task 3; the five lifecycle/mutation verbs arrive 10-04).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;suspend/resume/cancel/modify/deleteare the two-tier guarded verbs (pure precheck → blast-radius preview fetch → confirm-with-preview → action — the refusal message IS the blast radius).- GanCommand
- License
Command - LogLevel
- The seven spec-documented log levels (TRACE..OFF), value-enum form
for clap;
LogLevel::wireyields the uppercase wire token. - Loggers
Cmd - LogsCmd
- Module
Command - Profile
Cmd - Project
Command - Redundancy
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
Cmd - 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).- Testing
Command - Testing
Format Arg - The CLI-side
--formatenum (QUICK-p0g) — the clapValueEnummirror of core’s plainTestingFormat, theTransferFormatprecedent (core keeps framework-free enums; theFromimpl lives beside this one).get_possible_values()is what feeds the MCP tool schema a real enum instead of a free string. - Transfer
Format - The bulk-transfer payload format (11-05) — the clap surface for
core’s
ExportFormat/ImportFormat(core keeps plain enums; the From impls live beside this one, the CollisionPolicy precedent). json is the default so every pre-11-05 invocation parses and behaves byte-identically. - Trial
Command - WaitCmd
- Webdev
Command - Workspace
Command