Repository navigation
Contributing
Thank you for your interest in contributing to ɳSelf. This guide covers everything from filing a bug report to landing a complex feature.
- Read the Code of Conduct. All contributors are expected to follow it.
- Read the Governance model, it explains how decisions get made.
- Check open issues and Discussions before opening a new one.
- Search existing issues first. Your bug may already be tracked.
- Open a new issue using the Bug Report template.
- Include: ɳSelf version (
nself version), OS, Docker version, exact steps to reproduce, and actual vs expected behaviour. - Attach relevant logs:
nself logsornself doctor.
- Check existing feature requests.
- Open a new issue using the Feature Request template.
- Describe the use case, not just the solution. This helps evaluate alternatives.
- For significant changes, start a Discussion first.
- Go 1.22 or later (
go version) - GNU Make
- Docker + Docker Compose (for integration tests)
-
golangci-lint(optional but recommended:brew install golangci-lint)
git clone https://github.com/nself-org/cli.git
cd cli
make build # builds ./nself binary
make test # runs all unit tests (no Docker required)
make install # installs binary to /usr/local/bin/nselfIntegration tests require a running Docker environment:
INTEGRATION=1 make testThis repo vendors all Go dependencies. After changing go.mod:
go mod vendor
git add vendor/| Branch | Purpose |
|---|---|
main |
Latest stable release |
feat/xxx |
New features |
fix/xxx |
Bug fixes |
chore/xxx |
Maintenance (deps, tooling) |
docs/xxx |
Documentation only |
Always branch from main. Target main in your PR.
# 1. Fork and clone
git clone https://github.com/YOUR-USERNAME/cli.git
cd cli
# 2. Create a branch
git checkout -b feat/my-feature
# 3. Make changes, then verify
make test
make vet
gofmt -l . # must produce no output
# 4. Commit with a conventional message
git commit -m "feat: add my feature"
# 5. Push and open a PR
git push origin feat/my-feature- Fill in the PR template completely.
- All CI checks must pass before review.
- One review from a CODEOWNER is required to merge (see CODEOWNERS).
-
Format:
gofmt, run viamake fmt. CI fails on unformatted code. -
Lint:
golangci-lint runmust pass with zero warnings. - Tests: all existing tests must pass. New features need matching tests.
-
Errors: wrap with context,
fmt.Errorf("doing X: %w", err). -
Context: accept
context.Contextas first parameter in I/O functions. -
No panics in production code paths. No
os.Exit()outsidemain.go. -
User output: use
internal/ui, notfmt.Printlndirectly. -
Layering: imports point down and orphan packages are rejected by
internal/repoqatests. See Architecture-Guardrails before adding a package or a cross-package import.
The Coverage workflow enforces two kinds of floor, and both fail closed.
-
Whole tree: total statement coverage must stay at or above
COVERAGE_FLOORin.github/workflows/coverage.yml. -
Per package: every package must stay at or above its line in
.github/coverage-floors.txt.tools/covfloorchecks the singlecoverage.outthe workflow produces. A package below its floor, a line for a package that has no statements any more, a package with no line, and an unreadable profile or floors file all fail the job.
The floors file is data and holds every package's floor, measured on the Linux runner. This page does not copy the numbers; read the file.
Check locally before pushing:
go test -mod=vendor -coverprofile=coverage.out ./...
go run -mod=vendor ./tools/covfloor -profile coverage.out -floors .github/coverage-floors.txt -strictLocal macOS numbers can differ from Linux (for example internal/trust), so the Linux workflow is the one that counts.
Rules:
- A new package adds its line with
go run -mod=vendor ./tools/covfloor -profile coverage.out -floors .github/coverage-floors.txt -write. It appends the missing packages at the measured value minus 2 points and never changes an existing line. - Lowering a floor needs a PR justification. Writing the test is preferred over lowering the floor.
- Delete a package's line in the same change that deletes the package.
Use Conventional Commits:
-
feat:, new feature -
fix:, bug fix -
chore:, maintenance (deps, CI) -
docs:, documentation only -
test:, tests only -
refactor:, no behaviour change
Breaking changes: add ! after type (feat!:) and document in the PR body.
The CLI loads plugins from plugins/ (free) and bundles/ (paid). To add or modify a plugin:
- Read
.claude/docs/PLUGIN_SYSTEM_SPEC.md, plugin manifest schema and loader pipeline. - Create or update the plugin directory with a valid
plugin.jsonmanifest. - Add integration tests that verify
nself plugin install <name>succeeds. - File a PR to the
pluginsrepo, not tocli(unless you are changing the plugin loader itself).
See Plugin Dev Guide for the complete walkthrough.
Do not open a public issue for security vulnerabilities. Follow the process in SECURITY.md.
The CLI's internationalisation strategy is under review. Translation contributions are deferred until the strategy decision is documented. Watch Discussions for updates.
- GitHub Discussions, preferred for questions
- Community: nself.org
- GOVERNANCE.md, decision model
- ENFORCEMENT.md, code of conduct enforcement
- CODEOWNERS, who reviews what
- Dev-Setup, local environment setup
- Plugin-Dev-Guide, building a new plugin
- Release-Process, release workflow
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