Skip to Content

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).

This page covers the commands you’ll use day to day. See CLI and Commands for the complete reference, including every flag.

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 setup

Flags: --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 config

zeka-learnhouse env

Interactively edit environment variables in your .env file (Domain & Hosting, Database & Redis, Security, AI, Email (Resend), S3 Storage, OAuth).

zeka-learnhouse env

The 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 start

zeka-learnhouse stop

Stop all running ZəkaHouse services. Data is preserved in Docker volumes.

zeka-learnhouse stop

zeka-learnhouse status

Show the status of each ZəkaHouse service.

zeka-learnhouse status

zeka-learnhouse logs

Stream container logs for all services.

zeka-learnhouse logs

zeka-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 migrations

zeka-learnhouse dev

Start a full development environment (PostgreSQL + Redis in Docker, API + web + collab run locally).

zeka-learnhouse dev

Diagnostics

zeka-learnhouse doctor

Run diagnostics on your ZəkaHouse installation. Checks Docker availability, container health, port conflicts, DNS resolution, and disk space.

zeka-learnhouse doctor

zeka-learnhouse health

Run the CLI’s health checks (PostgreSQL connection, Redis ping, HTTP health endpoint, disk, resources).

zeka-learnhouse health

zeka-learnhouse shell

Open an interactive shell inside a running container for debugging.

zeka-learnhouse shell

Infrastructure

zeka-learnhouse deployments

Manage deployments and scale memory limits for your ZəkaHouse containers.

zeka-learnhouse deployments

Backup 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 backup

zeka-learnhouse restore

Restore a database from a backup archive.

zeka-learnhouse restore <path/to/learnhouse-backup-<timestamp>.tar.gz>

Command Summary

CommandDescription
zeka-learnhouse setupInteractive setup wizard, generates docker-compose.yml, .env, and config files
zeka-learnhouse startStart all services
zeka-learnhouse stopStop all services
zeka-learnhouse updateUpdate to latest or a specific version
zeka-learnhouse statusShow service status
zeka-learnhouse healthRun health checks
zeka-learnhouse logsStream container logs
zeka-learnhouse configView current configuration
zeka-learnhouse envEdit environment variables
zeka-learnhouse backupCreate a database backup archive
zeka-learnhouse restoreRestore the database from an archive
zeka-learnhouse doctorDiagnose Docker, containers, ports, DNS, and disk
zeka-learnhouse shellOpen a shell in a running container
zeka-learnhouse deploymentsManage deployments and memory limits
zeka-learnhouse devStart 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>.