Skip to Content
Edit on GitHub

CLI

The LearnHouse CLI is the primary tool for deploying, managing, and developing LearnHouse. It orchestrates Docker Compose services and provides an interactive setup wizard for production deployments, as well as a full local development environment.

LearnHouse CLI

Package: learnhouse on npm

Installation

npx learnhouse@latest setup

One-line Install (macOS / Linux)

Installs Docker, Node.js, and launches the CLI:

curl -fsSL https://raw.githubusercontent.com/learnhouse/learnhouse/main/apps/cli/install.sh | bash

Windows (PowerShell)

irm https://raw.githubusercontent.com/learnhouse/learnhouse/main/apps/cli/install.ps1 | iex

Requirements

  • Node.js 18+
  • Docker with Docker Compose v2

What It Does

The CLI handles two main workflows:

Production Deployment

The setup wizard generates a complete Docker Compose deployment with:

  • LearnHouse app container (Next.js + FastAPI)
  • PostgreSQL database (with optional pgvector for AI)
  • Redis cache
  • Caddy or Nginx reverse proxy (with optional auto-SSL)

Each deployment gets a unique ID, allowing multiple instances on the same machine.

Local Development

The dev command starts infrastructure in Docker and runs the API, web, and collaboration servers locally with hot reload.

Quick Reference

CommandDescription
npx learnhouse setupInteractive setup wizard
npx learnhouse startStart all services
npx learnhouse stopStop all services
npx learnhouse logsStream container logs
npx learnhouse doctorRun diagnostics
npx learnhouse backupBackup database
npx learnhouse devStart dev environment

See Commands for the full reference.