examples - nself-org/cli GitHub Wiki
This document provides comprehensive examples of every nself v0.3.9 command with actual output formatting.
$ nself initOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Welcome to nself - Modern Full-Stack Platform โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Initializing project: myproject
[INFO] Domain: localhost
[INFO] Creating environment configuration...
[SUCCESS] Created .env.local
[INFO] Creating project structure...
[SUCCESS] Created directory: hasura/migrations
[SUCCESS] Created directory: hasura/metadata
[SUCCESS] Created directory: hasura/seeds
[SUCCESS] Created directory: nginx/conf.d
[SUCCESS] Created directory: nginx/ssl
[SUCCESS] Created directory: postgres/init
[INFO] Creating default configurations...
[SUCCESS] Created nginx/nginx.conf
[SUCCESS] Created postgres/init/00-init.sql
[SUCCESS] Created schema.dbml
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ INITIALIZATION COMPLETE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Next steps:
1. Review configuration: cat .env.local
2. Build infrastructure: nself build
3. Start services: nself up
For production deployment: nself prod
$ nself init myapp api.example.comOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Welcome to nself - Modern Full-Stack Platform โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Initializing project: myapp
[INFO] Domain: api.example.com
[WARNING] Custom domain detected. Ensure DNS is configured for:
- api.api.example.com (GraphQL API)
- auth.api.example.com (Authentication)
- storage.api.example.com (File storage)
[INFO] Creating environment configuration...
[SUCCESS] Created .env.local with custom settings
...
$ nself initOutput (when .env.local exists):
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Welcome to nself - Modern Full-Stack Platform โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[WARNING] Project already initialized (.env.local exists)
Reinitialize project? (y/N) [10s timeout]: y
[INFO] Backed up existing configuration to .env.local.backup
[INFO] Initializing project: myproject
...
$ nself buildOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BUILDING INFRASTRUCTURE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Loading configuration from .env.local...
[SUCCESS] Configuration loaded
โ Generating SSL certificates...
[SUCCESS] Generated SSL certificate for *.localhost
[SUCCESS] Certificate trusted in system keychain
โ Generating docker-compose.yml...
[INFO] Configuring services:
โ PostgreSQL (port 5432)
โ Hasura GraphQL (port 8080)
โ Authentication (port 4000)
โ MinIO Storage (port 9000)
โ Nginx Proxy (ports 80, 443)
โ Redis Cache (port 6379) [ENABLED]
โ Functions (disabled)
โ Dashboard (disabled)
[SUCCESS] Generated docker-compose.yml
โ Building Docker images...
[INFO] Building postgres:15-alpine...
[SUCCESS] postgres:15-alpine ready
[INFO] Building hasura/graphql-engine:v2.35.0...
[SUCCESS] hasura/graphql-engine:v2.35.0 ready
[INFO] Building nhost/hasura-auth:latest...
[SUCCESS] nhost/hasura-auth:latest ready
[INFO] Building minio/minio:latest...
[SUCCESS] minio/minio:latest ready
[INFO] Building nginx:alpine...
[SUCCESS] nginx:alpine ready
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BUILD COMPLETE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Ready to start services: nself up
$ nself build --no-cacheOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BUILDING INFRASTRUCTURE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[WARNING] Building without cache (this will take longer)
[INFO] Cleaning Docker build cache...
[SUCCESS] Cache cleared
โ Building Docker images (no cache)...
[INFO] postgres:15-alpine [โ โกโกโกโกโกโกโกโกโก] 10%
[INFO] postgres:15-alpine [โ โ โ โกโกโกโกโกโกโก] 30%
[INFO] postgres:15-alpine [โ โ โ โ โ โกโกโกโกโก] 50%
[INFO] postgres:15-alpine [โ โ โ โ โ โ โ โกโกโก] 70%
[INFO] postgres:15-alpine [โ โ โ โ โ โ โ โ โ โก] 90%
[SUCCESS] postgres:15-alpine built from scratch
...
$ nself upOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ STARTING SERVICES โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Checking prerequisites...
[SUCCESS] Docker daemon is running
[SUCCESS] Required ports are available
[SUCCESS] Configuration is valid
โ Starting PostgreSQL...
[SUCCESS] PostgreSQL started (port 5432)
โ Waiting for database...
[SUCCESS] Database is ready
โ Starting Hasura GraphQL Engine...
[SUCCESS] Hasura started (port 8080)
โ Starting Authentication Service...
[SUCCESS] Auth service started (port 4000)
โ Starting MinIO Storage...
[SUCCESS] MinIO started (port 9000)
โ Starting Nginx Proxy...
[SUCCESS] Nginx started (ports 80, 443)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ALL SERVICES RUNNING โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Service URLs:
GraphQL API: https://api.localhost
Authentication: https://auth.localhost
Storage: https://storage.localhost
Admin Console: https://api.localhost/console
Press Ctrl+C to stop services...
postgres_1 | 2025-08-10 12:34:56.789 UTC [1] LOG: database system is ready
hasura_1 | {"type":"startup","timestamp":"2025-08-10T12:34:57.123Z"}
auth_1 | {"level":"info","message":"Server started on port 4000"}
minio_1 | API: https://storage.localhost
nginx_1 | /docker-entrypoint.sh: Configuration complete; ready
$ nself up -dOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ STARTING SERVICES โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Starting services in background...
โ Creating network nself_default...
[SUCCESS] Network created
โ Creating volume nself_postgres_data...
[SUCCESS] Volume created
โ Starting nself_postgres_1...
[SUCCESS] PostgreSQL started
โ Starting nself_hasura_1...
[SUCCESS] Hasura started
โ Starting nself_auth_1...
[SUCCESS] Auth service started
โ Starting nself_minio_1...
[SUCCESS] MinIO started
โ Starting nself_nginx_1...
[SUCCESS] Nginx started
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SERVICES STARTED IN BACKGROUND โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
View logs: nself logs -f
Check status: nself status
Stop services: nself down
$ nself upOutput (when port conflict detected):
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ STARTING SERVICES โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[WARNING] Port 5432 is in use by process 'docker-proxy' (PID: 12345)
[INFO] Attempting auto-fix...
[INFO] Stopping conflicting container 'old_postgres_1'...
[SUCCESS] Port 5432 is now available
โ Starting PostgreSQL...
[SUCCESS] PostgreSQL started (port 5432)
...
$ nself downOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ STOPPING SERVICES โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Stopping nginx...
[SUCCESS] Nginx stopped
โ Stopping authentication service...
[SUCCESS] Auth service stopped
โ Stopping MinIO storage...
[SUCCESS] MinIO stopped
โ Stopping Hasura GraphQL...
[SUCCESS] Hasura stopped
โ Stopping PostgreSQL...
[SUCCESS] PostgreSQL stopped
โ Removing containers...
[SUCCESS] Containers removed
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ALL SERVICES STOPPED โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Services have been stopped. Data is preserved.
To remove data: nself down --volumes
$ nself down --volumesOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ STOPPING SERVICES โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[WARNING] This will delete all data! Continue? (y/N): y
โ Stopping all services...
[SUCCESS] Services stopped
โ Removing containers...
[SUCCESS] Containers removed
โ Removing volumes...
[INFO] Removing nself_postgres_data...
[SUCCESS] PostgreSQL data removed
[INFO] Removing nself_minio_data...
[SUCCESS] MinIO data removed
[SUCCESS] All volumes removed
โ Removing network...
[SUCCESS] Network removed
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SERVICES AND DATA REMOVED โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
All data has been deleted. Run 'nself init' to start fresh.
$ nself restartOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ RESTARTING SERVICES โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Stopping services...
[SUCCESS] Services stopped
โ Starting services...
[SUCCESS] Services started
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SERVICES RESTARTED โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
All services have been restarted successfully.
$ nself restart hasuraOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ RESTARTING SERVICE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Restarting hasura...
[INFO] Stopping nself_hasura_1...
[SUCCESS] Hasura stopped
[INFO] Starting nself_hasura_1...
[SUCCESS] Hasura started
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SERVICE RESTARTED โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Hasura GraphQL Engine has been restarted.
Check status: nself status
$ nself statusOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SERVICE STATUS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Service Status Health Uptime Port(s)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
postgres Running Healthy 2h 15m 5432
hasura Running Healthy 2h 14m 8080
auth Running Healthy 2h 14m 4000
minio Running Healthy 2h 14m 9000, 9001
nginx Running Healthy 2h 14m 80, 443
redis Running Healthy 1h 45m 6379
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SYSTEM RESOURCES โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Container CPU % Memory Disk
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
postgres 2.1% 128 MB / 1 GB 2.3 GB
hasura 5.3% 256 MB / 2 GB 145 MB
auth 1.2% 89 MB / 512 MB 78 MB
minio 0.8% 156 MB / 1 GB 1.2 GB
nginx 0.1% 12 MB / 128 MB 23 MB
redis 0.5% 45 MB / 256 MB 125 MB
Total: 9.0% 686 MB 3.9 GB
$ nself status --format jsonOutput:
{
"services": [
{
"name": "postgres",
"status": "running",
"health": "healthy",
"uptime": "2h 15m",
"ports": [5432],
"cpu_percent": 2.1,
"memory_usage": "128 MB",
"memory_limit": "1 GB",
"disk_usage": "2.3 GB"
},
{
"name": "hasura",
"status": "running",
"health": "healthy",
"uptime": "2h 14m",
"ports": [8080],
"cpu_percent": 5.3,
"memory_usage": "256 MB",
"memory_limit": "2 GB",
"disk_usage": "145 MB"
}
],
"summary": {
"total_services": 6,
"running": 6,
"stopped": 0,
"unhealthy": 0,
"total_cpu": 9.0,
"total_memory": "686 MB",
"total_disk": "3.9 GB"
}
}$ nself logsOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SERVICE LOGS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
postgres_1 | 2025-08-10 12:34:56 UTC [1] LOG: starting PostgreSQL 15.3
postgres_1 | 2025-08-10 12:34:56 UTC [1] LOG: listening on IPv4 "0.0.0.0", port 5432
postgres_1 | 2025-08-10 12:34:56 UTC [1] LOG: database system is ready to accept connections
hasura_1 | {"type":"startup","timestamp":"2025-08-10T12:34:57.123Z","level":"info"}
hasura_1 | {"type":"http-log","timestamp":"2025-08-10T12:35:01.456Z","level":"info","detail":{"operation":"health_check","request_id":"abc123","response_size":15,"status":200}}
auth_1 | {"level":"info","message":"Server started on port 4000","timestamp":"2025-08-10T12:34:58.789Z"}
auth_1 | {"level":"info","message":"Connected to database","timestamp":"2025-08-10T12:34:59.012Z"}
minio_1 | MinIO Object Storage Server
minio_1 | API: https://storage.localhost
minio_1 | Console: http://localhost:9001
nginx_1 | 2025/08/10 12:35:00 [notice] 1#1: nginx/1.25.0
nginx_1 | 2025/08/10 12:35:00 [notice] 1#1: start worker processes
$ nself logs hasura -fOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HASURA SERVICE LOGS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Following logs for hasura (Ctrl+C to stop)...
hasura_1 | {"type":"startup","timestamp":"2025-08-10T12:34:57.123Z","level":"info","detail":{"version":"v2.35.0"}}
hasura_1 | {"type":"schema-sync","timestamp":"2025-08-10T12:34:58.456Z","level":"info","detail":{"message":"Schema sync completed"}}
hasura_1 | {"type":"http-log","timestamp":"2025-08-10T12:35:01.789Z","level":"info","detail":{"operation":"query","request_id":"xyz789","query":{"name":"GetUsers"},"response_size":2456,"status":200,"execution_time":45}}
hasura_1 | {"type":"websocket-log","timestamp":"2025-08-10T12:35:15.234Z","level":"info","detail":{"event":"connection_init","connection_id":"conn_123"}}
hasura_1 | {"type":"subscription-log","timestamp":"2025-08-10T12:35:15.567Z","level":"info","detail":{"operation":"subscription","name":"UserUpdates"}}
$ nself logs postgres --tail 10Output:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ POSTGRES LOGS (Last 10) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
postgres_1 | 2025-08-10 14:45:23 UTC [52] LOG: checkpoint starting: time
postgres_1 | 2025-08-10 14:45:25 UTC [52] LOG: checkpoint complete
postgres_1 | 2025-08-10 14:47:15 UTC [89] LOG: connection received: host=172.18.0.3
postgres_1 | 2025-08-10 14:47:15 UTC [89] LOG: connection authorized: user=postgres database=postgres
postgres_1 | 2025-08-10 14:47:16 UTC [89] LOG: statement: SELECT version()
postgres_1 | 2025-08-10 14:47:16 UTC [89] LOG: statement: SELECT * FROM users LIMIT 10
postgres_1 | 2025-08-10 14:47:17 UTC [89] LOG: duration: 1.234 ms
postgres_1 | 2025-08-10 14:47:17 UTC [89] LOG: disconnection: session time: 0:00:02.456
postgres_1 | 2025-08-10 14:50:23 UTC [52] LOG: checkpoint starting: time
postgres_1 | 2025-08-10 14:50:24 UTC [52] LOG: checkpoint complete
$ nself doctorOutput:
nself Doctor v0.3.0
System Diagnostics & Health Check
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
System Information
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Operating System: Darwin 24.6.0
[INFO] Architecture: arm64
[INFO] Current Directory: /Users/admin/myproject
[INFO] User: admin
[INFO] Date: Sun Aug 10 14:52:30 EDT 2025
[INFO] nself Version: 0.3.0
System Requirements
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Checking curl โ curl is available: curl 8.7.1
โ Checking Git โ Git is available: git version 2.46.2
โ Checking Docker โ Docker is available: Docker version 28.0.4
โ Checking Docker daemon โ Docker daemon is running
โ Checking Docker permissions โ Docker can be run without sudo
โ Checking Docker Compose โ Docker Compose (plugin) is available: v2.29.1
โ Checking memory โ Memory: 8192MB available (minimum 2048MB)
โ Checking disk space โ Disk space: 125GB available (minimum 5GB)
Network & Connectivity
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Checking internet connectivity โ Internet connectivity is working
โ Checking Docker Hub โ Docker Hub is reachable
โ Checking port 80 โ Port 80 is available for HTTP (nginx)
โ Checking port 443 โ Port 443 is available for HTTPS (nginx)
โ Checking port 5432 โ Port 5432 is already in use (needed for PostgreSQL)
โ Checking port 8080 โ Port 8080 is available for Hasura GraphQL
โ Checking port 4000 โ Port 4000 is available for Hasura Auth
โ Checking port 9000 โ Port 9000 is available for MinIO
โ Checking port 6379 โ Port 6379 is available for Redis
โ Checking port 1025 โ Port 1025 is available for SMTP (MailPit)
โ Checking port 8025 โ Port 8025 is available for MailPit UI
nself Configuration
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Checking nself configuration โ .env.local configuration file found
โ Loading configuration โ Configuration loaded successfully
โ Checking essential variables โ Essential configuration variables are set
[SUCCESS] Using nself.org domain for local development
โ Checking docker-compose.yml โ docker-compose.yml found
โ Checking running services โ 5/6 services are running
โ Checking service health โ 1 services are stopped
โ Checking SSL certificates โ SSL certificates found
โ Checking certificate expiry โ Certificate expires: Dec 31 23:59:59 2025 GMT
Service URLs
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[SUCCESS] Core Services:
[INFO] GraphQL API: https://api.localhost
[INFO] Auth: https://auth.localhost
[INFO] Storage: https://storage.localhost
[INFO] Admin Console: https://api.localhost/console
[SUCCESS] Direct Access (localhost):
[INFO] PostgreSQL: localhost:5432
[INFO] MinIO Console: http://localhost:9001
Recommendations
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[WARNING] Found 2 warning(s):
โข Port 5432 conflict may prevent PostgreSQL from starting
โข 1 service is stopped (check with 'nself status')
โข Warnings won't prevent nself from running
โข Consider addressing for optimal performance
[INFO] Common fixes:
nself up - Auto-fix will handle port conflicts
nself status - Check service details
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[SUCCESS] Health check completed - No critical issues found!
$ nself db migrateOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ DATABASE MIGRATION โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Connecting to database...
[SUCCESS] Connected to PostgreSQL
โ Checking for pending migrations...
[INFO] Found 3 pending migrations:
- 001_create_users_table.sql
- 002_create_posts_table.sql
- 003_add_user_roles.sql
โ Applying migration: 001_create_users_table.sql
[SUCCESS] Created table: users
โ Applying migration: 002_create_posts_table.sql
[SUCCESS] Created table: posts
[SUCCESS] Added foreign key: posts.user_id -> users.id
โ Applying migration: 003_add_user_roles.sql
[SUCCESS] Added column: users.role
[SUCCESS] Created index: idx_users_role
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MIGRATIONS COMPLETE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Applied 3 migrations successfully.
Database schema is up to date.
$ nself db seedOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ DATABASE SEEDING โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Loading seed file: hasura/seeds/default.sql
โ Seeding table: users
[SUCCESS] Inserted 100 users
โ Seeding table: posts
[SUCCESS] Inserted 500 posts
โ Seeding table: comments
[SUCCESS] Inserted 2000 comments
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SEEDING COMPLETE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Database seeded with test data:
- 100 users
- 500 posts
- 2000 comments
$ nself db consoleOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ DATABASE CONSOLE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Connecting to PostgreSQL...
[SUCCESS] Connected to database: postgres
psql (15.3)
Type "help" for help.
postgres=# \dt
List of relations
Schema | Name | Type | Owner
--------+-----------------+-------+----------
public | users | table | postgres
public | posts | table | postgres
public | comments | table | postgres
public | schema_migrations | table | postgres
(4 rows)
postgres=# SELECT COUNT(*) FROM users;
count
-------
100
(1 row)
postgres=# \q
[INFO] Disconnected from database
$ nself db backupOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ DATABASE BACKUP โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Creating backup of database: postgres
โ Dumping schema...
[SUCCESS] Schema dumped
โ Dumping data...
[INFO] Backing up table: users (100 rows)
[INFO] Backing up table: posts (500 rows)
[INFO] Backing up table: comments (2000 rows)
[SUCCESS] Data dumped
โ Compressing backup...
[SUCCESS] Backup compressed
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BACKUP COMPLETE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Backup saved to: backups/postgres_20250810_145623.sql.gz
Size: 1.2 MB
$ nself db restore backups/postgres_20250810_145623.sql.gzOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ DATABASE RESTORE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[WARNING] This will replace all existing data!
Continue? (y/N): y
โ Decompressing backup...
[SUCCESS] Backup decompressed
โ Dropping existing tables...
[INFO] Dropped 3 tables
โ Restoring schema...
[SUCCESS] Schema restored
โ Restoring data...
[INFO] Restored table: users (100 rows)
[INFO] Restored table: posts (500 rows)
[INFO] Restored table: comments (2000 rows)
[SUCCESS] Data restored
โ Verifying restore...
[SUCCESS] All tables verified
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ RESTORE COMPLETE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Database restored from: backups/postgres_20250810_145623.sql.gz
$ nself email smtpOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ EMAIL CONFIGURATION โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Configuring SMTP email provider
Enter SMTP host (e.g., smtp.gmail.com): smtp.gmail.com
Enter SMTP port (587): 587
Enter SMTP username: [email protected]
Enter SMTP password: ****
Use TLS? (Y/n): y
โ Testing connection...
[SUCCESS] Connected to SMTP server
โ Sending test email...
[SUCCESS] Test email sent to [email protected]
โ Updating configuration...
[SUCCESS] Updated .env.local
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ EMAIL CONFIGURED โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SMTP email has been configured successfully.
Restart services to apply changes: nself restart auth
$ nself email sendgrid --testOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ EMAIL CONFIGURATION โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Configuring SendGrid email provider
Enter SendGrid API key: ****
Enter sender email: [email protected]
Enter sender name (My App): My App
โ Validating API key...
[SUCCESS] API key is valid
โ Verifying sender...
[SUCCESS] Sender email verified
โ Sending test email...
Enter recipient email: [email protected]
[SUCCESS] Test email sent successfully
โ Updating configuration...
[SUCCESS] Updated .env.local with SendGrid settings
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SENDGRID CONFIGURED โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SendGrid has been configured and tested successfully.
$ nself urlsOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SERVICE URLS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Core Services
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
GraphQL API: https://api.localhost
Playground: https://api.localhost/console
Health: https://api.localhost/healthz
Authentication: https://auth.localhost
Sign In: https://auth.localhost/signin
Sign Up: https://auth.localhost/signup
OAuth: https://auth.localhost/oauth
Storage: https://storage.localhost
Console: http://localhost:9001
Access Key: minioadmin
Secret Key: minioadmin
Optional Services
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Redis Cache: redis://localhost:6379
NestJS API: https://nestjs.localhost [ENABLED]
Dashboard: https://dashboard.localhost [DISABLED]
Functions: https://functions.localhost [DISABLED]
Development Tools
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Database: postgresql://postgres:****@localhost:5432/postgres
nself Admin: https://admin.localhost [DISABLED]
MailHog: https://mailhog.localhost [ENABLED]
Connection Examples
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
GraphQL Query:
curl https://api.localhost/v1/graphql \
-H 'x-hasura-admin-secret: ****' \
-d '{"query":"{ users { id email }}"}'
PostgreSQL:
psql postgresql://postgres:****@localhost:5432/postgres
Redis:
redis-cli -h localhost -p 6379
$ nself urls --format jsonOutput:
{
"core": {
"graphql": {
"url": "https://api.localhost",
"playground": "https://api.localhost/console",
"health": "https://api.localhost/healthz"
},
"auth": {
"url": "https://auth.localhost",
"signin": "https://auth.localhost/signin",
"signup": "https://auth.localhost/signup"
},
"storage": {
"url": "https://storage.localhost",
"console": "http://localhost:9001",
"access_key": "minioadmin",
"secret_key": "minioadmin"
}
},
"optional": {
"redis": {
"url": "redis://localhost:6379",
"enabled": true
},
"nestjs": {
"url": "https://nestjs.localhost",
"enabled": true
},
"dashboard": {
"url": "https://dashboard.localhost",
"enabled": false
}
},
"database": {
"connection_string": "postgresql://postgres:****@localhost:5432/postgres",
"host": "localhost",
"port": 5432,
"database": "postgres",
"username": "postgres"
}
}$ nself prodOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PRODUCTION CONFIGURATION โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[WARNING] This will configure your project for production deployment
Current environment: development
Target environment: production
Continue? (y/N): y
โ Generating secure passwords...
[SUCCESS] Generated 32-character passwords
โ Configuring domain...
Enter production domain (example.com): api.myapp.com
[SUCCESS] Domain configured: api.myapp.com
โ Configuring SSL...
Do you have SSL certificates? (y/N): n
[INFO] You'll need to obtain SSL certificates for:
- api.api.myapp.com
- auth.api.myapp.com
- storage.api.myapp.com
[INFO] Recommended: Use Let's Encrypt with certbot
โ Configuring security...
[SUCCESS] Enabled security headers
[SUCCESS] Disabled GraphQL console
[SUCCESS] Enabled rate limiting
[SUCCESS] Configured CORS for production
โ Configuring resources...
[SUCCESS] Set production resource limits:
- PostgreSQL: 4GB RAM, 10GB storage
- Hasura: 2GB RAM
- Auth: 1GB RAM
- MinIO: 2GB RAM, 100GB storage
- Nginx: 512MB RAM
โ Configuring backups...
Enable automated backups? (Y/n): y
[SUCCESS] Configured daily backups at 2:00 AM
โ Writing production configuration...
[SUCCESS] Created .env.production
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PRODUCTION READY โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Production configuration complete!
Next steps:
1. Review .env.production
2. Obtain SSL certificates
3. Configure DNS records
4. Deploy with: ENV=production nself up -d
Security checklist:
โ Strong passwords generated
โ GraphQL console disabled
โ Security headers enabled
โ Rate limiting configured
โ CORS configured
โก SSL certificates needed
โก Firewall rules needed
โก Monitoring setup needed
$ nself trustOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SSL CERTIFICATE TRUST โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Managing SSL certificates for local development
โ Checking for existing certificates...
[SUCCESS] Found certificate: nginx/ssl/nself.org.crt
[SUCCESS] Certificate is valid
โ Installing certificate authority...
[INFO] Installing nself CA to system trust store
Password: ****
[SUCCESS] CA installed to system keychain
โ Trusting certificate...
[SUCCESS] Certificate trusted for:
- *.localhost
- *.local.nself.org
- localhost
โ Verifying trust...
[SUCCESS] Certificate verification passed
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CERTIFICATES TRUSTED โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Your browser will now trust nself certificates.
You may need to restart your browser.
$ nself scaffold nest api-gatewayOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SERVICE SCAFFOLDING โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Creating NestJS service: api-gateway
โ Creating service directory...
[SUCCESS] Created services/api-gateway/
โ Copying template files...
[SUCCESS] Copied NestJS template
โ Updating configuration...
[INFO] Replacing placeholders:
{{SERVICE_NAME}} -> api-gateway
{{PORT}} -> 3001
{{DATABASE_URL}} -> postgresql://...
[SUCCESS] Configuration updated
โ Generating package.json...
[SUCCESS] Generated package.json with dependencies
โ Creating Dockerfile...
[SUCCESS] Created multi-stage Dockerfile
โ Registering service...
[SUCCESS] Added to .env.local:
NESTJS_ENABLED=true
NESTJS_PORT=3001
NESTJS_ROUTE=api-gateway.localhost
โ Updating docker-compose...
[SUCCESS] Service added to docker-compose.yml
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SERVICE CREATED โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
NestJS service created: services/api-gateway/
Next steps:
1. cd services/api-gateway
2. npm install
3. nself build
4. nself up
Service will be available at:
https://api-gateway.localhost
$ nself scaffold bull email-worker --startOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SERVICE SCAFFOLDING โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Creating BullMQ worker: email-worker
โ Creating service directory...
[SUCCESS] Created services/email-worker/
โ Copying template files...
[SUCCESS] Copied BullMQ template
โ Configuring worker...
[INFO] Queue name: email-queue
[INFO] Redis connection: redis://localhost:6379
[SUCCESS] Worker configured
โ Creating job processors...
[SUCCESS] Created processors:
- send-email.js
- send-bulk.js
- retry-failed.js
โ Registering service...
[SUCCESS] Added to .env.local
โ Starting service...
[INFO] Building Docker image...
[SUCCESS] Image built: email-worker:latest
[INFO] Starting container...
[SUCCESS] Worker started
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ WORKER CREATED & STARTED โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
BullMQ worker running: email-worker
Queue: email-queue
Redis: redis://localhost:6379
Monitor queue: nself logs email-worker -f
$ nself diffOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CONFIGURATION DIFFERENCES โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Comparing: .env.local vs .env.example
--- .env.example
+++ .env.local
@@ -1,20 +1,20 @@
# Project Configuration
-PROJECT_NAME=EXAMPLE
-BASE_DOMAIN=EXAMPLE
-ENV=EXAMPLE
+PROJECT_NAME=myapp
+BASE_DOMAIN=api.myapp.com
+ENV=production
# Database Configuration
-POSTGRES_PASSWORD=EXAMPLE
+POSTGRES_PASSWORD=xK9mP2nQ8vL4jF6
POSTGRES_USER=postgres
POSTGRES_DB=postgres
# Hasura Configuration
-HASURA_GRAPHQL_ADMIN_SECRET=EXAMPLE
-HASURA_GRAPHQL_JWT_SECRET=EXAMPLE
+HASURA_GRAPHQL_ADMIN_SECRET=aB3cD4eF5gH6iJ7
+HASURA_GRAPHQL_JWT_SECRET={"type":"HS256","key":"..."}
# Optional Services
-REDIS_ENABLED=EXAMPLE
+REDIS_ENABLED=true
+NESTJS_ENABLED=true
+NESTJS_PORT=3001
[INFO] Summary:
.env.local: 24 variables
.env.example: 20 variables
[WARNING] Missing variables in .env.local:
- MONITORING_ENABLED
- BACKUP_ENABLED
$ nself resetOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PROJECT RESET โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[WARNING] This will stop all services and remove containers
Data will be preserved. Use --hard to remove data.
Continue? (y/N): y
โ Stopping services...
[SUCCESS] Services stopped
โ Removing containers...
[SUCCESS] Containers removed
โ Removing networks...
[SUCCESS] Networks removed
โ Cleaning build cache...
[SUCCESS] Build cache cleared
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ RESET COMPLETE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Project has been reset. Data is preserved.
Run 'nself up' to start fresh.
$ nself reset --hardOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PROJECT RESET โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[WARNING] HARD RESET: This will DELETE ALL DATA!
This action will remove:
- All containers
- All volumes (DATABASE DATA)
- All networks
- Build cache
- Generated files
Type 'DELETE' to confirm: DELETE
โ Stopping services...
[SUCCESS] Services stopped
โ Removing containers...
[SUCCESS] Containers removed
โ Removing volumes...
[WARNING] Deleting data volumes...
[SUCCESS] Deleted: nself_postgres_data (2.3 GB)
[SUCCESS] Deleted: nself_minio_data (1.2 GB)
[SUCCESS] All volumes removed
โ Removing networks...
[SUCCESS] Networks removed
โ Removing generated files...
[SUCCESS] Removed docker-compose.yml
[SUCCESS] Removed nginx configs
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HARD RESET COMPLETE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
All data has been deleted.
Run 'nself init' to start completely fresh.
$ nself validate-envOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ENVIRONMENT VALIDATION โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Validating: .env.local
โ Checking required variables...
[SUCCESS] All required variables present
โ Validating variable formats...
[SUCCESS] PROJECT_NAME: myapp (valid)
[SUCCESS] BASE_DOMAIN: localhost (valid)
[SUCCESS] ENV: dev (valid)
[WARNING] POSTGRES_PASSWORD: weak password (8 chars)
[SUCCESS] HASURA_GRAPHQL_ADMIN_SECRET: ******** (valid)
[ERROR] HASURA_GRAPHQL_JWT_SECRET: invalid JSON
โ Checking variable dependencies...
[SUCCESS] REDIS_ENABLED requires REDIS_PORT: โ
[WARNING] MONITORING_ENABLED=true but GRAFANA_PASSWORD not set
โ Checking for conflicts...
[SUCCESS] No port conflicts detected
[SUCCESS] No service conflicts detected
โ Validating secrets...
[WARNING] Using default MinIO credentials (change for production)
[WARNING] JWT secret should be at least 32 characters
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ VALIDATION RESULTS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Status: FAILED
โ 15 valid configurations
โ 4 warnings
โ 1 error
Errors must be fixed:
- HASURA_GRAPHQL_JWT_SECRET: Invalid JSON format
Warnings (recommended to fix):
- Weak database password
- Missing GRAFANA_PASSWORD
- Default MinIO credentials
- Short JWT secret
Fix errors and run validation again.
$ nself hot-reloadOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HOT RELOAD MODE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Enabling hot reload for development
โ Detecting services...
[SUCCESS] Found services:
- NestJS (services/api-gateway)
- React (services/dashboard)
- Hasura metadata
โ Installing watchers...
[SUCCESS] Watching services/api-gateway/**/*.ts
[SUCCESS] Watching services/dashboard/**/*.{js,jsx,ts,tsx}
[SUCCESS] Watching hasura/metadata/**/*.yaml
โ Starting development mode...
[SUCCESS] Services restarted with hot reload
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HOT RELOAD ACTIVE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Watching for changes... (Ctrl+C to stop)
[12:34:56] File changed: services/api-gateway/src/app.service.ts
[12:34:56] Rebuilding api-gateway...
[12:34:58] Build complete, restarting...
[12:34:59] Service restarted โ
[12:35:23] File changed: hasura/metadata/tables.yaml
[12:35:23] Reloading Hasura metadata...
[12:35:24] Metadata reloaded โ
[12:36:45] File changed: services/dashboard/src/App.tsx
[12:36:45] Hot module replacement...
[12:36:46] Dashboard updated โ
$ nself updateOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ nself Update Check โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Current version: 0.3.0
[INFO] Checking for updates...
โ Fetching latest version...
[SUCCESS] Latest version: 0.4.0
[INFO] Changelog:
v0.4.0 (2025-08-15)
- Added Kubernetes deployment option
- Improved auto-fix system
- New 'nself deploy' command
- Performance improvements
- Bug fixes
Update to v0.4.0? (Y/n): y
โ Downloading update...
[SUCCESS] Downloaded v0.4.0
โ Backing up current installation...
[SUCCESS] Backup created: ~/.nself.backup/
โ Installing update...
[SUCCESS] Files updated
[SUCCESS] Permissions set
[SUCCESS] PATH verified
โ Running post-update tasks...
[SUCCESS] Configuration migrated
[SUCCESS] Templates updated
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ UPDATE COMPLETE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
nself has been updated to v0.4.0
Run 'nself version' to verify
$ nself update --checkOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ UPDATE CHECK โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Current version: 0.3.0
[INFO] Checking for updates...
โ Fetching latest version...
[SUCCESS] Latest version: 0.4.0
[INFO] Update available: 0.3.0 โ 0.4.0
Run 'nself update' to install the latest version
$ nself versionOutput:
nself version 0.3.0
$ nself version --verboseOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ nself Version Information โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Version: 0.3.0
Location: /Users/admin/.nself/bin
Config: .env.local
System Information:
OS: Darwin
Arch: arm64
Shell: 5.9
Docker: 28.0.4
Compose: v2.29.1
Installation:
Installed: 2025-07-15
Updated: 2025-08-10
Channel: stable
Components:
โ Core commands
โ Shared utilities
โ Docker wrapper
โ Auto-fix system
โ Hooks system
โ Templates
$ nself helpOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ nself - Modern Full-Stack Platform โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Version: 0.3.0
Usage: nself <command> [options]
Core Commands
init Initialize a new project
build Build project structure and Docker images
up Start all services
down Stop all services
restart Restart all services
status Show service status
logs View service logs
Management Commands
doctor Run system diagnostics
db Database operations
email Email service configuration
urls Show service URLs
prod Configure for production deployment
trust Manage SSL certificates
Development Commands
diff Show configuration differences
reset Reset project to clean state
Tool Commands
scaffold Create new service from template
validate-env Validate environment configuration
hot-reload Enable hot reload for development
Other Commands
update Update nself to latest version
version Show version information
help Show this help message
For command-specific help: nself help <command>
or: nself <command> --help
$ nself help dbOutput:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ DATABASE OPERATIONS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Usage: nself db <subcommand> [options]
Subcommands:
migrate Run pending database migrations
seed Load seed data into database
reset Reset database to clean state
backup Create database backup
restore Restore database from backup
console Open interactive PostgreSQL console
Options:
--help Show this help message
--force Skip confirmation prompts
--verbose Show detailed output
Examples:
nself db migrate # Run migrations
nself db seed # Load test data
nself db backup # Create backup
nself db restore backup.sql # Restore from file
nself db console # Interactive SQL
nself db reset --force # Reset without prompt
Migration Management:
Migrations are located in: hasura/migrations/
Format: <version>_<description>.sql
Applied migrations are tracked in schema_migrations table
Backup/Restore:
Backups are saved to: backups/
Format: postgres_YYYYMMDD_HHMMSS.sql.gz
Backups include both schema and data
Notes:
- Database must be running (nself up)
- Backups are compressed with gzip
- Console requires psql client
$ nself upOutput with Error:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ STARTING SERVICES โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Checking prerequisites...
[ERROR] Port 5432 is already in use by another process
[INFO] Attempting auto-fix...
[INFO] Process using port 5432: postgres (PID: 1234)
[WARNING] Port is used by system PostgreSQL, cannot auto-fix
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ START FAILED โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Failed to start services: Port conflict
Solutions:
1. Stop system PostgreSQL: sudo systemctl stop postgresql
2. Change port in .env.local: POSTGRES_PORT=5433
3. Use Docker's PostgreSQL only
Run 'nself doctor' for detailed diagnostics
$ nself buildOutput with Error:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BUILDING INFRASTRUCTURE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[ERROR] Configuration error in .env.local
Invalid configuration:
Line 15: POSTGRES_PASSWORD= (empty value)
Line 23: INVALID SYNTAX HERE (not key=value format)
Line 45: REDIS_ENABLED=yes (must be true/false)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BUILD FAILED โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Fix configuration errors and try again.
Run 'nself validate-env' for detailed validation
$ nself upOutput with Error:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ STARTING SERVICES โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[INFO] Checking prerequisites...
[ERROR] Docker daemon is not running
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ DOCKER NOT AVAILABLE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Docker Desktop is not running.
To fix:
macOS/Windows: Start Docker Desktop application
Linux: sudo systemctl start docker
After starting Docker, run 'nself up' again
- Always run doctor first when encountering issues
-
Use detached mode (
-d) for production - Enable hot-reload during development
- Validate environment before deploying
- Create backups before major changes
-
Monitor logs with
nself logs -f - Use scaffold for consistent service creation
- Run prod command before production deployment
This comprehensive guide shows the exact output format for every nself command, including success cases, error cases, and interactive prompts.