CLI Reference
Reference for the ZəkaHouse CLI commands most people need for self-hosting. The CLI isn’t published to npm — you build it from the ZəkaHouse repository and run it as zeka-learnhouse (see CLI → Installation).
Setup and Configuration
zeka-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.
zeka-learnhouse setupFlags: --ci, --name, --domain, --port, --admin-email, --admin-password, --org-name, --org-slug, --channel <stable|dev>, --no-start, --external-db <uri>, --external-redis <uri>, --docker-ipv6.
You can re-run this command at any time to reconfigure your instance. Existing configuration will be preserved as defaults in the prompts.
zeka-learnhouse config
View the current configuration.
zeka-learnhouse configzeka-learnhouse env
Interactively edit environment variables in your .env file (Domain & Hosting, Database & Redis, Security, AI, Email (Resend), S3 Storage, OAuth).
zeka-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
zeka-learnhouse start
Start all ZəkaHouse services. On first run, this pulls the required Docker images before starting containers.
zeka-learnhouse startzeka-learnhouse stop
Stop all running ZəkaHouse services. Data is preserved in Docker volumes.
zeka-learnhouse stopzeka-learnhouse status
Show the status of each ZəkaHouse service.
zeka-learnhouse statuszeka-learnhouse logs
Stream container logs for all services.
zeka-learnhouse logszeka-learnhouse update
Move ZəkaHouse to a different app image — by default the one matching the CLI’s own version, or a specific tag with --to. The target image must already exist locally (build or docker tag it first). Backs up the database, rewrites docker-compose.yml, runs migrations, and restarts services — see Commands → update for the full sequence.
zeka-learnhouse update
zeka-learnhouse update --to 1.4.2 # or: -v 1.4.2
zeka-learnhouse update --migrate # auto-apply migrations
zeka-learnhouse update --no-migrate # skip migrationszeka-learnhouse dev
Start a full development environment (PostgreSQL + Redis in Docker, API + web + collab run locally).
zeka-learnhouse devDiagnostics
zeka-learnhouse doctor
Run diagnostics on your ZəkaHouse installation. Checks Docker availability, container health, port conflicts, DNS resolution, and disk space.
zeka-learnhouse doctorzeka-learnhouse health
Run the CLI’s health checks (PostgreSQL connection, Redis ping, HTTP health endpoint, disk, resources).
zeka-learnhouse healthzeka-learnhouse shell
Open an interactive shell inside a running container for debugging.
zeka-learnhouse shellInfrastructure
zeka-learnhouse deployments
Manage deployments and scale memory limits for your ZəkaHouse containers.
zeka-learnhouse deploymentsBackup and Restore
zeka-learnhouse backup
Create a PostgreSQL dump archive of your instance’s database (plus a copy of .env). Archives are written to <installDir>/backups/.
zeka-learnhouse backupzeka-learnhouse restore
Restore a database from a backup archive.
zeka-learnhouse restore <path/to/learnhouse-backup-<timestamp>.tar.gz>Command Summary
| Command | Description |
|---|---|
zeka-learnhouse setup | Interactive setup wizard, generates docker-compose.yml, .env, and config files |
zeka-learnhouse start | Start all services |
zeka-learnhouse stop | Stop all services |
zeka-learnhouse update | Update to latest or a specific version |
zeka-learnhouse status | Show service status |
zeka-learnhouse health | Run health checks |
zeka-learnhouse logs | Stream container logs |
zeka-learnhouse config | View current configuration |
zeka-learnhouse env | Edit environment variables |
zeka-learnhouse backup | Create a database backup archive |
zeka-learnhouse restore | Restore the database from an archive |
zeka-learnhouse doctor | Diagnose Docker, containers, ports, DNS, and disk |
zeka-learnhouse shell | Open a shell in a running container |
zeka-learnhouse deployments | Manage deployments and memory limits |
zeka-learnhouse dev | Start full development environment |
If you haven’t linked the CLI onto your PATH, run any command above from apps/cli as bun dist/bin/learnhouse.js <command> instead of zeka-learnhouse <command>.