Skip to main content

CLI reference

subzerodev-github <command> [options]

All operational commands emit text by default and one contract result envelope with --json or --output-format json. manifest always emits its canonical JSON document and requires no configuration, credential, network, cache, or output directory.

Global options

OptionMeaningImplemented today
-h, --helpUsage to stdout, exit 0. Also valid per command.Yes
-v, --versionPlugin version to stdout, exit 0.Yes
--output-format <text|json>Selects the output channel. Default text.Yes
--jsonAlias for --output-format json.Yes
--config <path>Configuration file location.Yes
--log-level <level>One of error, warn, info, debug, trace.Yes
--quietSuppress non-essential stderr output.Yes
--dry-runPreview sync or export with zero writes.Yes

Global options may appear before or after the command. Combining --json with --output-format text is refused instead of silently choosing one.

Commands

CommandPurposeImplemented today
manifestPrint the canonical plugin manifest.Yes
validateValidate configuration and GitHub access.Yes
syncIncrementally synchronize repository data.Yes
listDisplay repositories from the local cache.Yes
statsDisplay aggregate cached statistics.Yes
exportExport deterministic normalized project documents.Yes

Command-specific options

CommandOptionMeaning
sync--profile <value>basic, standard, or detailed.
sync--no-cacheIgnore the prior cache while collecting.
sync--include-forksInclude forks for this run.
list--limit <value>Return 1–1000 repositories; default 100.
export--format <value>Export json or yaml; may be repeated.
export--output <path>Override the configured output directory.

Portfolio overrides are loaded from portfolio.overrides in configuration. The file has schemaVersion: "1.0.0" and an overrides array; each entry carries providerId, an optional human-readable slug, and a partial portfolio object. Only the immutable providerId matches.

Exit codes

The canonical source for this table is the plugin contract in SubZeroDev.PluginContract. It appears here once, in full, so a caller of this CLI does not have to leave this site to look it up — no other page in this repository restates it.

CodeMeaning
0Success
2Usage or validation error
3Operational failure
4Partial success
5Authentication or authorization failure
6Rate-limited or quota-exhausted
124Timed out
130Cancelled or interrupted

1 is reserved and never assigned — most runtimes return it for an uncaught exception, so leaving it unassigned keeps "the plugin crashed" distinguishable from "the plugin reported a failure". 124 and 130 follow timeout(1) and 128 + SIGINT, so shell tooling and container runtimes already produce them.

Commands map invalid use/configuration to 2, operational failures to 3, partial synchronization to 4, authentication failures to 5, and rate/budget stops with no usable result to 6.