Verify that this nSelf installation runs the nSelf CLI stack correctly — the nSelf-First doctrine in action. Used in CI smoke tests and production audits.
# Run the dogfood verification suite
nself dogfood
# Full audit with detailed report
nself dogfood audit
# Generate a shareable report
nself dogfood reportnself dogfood [SUBCOMMAND] [FLAGS]The nSelf-First doctrine requires that every nSelf-powered project starts and manages its backend via the nself CLI — never through raw docker compose or SSH mutations. The dogfood command verifies that this installation is compliant: all running containers are managed by nself, the compose files carry the GENERATED BY nself build header, and no side-channel config has been applied.
This command is internal — it is used in nSelf's own CI smoke tests (verifying that nself.org is running on the nSelf stack) and can be used by operators to confirm that their deployment did not drift from the CLI-managed state.
audit runs a deeper check: it inspects every docker-compose.yml in the project for the generated header, verifies no orphaned containers exist outside the nSelf namespace, and checks that all custom services use the CS_N slot convention.
report produces a JSON or Markdown report summarising the audit findings. Useful for compliance records or sharing with your team.
Quick smoke test: verifies the core stack is CLI-managed and healthy.
nself dogfood
# ✓ docker-compose.yml is nself-generated
# ✓ All containers are CLI-managed (no orphans)
# ✓ postgres healthy
# ✓ hasura healthy
# ✓ auth healthy
# ✓ nginx healthy
# ✓ nSelf-First doctrine: compliantDeep compliance audit: checks all compose files, custom services, and plugin config.
nself dogfood audit
# Compose files
# ✓ docker-compose.yml — nself-generated header present
# ✓ docker-compose.override.yml — nself-generated header present
# ✗ docker-compose.local.yml — missing generated header (manual edit detected)
#
# Custom services
# ✓ CS_1 ping_api — registered in nself config
# ✗ CS_2 my_service — running but not in CS_N config (side-channel detected)
#
# Orphaned containers
# ✗ old_redis — running outside nSelf namespace
#
# Verdict: 2 violations detected. Run 'nself dogfood audit --fix' to remediate.Generate a formatted compliance report.
# Markdown report
nself dogfood report
# JSON report for CI integration
nself dogfood report --json
# Save to file
nself dogfood report --json > dogfood-report.json| Flag | Type | Default | Description |
|---|---|---|---|
--fix | bool | false | Attempt to remediate violations (audit subcommand) |
--json | bool | false | Output as JSON |
--env | string | current | Environment to audit (local, staging, prod) |
--strict | bool | false | Fail on warnings as well as errors |
# In GitHub Actions after deploy:
- name: Dogfood verification
run: nself dogfood --json > dogfood.json && cat dogfood.jsonnself dogfood audit --env prod --strict
# Exits 1 if any violation (including warnings) is foundnself dogfood report --json | jq '{
timestamp: .timestamp,
compliant: .compliant,
violations: [.checks[] | select(.status != "pass")]
}' > compliance-$(date +%F).json0 — fully compliant with the nSelf-First doctrine1 — violations detected2 — could not connect to Docker or read compose files