CLI Reference¶
Complete command-line interface reference.
Global Options¶
| Option | Description |
|---|---|
--help | Show help message |
--version | Show version number |
Commands¶
apply¶
Generate reliability configs from service spec.
| Option | Description |
|---|---|
--push | Push dashboard to Grafana |
--push-ruler | Push alerts to Mimir/Cortex Ruler API |
--output-dir DIR | Custom output directory |
--dry-run | Preview without writing |
--lint | Validate generated alerts with pint |
setup¶
Interactive first-time setup.
| Option | Description |
|---|---|
--quick | Simplified setup (default) |
--advanced | Full configuration wizard |
--test | Test connections only |
--skip-service | Skip first service creation |
portfolio¶
View org-wide SLO health.
| Option | Description |
|---|---|
--format FORMAT | Output: text, json, csv |
--services-dir DIR | Directory to scan |
slo¶
SLO management commands.
| Subcommand | Description |
|---|---|
show | Display SLO definitions |
list | Brief SLO listing |
collect | Query live metrics |
Options for collect:
| Option | Description |
|---|---|
--prometheus-url URL | Prometheus server |
--window DURATION | Query window |
config¶
Configuration management.
| Subcommand | Description |
|---|---|
show | Show current config |
init | Interactive wizard |
set KEY VALUE | Set config value |
Options for show:
| Option | Description |
|---|---|
--reveal-secrets | Show secret values |
plan¶
Preview what would be generated.
validate¶
Validate service spec.
generate-dashboard¶
Generate dashboard only.
| Option | Description |
|---|---|
--push | Push to Grafana |
generate-alerts¶
Generate alerts only.
generate-slo¶
Generate SLO definitions only.
generate-recording-rules¶
Generate recording rules only.
setup-pagerduty¶
Configure PagerDuty for service.
| Option | Description |
|---|---|
--api-key KEY | PagerDuty API key |
--dry-run | Preview changes |
verify¶
Verify declared metrics exist in Prometheus (contract verification).
| Option | Description |
|---|---|
--prometheus-url, -p URL | Target Prometheus URL |
--env ENVIRONMENT | Environment name |
--no-fail | Don't fail on missing metrics |
Exit codes: - 0 = All metrics verified - 1 = Optional metrics missing (warning) - 2 = Critical SLO metrics missing (block)
validate-slo¶
Validate that SLO metrics exist in Prometheus.
| Option | Description |
|---|---|
--env ENVIRONMENT | Environment name |
--format FORMAT | Output: table, json |
--prometheus-url URL | Prometheus server URL |
--demo | Show demo output |
Exit codes: - 0 = All SLO metrics exist - 1 = Some metrics missing - 2 = Critical metrics missing
deps¶
Show service dependencies from multiple sources.
| Option | Description |
|---|---|
--env ENVIRONMENT | Environment name |
--format FORMAT | Output: table, json, dot |
--depth N | Traversal depth (default: 1) |
--providers LIST | Providers: backstage, k8s, prometheus |
--demo | Show demo output |
blast-radius¶
Calculate deployment blast radius and affected services.
| Option | Description |
|---|---|
--env ENVIRONMENT | Environment name |
--format FORMAT | Output: table, json |
--depth N | Traversal depth (default: 2) |
--demo | Show demo output |
Exit codes: - 0 = Low risk (< 5 affected) - 1 = Medium risk (5-15 affected) - 2 = High risk (> 15 affected)
ownership¶
Resolve service ownership from multiple sources.
| Option | Description |
|---|---|
--env ENVIRONMENT | Environment name |
--format FORMAT | Output: table, json |
--backstage-url URL | Backstage catalog URL |
--pagerduty-token TOKEN | PagerDuty API token |
--demo | Show demo output |
identity¶
Service identity resolution and management.
| Subcommand | Description |
|---|---|
resolve NAME | Resolve service to canonical name |
list | List known service identities |
normalize NAME | Show normalization steps |
add-mapping ALIAS CANONICAL | Add identity mapping |
drift¶
Analyze reliability drift for a service.
| Option | Description |
|---|---|
--env ENVIRONMENT | Environment name |
--format FORMAT | Output: table, json |
--prometheus-url URL | Prometheus server URL |
--baseline PERIOD | Baseline period (default: 30d) |
--demo | Show demo output |
check-deploy¶
Check deployment gate based on error budget.
| Option | Description |
|---|---|
--prometheus-url, -p URL | Target Prometheus URL |
--env ENVIRONMENT | Environment name |
--auto-env | Auto-detect environment |
Exit codes: - 0 = Approved (budget healthy) - 1 = Warning (budget 10-20% remaining) - 2 = Blocked (budget < 10% for critical tier)
lint¶
Lint generated Prometheus rules.
Uses pint for validation.
init¶
Create new service spec from template.
| Option | Description |
|---|---|
--name NAME | Service name |
--team TEAM | Team name |
--template TEMPLATE | Template name |
list-templates¶
Show available templates.
list-services¶
List available services from demo data.
list-teams¶
List available teams from demo data.
list-environments¶
List available environment configurations.
| Option | Description |
|---|---|
--service FILE | Service YAML file to scope search |
--directory DIR | Directory to search for environments |
diff-envs¶
Compare configurations between two environments.
| Option | Description |
|---|---|
--show-all | Show all fields, not just differences |
validate-env¶
Validate an environment configuration.
| Option | Description |
|---|---|
--service FILE | Service file to test against |
--directory DIR | Directory containing environments |
--strict | Treat warnings as errors |
validate-spec¶
Validate service.yaml against OPA/Rego policies.
| Option | Description |
|---|---|
--policy-dir DIR | Directory containing .rego policies |
--strict | Treat warnings as errors |
Exit codes: - 0 = All policies pass - 1 = Policy violations found
validate-metadata¶
Validate Prometheus rule metadata (labels, annotations, URLs).
| Option | Description |
|---|---|
--check-urls | Verify runbook URLs are reachable |
--strict | Treat warnings as errors |
generate-loki-alerts¶
Generate Loki LogQL alert rules from service spec.
| Option | Description |
|---|---|
--output-dir DIR | Output directory |
--dry-run | Preview without writing |
secrets¶
Secret management commands.
| Subcommand | Description |
|---|---|
list | List available secrets |
verify | Verify required secrets |
set PATH | Set a secret |
get PATH | Get a secret |
migrate SOURCE TARGET | Migrate secrets |
Environment Variables¶
| Variable | Description |
|---|---|
PROMETHEUS_URL | Prometheus server URL (for verify command) |
PROMETHEUS_USERNAME | Prometheus basic auth username |
PROMETHEUS_PASSWORD | Prometheus basic auth password |
NTHLAYER_PROMETHEUS_URL | Prometheus server URL (legacy) |
NTHLAYER_GRAFANA_URL | Grafana server URL |
NTHLAYER_GRAFANA_API_KEY | Grafana API key |
NTHLAYER_GRAFANA_ORG_ID | Grafana organization ID |
MIMIR_RULER_URL | Mimir/Cortex Ruler API URL |
MIMIR_TENANT_ID | Mimir tenant ID (multi-tenant) |
MIMIR_API_KEY | Mimir API key (if auth required) |
PAGERDUTY_API_KEY | PagerDuty API key |
NTHLAYER_PROFILE | Config profile to use |
Exit Codes¶
| Code | Meaning |
|---|---|
0 | Success |
1 | General error |
2 | Invalid arguments |
3 | Configuration error |
4 | Connection error |