CLI Reference
Complete reference for all LearnHouse CLI commands. The CLI is published as learnhouse on npm and is typically run via npx learnhouse@latest.
Setup and Configuration
learnhouse setup
Run the interactive setup wizard. This command generates docker-compose.yml, .env, learnhouse.config.json, and nginx or Caddy configuration files based on your choices.
learnhouse setupFlags: --ci, --name, --domain, --port, --admin-email, --admin-password, --channel <stable|dev>, --no-start.
You can re-run this command at any time to reconfigure your instance. Existing configuration will be preserved as defaults in the prompts.
learnhouse config
View the current configuration.
learnhouse configlearnhouse env
Interactively edit environment variables in your .env file (Domain & Hosting, Database & Redis, Security, AI, Email (Resend), S3 Storage, OAuth).
learnhouse envThe env command edits a curated set of variables only. SMTP credentials (LEARNHOUSE_SMTP_*) are not editable through this command — edit .env directly if you need them.
Service Management
learnhouse start
Start all LearnHouse services. On first run, this pulls the required Docker images before starting containers.
learnhouse startlearnhouse stop
Stop all running LearnHouse services. Data is preserved in Docker volumes.
learnhouse stoplearnhouse status
Show the status of each LearnHouse service.
learnhouse statuslearnhouse logs
Stream container logs for all services.
learnhouse logslearnhouse update
Update LearnHouse to the latest release or a specific version. Pulls the target image, rewrites docker-compose.yml, restarts services, and prompts for database migrations.
learnhouse update
learnhouse update --version 1.4.2
learnhouse update --migrate # auto-apply migrations
learnhouse update --no-migrate # skip migrationslearnhouse dev
Start a full development environment (PostgreSQL + Redis in Docker, API + web + collab run locally).
learnhouse devDiagnostics
learnhouse doctor
Run diagnostics on your LearnHouse installation. Checks Docker availability, container health, port conflicts, DNS resolution, and disk space.
learnhouse doctorlearnhouse health
Run the CLI’s health checks (PostgreSQL connection, Redis ping, HTTP health endpoint, disk, resources).
learnhouse healthlearnhouse shell
Open an interactive shell inside a running container for debugging.
learnhouse shellInfrastructure
learnhouse deployments
Manage deployments and scale memory limits for your LearnHouse containers.
learnhouse deploymentsBackup and Restore
learnhouse backup
Create a PostgreSQL dump archive of your instance’s database (plus a copy of .env). Archives are written to <installDir>/backups/.
learnhouse backuplearnhouse restore
Restore a database from a backup archive.
learnhouse restore <path/to/learnhouse-backup-<timestamp>.tar.gz>Command Summary
| Command | Description |
|---|---|
learnhouse setup | Interactive setup wizard, generates docker-compose.yml, .env, and config files |
learnhouse start | Start all services |
learnhouse stop | Stop all services |
learnhouse update | Update to latest or a specific version |
learnhouse status | Show service status |
learnhouse health | Run health checks |
learnhouse logs | Stream container logs |
learnhouse config | View current configuration |
learnhouse env | Edit environment variables |
learnhouse backup | Create a database backup archive |
learnhouse restore | Restore the database from an archive |
learnhouse doctor | Diagnose Docker, containers, ports, DNS, and disk |
learnhouse shell | Open a shell in a running container |
learnhouse deployments | Manage deployments and memory limits |
learnhouse dev | Start full development environment |