API and CLI Reference

This is the single entry point for operators and integrators working with the Stella Ops APIs and the stella CLI. Use it to find:

This page is a hub — detailed references live under docs/api/ and docs/modules/cli/. The most-used stella command groups are summarized below; treat the linked OpenAPI documents and command guides as the source of truth.

Command currency: runnable-looking examples that the current CLI parser rejects are explicitly unshipped or stale. Check the machine-enforced baseline before copying an older example into automation.

GoalOpen this
API conventions (headers, pagination, errors)docs/api/overview.md
API versioning policydocs/api/versioning.md
Gateway tenancy header policydocs/api/gateway/tenant-auth.md
Gateway header hardening rulesdocs-archive/modules/gateway/identity-header-policy.md
Console workspaces (findings/VEX views)docs/api/console/workspaces.md
Console search and downloadsdocs/api/console/search-downloads.md
Exceptions API entry pointdocs/api/exceptions.md
Download aggregated OpenAPI via CLIdocs/modules/cli/guides/commands/api.md
CLI command reference (by command group)docs/modules/cli/guides/commands/
CLI authentication and tokensdocs/modules/cli/guides/commands/auth.md
Retired Concelier db command record (no running backend)docs/modules/cli/guides/commands/db.md, docs/CONCELIER_CLI_QUICKSTART.md
Live vulnerability/advisory operationsdocs/modules/vulnerabilities/architecture.md, docs/runbooks/vulnerabilities/vuln-ops.md
CLI offline/air-gap workflowsdocs/modules/cli/guides/commands/offline.md, docs/OFFLINE_KIT.md
CLI reachability workflowdocs/modules/cli/guides/commands/reachability.md
CLI vulnerability workflowdocs/modules/cli/guides/commands/vuln.md
Vuln Explorer OpenAPI (v1)docs/modules/vuln-explorer/openapi/vuln-explorer.v1.yaml
Graph Gateway API (draft)docs/api/graph.md, docs/modules/graph/openapi/graph-gateway-spec-draft.yaml

CLI command groups documented here

This page documents a curated set of stella commands in detail. Jump to one:

For the full command surface (one guide per command group), see docs/modules/cli/guides/commands/.

Where the API contracts live

Stella Ops treats the OpenAPI documents and JSON schemas as the source of truth for HTTP shapes.

If you are building an SDK or want a single document for tooling, prefer the CLI OpenAPI download flow:

See: docs/modules/cli/guides/commands/api.md.

Where the CLI docs live

The stella CLI is documented as:

CLI docs are written to match repo reality; avoid copying raw endpoint paths into the CLI guides unless they are backed by OpenAPI and tests.

Cross-cutting conventions (high-level)

For the detailed contract, see docs/api/overview.md. The stable rules to keep in mind:

stella system migrations commands — RETIRED

Retired (SPRINT_20260722_021 PLT-4, DC-26, 2026-09-14). The whole stella system command group (migrations-run, migrations-status, migrations-verify) was deleted together with the central migration-plugin mechanism it drove (IMigrationModulePlugin, plugin-directory and STELLAOPS_MIGRATION_PLUGIN* discovery, MigrationModuleRegistry, ReleaseMigrationRunner). The CLI no longer references StellaOps.Platform.Persistence. There is no manual or DR migration applier.

(The heading avoids / on purpose: slash characters produce different heading anchors in different Markdown renderers, which silently breaks the table-of-contents link above.)

What replaces it

Platform Migration Admin API — RETIRED

Retired (SPRINT_20260722_026 CM-2, 2026-08-02). The central migration admin API (/api/v1/admin/migrations/*) and /api/v1/admin/seed-demo no longer exist — the endpoints, the gateway route, and their tests were deleted. Migration status is each service’s own doctor db.migration-status check (GET /doctor/<service>/checks); schema convergence is each service’s startup migrations. The local CLI applier that survived this retirement was itself deleted on 2026-09-14 (see above).

admin seed-demo — REMOVED

Removed (SPRINT_20260722_026 CM-2, 2026-08-18). This command was a third face of the central migrator that the 2026-08-02 retirement missed: before seeding it ran startup-category migrations for every module in MigrationModuleRegistry against one connection, so --confirm — documented as confirming demo-data insertion — also authorised central cross-database schema convergence. Its demo half had already been made inert by the §2.11 purge (every S001_demo_seed.sql now sits under _archived/ and is not embedded). There is no replacement and none is needed: schema convergence is each service’s startup migrations (§2.7) and the sanctioned QA seeding path is stella qa-seed. The stella system migrations-* group that this note used to name as the manual DR applier was deleted on 2026-09-14 (SPRINT_20260722_021 PLT-4); MigrationModuleRegistry went with it.

stella scan diff

Compare ELF binaries between two container images using section hashes.

Synopsis

stella scan diff --base <image-ref> --target <image-ref> [options]

Options

OptionDescription
--base, -bBase image reference (tag or digest).
--target, -tTarget image reference (tag or digest).
--mode, -mAnalysis mode: elf, pe, auto (default: auto, currently uses ELF).
--emit-dsse, -dDirectory for DSSE attestation output.
--signing-keyPath to ECDSA private key (PEM) for DSSE signing.
--format, -fOutput format: table, json, summary (default: table).
--platform, -pPlatform filter (e.g., linux/amd64).
--include-unchangedInclude unchanged binaries in output.
--sectionsSections to analyze (comma-separated or repeatable).
--registry-authPath to Docker config for registry authentication.
--timeoutTimeout in seconds (default: 300).
--verbose, -vEnable verbose output.

Note: --emit-dsse requires --signing-key to sign the DSSE envelope.

Examples

# Basic comparison
stella scan diff --base myapp:1.0.0 --target myapp:1.0.1

# DSSE output with signing key
stella scan diff --base myapp:1.0.0 --target myapp:1.0.1 \
  --mode=elf --emit-dsse=./attestations --signing-key=./keys/binarydiff.pem

# JSON output for automation
stella scan diff --base myapp:1.0.0 --target myapp:1.0.1 --format=json > diff.json

# Specific platform
stella scan diff --base myapp:1.0.0 --target myapp:1.0.1 --platform=linux/amd64

Output

DSSE output produces two files per platform:

attestations/
  linux-amd64-binarydiff.dsse.json
  linux-amd64-binarydiff.payload.json

See also: docs/modules/scanner/binary-diff-attestation.md.

stella guard run

Collect bounded source files and run the server-owned Integrations AI Code Guard analysis. The CLI is a thin adapter that gathers bounded source input and posts it. It does not implement analyzers.

Synopsis

stella guard run [<path>] [options]
stella guard status [--format json|text]

<path> is the source file or directory to submit. It defaults to ..

Options (run)

OptionDescription
--policy, -pAI Code Guard YAML configuration file (conventionally .stellaops.yml).
--format, -fOutput format: json (default), text, sarif, gitlab.
--output, -oWrite the report to a file instead of stdout.
--ownerRepository owner sent to the Integrations contract (default: local).
--repoRepository name (defaults to the target directory or file name).
--commitCommit SHA or immutable revision identifier (default: working-tree).
--exclude, -eSimple wildcard path patterns to exclude (repeatable).
--serverIntegrations API base URL override.
--sealedReserved for a future offline analyzer bundle; currently fails closed.
--verbose, -vEnable verbose output.

Options (status)

OptionDescription
--format, -fOutput format: json (default) or text.
--verbose, -vEnable verbose output.

stella guard status describes the CLI/server contract only. It does not call the server, so it reports liveReadinessChecked: false and never proves that the backend is reachable.

Collection bounds

run fails closed rather than truncating. It refuses any single source or policy file over 1 MiB, a total payload over 10 MiB, more than 1000 collected files, or more than 10000 traversed entries. .git, .nuget, bin, node_modules, obj and vendor directories are skipped, and symlinks and junctions are never followed.

Exit codes

CodeMeaning
0Pass
1Warning or fail findings
10Input error (bad path, bad format, no eligible files, --sealed)
11Network error
12Analysis error (pending or error status)
99Unknown error

Examples

# Analyse the working tree and write SARIF
stella guard run --policy .stellaops.yml --format sarif --output guard.sarif

# Analyse one directory, attributed to a commit, excluding fixtures
stella guard run ./src --owner acme --repo billing --commit "$GIT_SHA" --exclude "**/testdata/*"

# Describe the contract without calling the server
stella guard status --format text

stella image inspect

Inspect OCI image manifests and layers.

Synopsis

stella image inspect <reference> [options]

Options

OptionDescription
--resolve-index, -rResolve multi-arch index to platform manifests (default: true).
--print-layers, -lInclude layer details in output (default: true).
--platform, -pPlatform filter (e.g., linux/amd64).
--output, -oOutput format: table, json (default: table).
--timeoutTimeout in seconds (default: 60).
--verbose, -vEnable verbose output.

Examples

# Basic inspection
stella image inspect nginx:latest

# JSON output
stella image inspect nginx:latest --output json

# Filter to a single platform
stella image inspect nginx:latest --platform linux/amd64

# Local registry over HTTP
stella image inspect http://localhost:5000/myapp:1.0.0

Exit codes

CodeMeaning
0Success
1Image not found
2Error (auth, network, invalid input, timeout)

stella setup

Installation-scoped control-plane bootstrap for the running StellaOps platform.

Synopsis

stella setup [--config <path>] [--non-interactive]
stella setup run [options]
stella setup resume [--session <id>]
stella setup status [--session <id>] [--json]
stella setup reset [--step <step-id> | --all] [--force]
stella setup validate --config <path>

Options

Options are scoped to the command that declares them. They are not inherited by subcommands: --config and --non-interactive belong to bare stella setup (and --config to validate), so stella setup run --config <path> is rejected with Unrecognized command or argument '--config'.

OptionWhere it is acceptedDescription
--config, -csetup, validatePath to the YAML configuration file used to seed setup draft values. Required by validate.
--non-interactive, -ysetupRun without prompts.
--step, -srun, resetLimit the operation to one supported control-plane step.
--skiprunSkip the named steps. Repeatable.
--dry-runrunValidate configuration without applying changes.
--force, -frun, resetrun re-runs already completed steps; reset skips confirmation prompts.
--allresetReset all setup state.
--sessionresume, statusUse an explicit session id instead of the latest.
--jsonstatusEmit machine-readable session state with sanitized draftValues and retained-secret secretDrafts metadata.
--verbose, -vallEnable verbose output.

Available Steps

Step IDNameRequiredDescription
databasePostgreSQL DatabaseYesConfigure database connection.
cacheValkey/Redis CacheYesConfigure cache connection.
migrationsDatabase MigrationsYesConverge the required schema migrations.
adminAdmin BootstrapYesEnsure the bootstrap administrator exists.
cryptoCrypto ProfileYesValidate and apply the selected crypto profile.

The pre-release step aliases valkey, authority, and users were removed; --step and --skip accept only the step IDs above and reject unknown names.

Former setup targets such as vault, settingsstore, registry, scm, notify, telemetry, llm, sources, environments, and agents are not setup steps: --step and --skip reject them as unknown step names, like any other unknown name. Configure those integrations on the authenticated onboarding surfaces after bootstrap.

Examples

# Run the installation bootstrap
stella setup run

# Probe one step only
stella setup run --step database --dry-run

# Seed draft values from a config file (--config belongs to bare `setup`, not to `run`)
stella setup --config ./setup.yaml --non-interactive

# Check a config file without running setup
stella setup validate --config ./setup.yaml

# Resume and inspect status
stella setup resume
stella setup status --json

# Reset the installation session
stella setup reset --all --force

stella setup reset resets installation-session state only. It does not reset, rotate, or unlock an existing Authority admin password. For local compose source-checkout recovery, use devops/compose/scripts/authority-password-set.ps1 or authority-password-set.sh.

After stella setup, use the authenticated integration/onboarding surfaces instead of more setup steps:

stella config integrations bootstrap local
stella config integrations bootstrap local --include-gitlab
stella config integrations bootstrap local --include-gitlab --include-gitlab-registry

# Production or customer-managed systems still use BYO-secret onboarding
stella config integrations secrets targets
stella config integrations secrets upsert-bundle \
  --bundle gitlab-server \
  --target <vault-integration-id> \
  --path gitlab/server \
  --entry access-token=glpat-...

Setup-session secret handling:

stella config integrations bootstrap local

Bootstrap the Stella-owned local compose fixture catalog from the CLI.

Synopsis

stella config integrations bootstrap local [--include-gitlab] [--include-gitlab-registry] [--format table|json]

Options

OptionDescription
--include-gitlabInclude the owned local GitLab Server and GitLab CI fixtures. The CLI mints and stages the local PAT into Vault automatically.
--include-gitlab-registryInclude the optional local GitLab container registry fixture. Requires the heavy GitLab compose profile with GITLAB_ENABLE_REGISTRY=true.
--formatOutput format: table or json (default: table).
--verbose, -vEnable verbose output.

Examples

# Default 13-entry local fixture catalog
stella config integrations bootstrap local

# Add GitLab Server and GitLab CI
stella config integrations bootstrap local --include-gitlab

# Add the optional GitLab registry and emit machine-readable results
stella config integrations bootstrap local --include-gitlab --include-gitlab-registry --format json

Contract

stella advise ask

Ask questions to the AdvisoryAI assistant.

Synopsis

stella advise ask <query> [options]

Options

OptionDescription
--image, -iContainer image reference to scope the query.
--digest, -dArtifact digest to scope the query.
--environment, -eEnvironment context (e.g., production, staging).
--conversation-id, -cConversation ID for follow-up queries.
--fileRead batch queries from newline-delimited JSON (.jsonl).
--format, -fOutput format: table, json, markdown.
--output, -oWrite output to file.
--tenantTenant to act in (see Tenant selection).
--verbose, -vEnable verbose output.

Tenant selection. Every advise chat verb (ask, chat-doctor, chat-settings get|update|clear, export) takes --tenant, sent as the X-StellaOps-TenantId header. The router gateway honours it for a global administrator (ADR-023) and, when its tenant override is enabled, for a tenant in the token’s stellaops:allowed_tenants; it signs the selected tenant into the identity envelope that AdvisoryAI reads. Any other caller stays in the token’s tenant. No chat verb has a --user option: AdvisoryAI takes the user from the identity envelope’s subject only, so chat settings with --scope user and conversations always belong to the signed-in user.

AdvisoryAI always returns the evidence links it assembled, and proposed actions are suggestions that the CLI never executes; ask has no option to change either.

Prerequisites

AdvisoryAI owns model readiness; the CLI needs no local model keys. When the chat runtime is unavailable, ask prints Chat service unavailable: <reason> and exits non-zero. Run stella advise chat-doctor to see the model gateway status.

Examples

# Basic query
stella advise ask "What vulnerabilities affect CVE-2024-1234?"

# Scoped to an image
stella advise ask "Is this image safe for production?" --image myapp:1.0.0

# Scoped to an artifact digest
stella advise ask "Explain the risk of log4j in this artifact" \
  --digest sha256:abc123...

# JSON output for automation
stella advise ask "List critical vulnerabilities" --format json > report.json

stella advise chat-doctor

Check AdvisoryAI chat quota and configuration status.

Synopsis

stella advise chat-doctor [options]

Options

OptionDescription
--format, -fOutput format: table, json.
--output, -oWrite output to file.
--tenantTenant to act in (see Tenant selection).
--verbose, -vEnable verbose output.

Examples

# Check configuration status
stella advise chat-doctor

# JSON output
stella advise chat-doctor --format json

stella advise chat-settings

Manage AdvisoryAI chat settings and quotas.

Synopsis

stella advise chat-settings get [options]
stella advise chat-settings update [options]
stella advise chat-settings clear [options]

Get Options

get (and bare chat-settings) shows the effective settings: the global defaults with the tenant overrides and the signed-in user’s overrides applied. AdvisoryAI has no per-scope read, so get takes no --scope.

OptionDescription
--format, -fOutput format: table, json.
--output, -oWrite output to file.
--tenantTenant to act in (see Tenant selection).

Update Options

OptionDescription
--scope, -sSettings scope: user, tenant (default: user).
--requests-per-minuteSet requests per minute quota.
--requests-per-daySet requests per day quota.
--tokens-per-daySet tokens per day quota.
--tool-calls-per-daySet tool calls per day quota.
--allow-all-toolsAllow all tools (true/false).
--allowed-toolsSet allowed tools (comma-separated).
--format, -fOutput format: table, json.
--tenantTenant to act in (see Tenant selection).

Clear Options

OptionDescription
--scope, -sSettings scope: user, tenant (default: user).
--tenantTenant to act in (see Tenant selection).

--scope user always addresses the signed-in user’s own overrides.

Examples

# View effective settings
stella advise chat-settings get

# View effective settings as JSON
stella advise chat-settings get --format json

# Update quotas
stella advise chat-settings update --requests-per-day 100

# Clear user overrides
stella advise chat-settings clear --scope user

stella advise export

Export AdvisoryAI conversation history.

Synopsis

stella advise export [options]

Options

OptionDescription
--conversation-id, -cExport one conversation. Without it, the command lists the signed-in user’s conversations and exports each one.
--tenantTenant to act in (see Tenant selection).
--limitMaximum number of conversations to export (default: 100).
--format, -fOutput format: json, table, markdown (default: json).
--output, -oWrite the export to a file.
--verbose, -vEnable verbose output.

Each exported conversation carries the tenantId and userId that AdvisoryAI stored with it. The export’s top-level tenantId repeats the --tenant value when one was given.

Examples

# Export your conversations as JSON
stella advise export --output conversations.json

# Export one conversation as Markdown
stella advise export --conversation-id conv-123 --format markdown

Search AdvisoryAI Knowledge Search (AKS) across docs, API operations, and Doctor checks.

Synopsis

stella search "<query>" [options]

Options

OptionDescription
--typeResult type filter: docs, api, doctor (repeatable or comma-separated).
--productProduct filter.
--versionVersion filter.
--serviceService filter (especially for API operations).
--tagTag filter (repeatable or comma-separated).
--kTop result count (1..100).
--jsonEmit stable machine-readable payload.
--verbose, -vInclude debug scoring fields when available.

Examples

stella search "docker login fails with x509 unknown authority"
stella search "endpoint for agent registration token" --type api --json
stella search "OIDC readiness checks" --type doctor --k 20

stella doctor suggest

Use AKS to suggest Doctor checks, docs, and API references for a symptom string.

Synopsis

stella doctor suggest "<symptom-or-error>" [options]

Options

OptionDescription
--productProduct filter.
--versionVersion filter.
--kTop result count (1..100).
--jsonEmit stable machine-readable payload.
--verbose, -vInclude debug scoring fields when available.

Examples

stella doctor suggest "database unavailable and timeout expired"
stella doctor suggest "gateway returns 404 on known route" --json

stella advisoryai index rebuild

Local repo build and use of the Stella CLI

When working from this repository, do not assume stella is already installed on PATH. Use one of these local workflows first:

# Run the CLI directly from source
dotnet run --project "src/Cli/StellaOps.Cli/StellaOps.Cli.csproj" -- --help

# Publish a reusable local binary
dotnet publish "src/Cli/StellaOps.Cli/StellaOps.Cli.csproj" -c Release -o ".artifacts/stella-cli"

# Windows
.artifacts/stella-cli/StellaOps.Cli.exe --help

# Linux/macOS
./.artifacts/stella-cli/StellaOps.Cli --help

Related docs:

Rebuild the AdvisoryAI deterministic knowledge index from local markdown, OpenAPI specs, and Doctor metadata.

Local source-checkout note:

Synopsis

stella advisoryai index rebuild [--json] [--verbose]

Examples

stella advisoryai index rebuild
stella advisoryai index rebuild --json

stella advisoryai sources prepare

Prepare OpenAPI and Doctor source artifacts for AdvisoryAI Knowledge Search (AKS) index rebuild. Doctor controls output is enriched from configured seed plus locally discovered Doctor checks (when Doctor engine services are available), providing fallback metadata for AdvisoryAI ingestion.

Generate the reviewed docs manifest separately with python tools/scripts/validate/check-advisoryai-docs-manifest.py --write. The CLI does not write that manifest or enumerate Markdown pages.

Requirements:

Synopsis

stella advisoryai sources prepare [options]

Options

OptionDescription
--repo-rootRepository root used to resolve source paths.
--openapi-outputOutput path for aggregated OpenAPI JSON artifact.
--doctor-seedInput doctor seed JSON path.
--doctor-controls-outputOutput path for doctor controls projection JSON (controls + fallback metadata).
--overwriteOverwrite existing output files.
--jsonEmit stable machine-readable summary.

Examples

export STELLAOPS_BACKEND_URL="http://127.0.0.1:10451"
python tools/scripts/validate/check-advisoryai-docs-manifest.py --write
stella advisoryai sources prepare --json
stella advisoryai sources prepare --repo-root . --openapi-output devops/compose/openapi_current.json