Class J7mCli
The CLI implements the Phase 5.2-5.6 local developer/operator workflow: package, sign, verify, deploy, plan, start, list, status, stop, unload, upgrade, rollback, repository status, and repository audit verification. It is intentionally local-runtime scoped and does not contact remote fleets, external artifact replication systems, production CAs, KMS, GRC, SIEM, PDP, or vendor services.
The nugget command family is the Phase 7 CLI client for the
headless nugget administration contracts. It owns terminal parsing, prompt
and target state, local/provider-backed discovery, PIN-source handling,
safe status and inspection rendering, application lifecycle requests, and
disabled-by-default nugget control requests. Concrete remote administration
transports, script mode, and web or HTTP adapters are outside this CLI class
and require separate providers over the same public contracts.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidRuns the CLI as a Java main class.static intExecutes a command and writes output toSystem.out.static intrun(String[] args, InputStream input, PrintStream output, PrintStream error, NuggetCliClient nuggetClient, NuggetCliSecretReader secretReader, Clock clock, NuggetCliTicker ticker, NuggetCliEventSink eventSink, Map<String, String> environment) Executes a command with explicit nugget CLI integration seams.static intrun(String[] args, PrintStream output) Executes a command.static intrun(String[] args, PrintStream output, PrintStream error) Executes a command with separated public output and diagnostics streams.
-
Method Details
-
main
Runs the CLI as a Java main class.- Parameters:
args- command-line arguments
-
run
Executes a command and writes output toSystem.out.- Parameters:
args- command arguments- Returns:
- process-style exit code
-
run
Executes a command.- Parameters:
args- command argumentsoutput- destination for safe public output- Returns:
0success,1user input failure,2verification/security failure,3lifecycle/runtime failure, or4unexpected internal failure
-
run
Executes a command with separated public output and diagnostics streams.- Parameters:
args- command argumentsoutput- destination for safe public outputerror- destination for safe diagnostics- Returns:
- process-style exit code
-
run
public static int run(String[] args, InputStream input, PrintStream output, PrintStream error, NuggetCliClient nuggetClient, NuggetCliSecretReader secretReader, Clock clock, NuggetCliTicker ticker, NuggetCliEventSink eventSink, Map<String, String> environment) Executes a command with explicit nugget CLI integration seams.This overload is intended for deterministic demos, tests, embedders, and future launchers that already own the input, output, diagnostics, clock, event sink, and transport-neutral nugget client. It does not weaken production provider loading: ordinary command-line execution still obtains nugget clients through
NuggetCliClientProvider. The supplied environment map is a caller-owned snapshot used only for explicitly named PIN sources such as--pin-env; values are not printed by the CLI and are copied only into shortest-scope credential material.- Parameters:
args- command argumentsinput- command inputoutput- destination for safe command outputerror- destination for diagnosticsnuggetClient- transport-neutral nugget clientsecretReader- interactive secret reader, ornullclock- wall-clock source for request metadataticker- monotonic time source for deadlines and credential expiryeventSink- safe CLI event sinkenvironment- immutable environment snapshot used by explicit environment-source options- Returns:
- process-style exit code
-