Repository navigation
Two Command Drill
The promise: nself init && nself start gives a working backend on a clean Linux host, with no questions asked. The drill proves it every night and on every change to its own files.
In an empty temp directory, with CI, GITHUB_ACTIONS and NSELF_NONINTERACTIVE unset for the drilled commands:
| Leg | How the commands run | Pass means |
|---|---|---|
| A | stdin /dev/null, output to a file (no TTY) |
init (120 s) and start (600 s) exit 0 |
| B | a pseudo-TTY (script -qec) that never receives input |
init and start finish inside the same timeouts and exit 0 |
A prompt cannot be answered in either leg. In leg A it hits end of file and fails. In leg B it blocks until the timeout kills it, and the drill reports prompt_detected: true.
Health is mode agnostic: poll nself status until it exits 0 (within 600 s), then send one { __typename } query to http://localhost:8080/v1/graphql with the project's admin secret. Leg B always runs after leg A's stack is stopped (nself stop, then docker compose down -v --remove-orphans in the drill directory).
Seconds from the start of nself init (leg A) to the first healthy nself status. It is written as a perfbench/v1 result and is informational. It never gates a merge or a release.
.github/workflows/two-command-drill.yml runs on GitHub-hosted ubuntu-latest (no secrets, contents: read, actions pinned by SHA):
- nightly at 03:17 UTC, on
workflow_dispatch, and on pull requests that touchscripts/drill/**or the workflow; - a matrix of two legs:
NSELF_V15unset (v1.4 mode) andNSELF_V15=1(v1.5 mode); - it builds
nselffrom the ref, runs the drill, and uploads one artifact per matrix leg.
A failure caused by runner availability (image pulls, runner start) is re-run, not counted.
| File | Content |
|---|---|
drill.json |
{schema: "two-command-drill/v1", mode, time_to_healthy_s, graphql_ok, prompt_detected, leg_a, leg_b} |
perfbench.json |
perfbench/v1, scenario two-command-drill, one metric time_to_healthy in s, runs 1 |
*.log |
output of each leg's init and start, and of the cleanup |
If the stack never got healthy, time_to_healthy_s is null and no perfbench.json is written.
On a Linux host with Docker, jq and coreutils timeout:
go build -mod=vendor -o /tmp/nself ./cmd/nself
NSELF_BIN=/tmp/nself bash scripts/drill/two-command.sh --host # v1.4 mode
NSELF_V15=1 NSELF_BIN=/tmp/nself bash scripts/drill/two-command.sh --host # v1.5 modeResults go to ./drill-out (override with DRILL_OUT). The drill starts the stack on ports 80, 443, 4000, 5432 and 8080 and removes it afterwards, so stop other stacks first. Never run it against a server.
Check the detector itself, with no Docker:
bash scripts/drill/two-command.sh --self-testIt runs scripts/drill/fixtures/prompt.sh (a command that does read -r x) and must report a prompt, runs fixtures/ok.sh and must not, and validates a synthetic drill.json and perfbench.json with jq.
Tunables: DRILL_INIT_TIMEOUT (120), DRILL_START_TIMEOUT (600), DRILL_HEALTH_TIMEOUT (600), DRILL_GRAPHQL_URL.
Getting Started
Commands
- Commands, Overview
- Lifecycle: cmd-init · cmd-build · cmd-start · cmd-stop · cmd-restart · cmd-dev
- Monitoring: cmd-status · cmd-logs · cmd-health · cmd-urls · cmd-doctor · cmd-monitor · cmd-alerts · cmd-sentry · cmd-watchdog
- Data: cmd-db · cmd-backup · cmd-dr · cmd-queue · cmd-webhooks
- Config: cmd-config · cmd-service · cmd-env · cmd-promote
- Networking: cmd-ssl · cmd-trust · cmd-dns-setup
- Security: cmd-access · cmd-security · cmd-secrets
- Tenancy: cmd-tenant · cmd-billing
- Plugins: cmd-plugin · cmd-license · cmd-dogfood (extracted, CLI-R11) · cmd-k8s (extracted, CLI-R11) · cmd-encryption (extracted, CLI-R11) · cmd-waf (extracted, CLI-R11) · cmd-federation (extracted, CLI-R11) · cmd-mail (extracted, CLI-R11) · cmd-dlq (extracted, CLI-R11)
- AI: cmd-ai · cmd-claw · cmd-model
- Templates: cmd-template
- Utilities: cmd-exec · cmd-clean · cmd-reset · cmd-update · cmd-upgrade · cmd-version · cmd-admin · cmd-migrate · cmd-migrate-firebase · cmd-migrate-supabase · cmd-completion
Features
- Features, Overview
- Feature-Auth
- Feature-Storage
- Feature-Search
- Feature-Functions
- Feature-Email
- Feature-Monitoring
- Feature-Plugins
- Feature-nClaw, AI Assistant
- Feature-nChat, Messaging
- Feature-nFamily, Family Social
- Feature-nCloud, Managed Hosting
- Feature-Memory-Rooms, Knowledge Organization
- Feature-Agent-Dashboard, Agent Metrics
- Feature-Image-Generation, AI Image Generation
Configuration
- Configuration, Overview
- Config-Env-Vars
- Config-Postgres
- Config-Hasura
- Config-Auth
- Config-Nginx
- Shared-Proxy
- Config-Optional-Services
- Config-Custom-Services
- Config-System
Plugins (87 + 10 monitoring)
- Plugin-Overview
- Plugin-Catalog
- Plugin-Install
- Plugin-Licensing
- Plugin-Architecture
- Plugin-Dev-Guide
- Plugin-Migrations-Contract
Free (25)
- plugin-backup
- plugin-content-acquisition
- plugin-content-progress
- plugin-cron
- plugin-donorbox
- plugin-feature-flags
- plugin-github
- plugin-github-runner
- plugin-invitations
- plugin-jobs
- plugin-link-preview
- plugin-mdns
- plugin-mlflow
- plugin-monitoring
- plugin-notifications
- plugin-notify
- plugin-paypal
- plugin-search
- plugin-shopify
- plugin-stripe
- plugin-subtitle-manager
- plugin-tokens
- plugin-torrent-manager
- plugin-vpn
- plugin-webhooks
Pro (62)
- plugin-access-controls
- plugin-activity-feed
- plugin-admin-api
- plugin-analytics
- plugin-auth
- plugin-bots
- plugin-browser
- plugin-calendar
- plugin-cdn
- plugin-chat
- plugin-claw
- plugin-claw-budget
- plugin-claw-news
- plugin-claw-web
- plugin-cloudflare
- plugin-cms
- plugin-compliance
- plugin-ddns
- plugin-devices
- plugin-documents
- plugin-entitlements
- plugin-file-processing
- plugin-game-metadata
- plugin-geocoding
- plugin-geolocation
- plugin-google
- plugin-home
- plugin-idme
- plugin-knowledge-base
- plugin-linkedin
- plugin-livekit
- plugin-media-processing
- plugin-meetings
- plugin-moderation
- plugin-mux
- plugin-object-storage
- plugin-observability
- plugin-photos
- plugin-podcast
- plugin-post
- plugin-realtime
- plugin-retro-gaming
- plugin-rom-discovery
- plugin-social
- plugin-sports
- plugin-support
- plugin-tmdb
- plugin-voice
- plugin-web3
- plugin-workflows
Planned (26)
plugin-auditplugin-blogplugin-checkoutplugin-commerceplugin-drmplugin-exportplugin-flowplugin-importplugin-ldapplugin-mailgunplugin-mediaplugin-oauth-providersplugin-pagesplugin-postmarkplugin-rate-limitplugin-reportsplugin-samlplugin-schedulerplugin-sendgridplugin-ssoplugin-subscriptionplugin-thumbplugin-transcoderplugin-twilioplugin-wafplugin-watermark
Guides
- Guide-Production-Deployment
- Guide-SSL-Setup
- Guide-Multi-Tenancy
- Guide-Security-Hardening
- Guide-Monitoring-Setup
- Guide-Backup-Restore
- Guide-Custom-Services
- Guide-Migration-from-v1
Architecture
- Architecture
- Architecture-Guardrails
- Service-Graph
- Compose-Generation
- Nginx-Generation
- Plugin-Architecture
Reference
Machine interface
-
JSON-Output,
--jsonenvelope -
Command-Registry,
nself help --json - Exit-Codes
- error-codes, Error Codes
-
Compat-V15,
NSELF_V15gate
Licensing
Security
Brand
Operations
- operations/release-cascade, Release Cascade
- operations/self-healing, Self-Healing Schema
- operations/redis-tuning, Redis Pool Tuning
- operations/meilisearch-warmup, MeiliSearch Warm-Up
- operations/jwt-rotation, JWT Key Rotation
- operations/windows-wsl2-setup, Windows / WSL2 Setup
- operations/gemini-oauth-reauth, Gemini OAuth Reauth
Contributing
Admin
- USER-ACTION-QUEUE, Pending Admin Actions
All commands (21)
- A: cmd-add · cmd-admin
- B: cmd-backup · cmd-build
- C: cmd-clean · cmd-config
- D: cmd-db · cmd-deploy · cmd-doctor
- E: cmd-exec
- I: cmd-init
- L: cmd-license · cmd-logs
- M: cmd-mcp
- R: cmd-remove · cmd-reset · cmd-restart
- S: cmd-start · cmd-status · cmd-stop
- U: cmd-update