CLI Command Reference

Audience: DevEx engineers, operators, and CI authors integrating the stella CLI into vulnerability-scanning and release-control workflows. Scope: Synopsis, options, exit codes, and offline notes for the lock-validation, knowledge-search, policy-lifecycle, and verification command families, plus the withdrawn AOC commands.

The commands in this reference enforce the AOC guardrails described in the Aggregation-Only Contract reference and the CLI architecture overview. They consume Authority-issued tokens with tenant scopes and never mutate ingestion stores.

For per-command deep dives, see the commands/ guides. For the canonical exit-code contract, see Output and exit codes.


1 · Prerequisites


The AdvisoryAI Knowledge Search (AKS) commands expose deterministic retrieval from AdvisoryAI (docs|api|doctor) without requiring an LLM.

stella search "<query>" \
  [--type docs|api|doctor] \
  [--product <product>] \
  [--version <version>] \
  [--service <service>] \
  [--tag <tag>] \
  [--k <1-100>] \
  [--json]

Notes:

2.2 stella doctor suggest

stella doctor suggest "<symptom-or-error>" \
  [--product <product>] \
  [--version <version>] \
  [--k <1-100>] \
  [--json]

Uses the same AKS index and prints grouped recommendations for:

2.3 stella advisoryai index rebuild

stella advisoryai index rebuild [--json]

Rebuilds the deterministic AKS index from local markdown, OpenAPI, and Doctor metadata sources.

2.4 stella advisoryai sources prepare

stella advisoryai sources prepare \
  [--repo-root <path>] \
  [--openapi-output <path>] \
  [--doctor-seed <path>] \
  [--doctor-controls-output <path>] \
  [--overwrite] \
  [--json]

Prepares deterministic AKS source artifacts before an index rebuild:

The reviewed docs manifest is generated by python tools/scripts/validate/check-advisoryai-docs-manifest.py --write; sources prepare leaves it unchanged. Configure STELLAOPS_BACKEND_URL to the Gateway URL and use normal online settings. An empty cache or --overwrite fetches the Gateway’s merged document from /openapi.json. Without --overwrite, preparation reuses a structurally valid existing snapshot and reports fromCache=true; that result establishes local cache reuse. Failed retrieval leaves a good OpenAPI output unchanged and stops before Doctor controls are written. The API command guide describes runtime composition, cache validation and per-service downloads.


3 · sources ingest (withdrawn)

Withdrawn on 2026-10-01 (SPRINT_20260928_008 PCD-153). The command posted documents to api/aoc/ingest/dry-run, a route no Stella Ops service maps, so it failed against every backend. Nothing replaces it. The sources group keeps the read-only generation status command, sources status.


4 · aoc verify (withdrawn)

Withdrawn on 2026-10-01 (SPRINT_20260928_008 PCD-153). The command posted to api/aoc/verify, a route no Stella Ops service maps. Platform’s /api/v1/aoc/* compatibility endpoints, mapped only in Development and testing environments with fixed responses, were not a verification backend and were withdrawn on 2026-10-08 (SPRINT_20261007_002 CCP-004). The CLI no longer registers an aoc command group. See the aoc command guide.


5 · stella node lock-validate

5.1 Synopsis

stella node lock-validate \
  [--path <directory>] \
  [--format table|json] \
  [--verbose]

5.2 Description

Runs the Node analyzer locally against a working directory to compare lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock) with what is actually present in node_modules. The command is read-only and never schedules a scan; it reuses the same deterministic collector that powers Scanner so results match backend evidence. Output highlights two conditions that policy cares about:

This helps catch drift before images are built, keeps lockfiles trustworthy, and feeds policy predicates such as node.lock.declaredMissing.

5.3 Options

OptionDescription
--path, -pDirectory containing package.json and lockfiles. Defaults to the current working directory.
--format table|jsontable (default) renders a Spectre table with status badges; json prints the underlying report for CI automation.
--verboseEnables detailed logging (shared root option).

5.4 Output & exit codes

Exit codes:

CodeMeaning
0No inconsistencies detected.
1Declared-only or missing-lock packages were found.
71The requested directory could not be read (missing path, permissions, etc.).

The CLI also records stellaops.cli.node.lock_validate.count{outcome} so operators can monitor adoption in telemetry.

5.5 Offline notes


6 · stella python lock-validate

6.1 Synopsis

stella python lock-validate \
  [--path <directory>] \
  [--format table|json] \
  [--verbose]

6.2 Description

Validates Python lockfiles (currently requirements*.txt, Pipfile.lock, and poetry.lock) against what exists in site-packages. It uses the same analyzer Scanner runs, so declared-only packages, missing locks, and editable installs are detected deterministically and without internet access. This catches drift between lock manifests and baked images before scanners or policy gates fail later.

6.3 Options

OptionDescription
--path, -pDirectory containing lib/python*/site-packages and lockfiles. Defaults to $PWD.
--format table|jsontable (default) prints a human summary; json emits the raw report for CI.
--verboseEnables detailed logging.

6.4 Output & exit codes

Output shape mirrors the Node command: declared-only packages are shown with lock provenance, and runtime packages missing lock metadata are highlighted separately. JSON mode returns the same object schema { declaredOnly, missingLockMetadata, totalDeclared, totalInstalled }.

Exit codes follow the same contract (0 success, 1 violations, 71 for an unreadable path). Telemetry is published via stellaops.cli.python.lock_validate.count{outcome}.

6.5 Offline notes


7 · stella java lock-validate

7.1 Synopsis

stella java lock-validate \
  [--path <directory>] \
  [--format table|json] \
  [--verbose]

7.2 Description

Executes the Java language analyzer locally so Gradle gradle.lockfile, gradle/dependency-locks/**/*.lockfile, and pom.xml declarations can be compared with the jars that actually ship in a workspace. The command reuses the JavaLockFileCollector plus the JavaLanguageAnalyzer merge logic, so it emits the same DeclaredOnly and Missing Lock evidence that Scanner and Policy consume. Engineers can see which coordinates exist only in lockfiles (no jar on disk) and which installed jars lack lock metadata (no repository/provenance) before a scan ever runs.

7.3 Options

OptionDescription
--path, -pDirectory containing jars (e.g., build/libs) and lockfiles. Defaults to the current working directory.
--format table|jsontable (default) renders the Spectre table; json outputs the raw LockValidationReport.
--verboseEnables detailed logging and surfaces the analyzer paths being inspected.

7.4 Output & exit codes

Output mirrors the Node/Python verbs: Declared Only rows include the lock source/locator (e.g., gradle.lockfile, gradle/dependency-locks/app.lockfile) plus configuration/repository hints, while Missing Lock rows highlight jars that Scanner would tag with lockMissing=true. JSON responses return { declaredOnly, missingLockMetadata, totalDeclared, totalInstalled }.

Exit codes align with the other lock validators:

CodeMeaning
0No inconsistencies detected.
1Declared-only or missing-lock jars detected.
71Directory could not be read.

Telemetry is recorded via stellaops.cli.java.lock_validate.count{outcome} so adoption can be monitored alongside the Node/Python verbs.

7.5 Offline notes


8 · stella vuln observations (overlay paging)

stella vuln observations lists raw advisory observations for downstream overlays (Graph Explorer, Policy simulations, Console). Large tenants can page through results deterministically.

OptionDescription
--limit <count>Caps the number of observations returned in a single call. Defaults to 200; values above 500 are clamped server-side.
--cursor <token>Opaque continuation token produced by the previous page (nextCursor in JSON output). Pass it back to resume iteration.

Additional notes:


9 · Aggregation-only exit codes (withdrawn)

Exit codes 11–18 mapped ERR_AOC_00x violations for sources ingest --dry-run and aoc verify. Both commands were withdrawn on 2026-10-01 (§ 3, § 4), so no command returns these codes with that meaning. The CLI-wide contract is in Output and exit codes.


10 · Policy lifecycle quick start

All publish/promote operations require interactive identities with policy:publish/policy:promote and inject attestation metadata headers (policy_reason, policy_ticket, policy_digest). See Policy Lifecycle & Approvals § 3–4 for the full workflow and compliance checklist.


11 · Authority configuration quick reference

SettingPurposeHow to set
StellaOps:Authority:OperatorReasonIncident/change description recorded with orch:operate tokens.CLI flag --Authority:OperatorReason=... or env STELLAOPS_ORCH_REASON.
StellaOps:Authority:OperatorTicketChange/incident ticket reference paired with orchestrator control actions.CLI flag --Authority:OperatorTicket=... or env STELLAOPS_ORCH_TICKET.
StellaOps:Authority:QuotaReasonRequired justification recorded with orch:quota tokens.CLI flag --Authority:QuotaReason=... or env STELLAOPS_ORCH_QUOTA_REASON.
StellaOps:Authority:QuotaTicketOptional change ticket/reference accompanying quota adjustments.CLI flag --Authority:QuotaTicket=... or env STELLAOPS_ORCH_QUOTA_TICKET.
StellaOps:Authority:BackfillReasonRequired justification recorded with orch:backfill tokens.CLI flag --Authority:BackfillReason=... or env STELLAOPS_ORCH_BACKFILL_REASON.
StellaOps:Authority:BackfillTicketRequired ticket/reference accompanying historical backfill runs.CLI flag --Authority:BackfillTicket=... or env STELLAOPS_ORCH_BACKFILL_TICKET.
StellaOps:Authority:ScopeDefault scope string requested during stella auth login.CLI flag --Authority:Scope="packs.read packs.run" or env STELLAOPS_AUTHORITY_SCOPE; see Task Pack CLI profiles for common profiles.

Tokens requesting orch:operate fail with invalid_request unless both operator values are present. orch:quota tokens require quota_reason (≤256 chars) and accept an optional quota_ticket (≤128 chars). orch:backfill tokens require both backfill_reason (≤256 chars) and backfill_ticket (≤128 chars). Avoid embedding secrets in any value.


12 · stella excititor verify

12.1 Synopsis

stella excititor verify \
  [--export-id <id>] \
  [--digest <sha256>] \
  [--attestation <path>] \
  [--verbose]

At least one of --export-id, --digest, or --attestation must be supplied.

12.2 Description

Submits an artifact, digest, or attestation bundle to the Attestor service for verification. The command is available once the non-core plugin pack is installed (default in production CLI builds). It validates DSSE envelopes, Rekor proofs, and export digests without requiring operators to call Attestor APIs directly.

12.3 Options

OptionDescription
--export-id <id>Verify a previously issued Excititor export by identifier.
--digest <sha256>Expected SHA-256 digest of the artifact or attestation payload. Added to the verification payload for additional integrity checks.
--attestation <path>Path to a DSSE or in-toto bundle. The CLI base64-encodes the file and streams it to Attestor for verification.
--verboseEnables debug logging.

Behaviour: When --attestation is used, the CLI loads the file into memory, encodes it as base64, and delegates verification to Attestor. Verification fails fast if the file cannot be read.

12.4 Secret rule bundle workflow

To confirm the signed secret-leak rule bundle before enabling the analyzer:

export STELLA_ATTESTOR_URL=https://attestor.internal.example      # or Offline Kit mirror

RULES_PATH=offline/rules/secrets/2025.11/secrets.ruleset.rules.jsonl
ATTESTATION_PATH=offline/rules/secrets/2025.11/secrets.ruleset.dsse.json

stella excititor verify \
  --attestation "${ATTESTATION_PATH}" \
  --digest "$(sha256sum "${RULES_PATH}" | cut -d' ' -f1)"

The Attestor response prints verification status, Rekor UUID (when available), and whether the transparency proof was validated.

12.5 Offline considerations


13 · stella scan entrytrace --stream-ndjson

13.1 Synopsis

stella scan entrytrace \
  --scan-id <scanId> \
  [--stream-ndjson] \
  [--include-ndjson] \
  [--verbose]

13.2 Description

Streams the EntryTrace NDJSON produced by a completed scan. When --stream-ndjson is set, the CLI sends Accept: application/x-ndjson and writes the raw lines to stdout in order, suitable for piping into AOC/ETL tools. Without the flag, the command returns the JSON envelope (scanId, imageDigest, graph, NDJSON array) and optionally prints NDJSON when --include-ndjson is set.

13.3 Examples

Stream raw NDJSON for further processing:

stella scan entrytrace --scan-id scan-123 --stream-ndjson > entrytrace.ndjson

Retrieve the JSON envelope (default behaviour):

stella scan entrytrace --scan-id scan-123


Last updated: 2025-11-05 (Sprint 101).