Skip to content

Commands Overview

NthLayer provides a comprehensive CLI for managing your reliability stack.

Generation Commands

Command Description
nthlayer apply Generate all configs from service spec
nthlayer plan Preview what resources would be generated (dry-run)
nthlayer generate-dashboard Generate Grafana dashboard
nthlayer generate-alerts Generate Prometheus alerts
nthlayer generate-recording-rules Generate Prometheus recording rules
nthlayer generate-loki-alerts Generate Loki LogQL alerts

Validation Commands

Command Description
nthlayer verify Verify declared metrics exist (contract verification)
nthlayer validate-spec Validate service.yaml against OPA policies
nthlayer validate-metadata Validate rule metadata (labels, annotations, URLs)
nthlayer validate-slo Validate SLO metrics exist in Prometheus
nthlayer lint Lint Prometheus alert rules with pint

Dependency Intelligence

Command Description
nthlayer deps Show service dependencies
nthlayer blast-radius Calculate deployment blast radius
nthlayer ownership Show service ownership attribution
nthlayer identity Service identity resolution and management

SLO & Error Budget

Command Description
nthlayer slo SLO and error budget commands
nthlayer portfolio View org-wide SLO health
nthlayer check-deploy Check deployment gate (error budget validation)
nthlayer drift Analyze reliability drift for a service

Environment Management

Command Description
nthlayer environments List available environments
nthlayer diff-envs Compare configurations between environments
nthlayer validate-env Validate an environment configuration

Setup & Configuration

Command Description
nthlayer setup Interactive first-time setup
nthlayer init Initialize new NthLayer service
nthlayer config Configuration management
nthlayer secrets Secrets management

Quick Reference

# Generate configs
nthlayer apply service.yaml

# Validate before deployment
nthlayer verify service.yaml --prometheus-url http://prometheus:9090
nthlayer validate-slo service.yaml

# View dependencies
nthlayer deps service.yaml
nthlayer blast-radius service.yaml

# Check deployment readiness
nthlayer check-deploy service.yaml

# View portfolio health
nthlayer portfolio

# Check SLO status
nthlayer slo show service.yaml

Getting Help

nthlayer --help
nthlayer <command> --help

See Also