Skip to main content
The Aegra CLI manages project creation, development servers, and Docker deployments.

Install

Install aegra-cli directly — not the aegra meta-package on PyPI.

Commands

aegra init

Create a new Aegra project interactively.
Generates the project structure including aegra.json, Dockerfile, docker-compose.yml, .env.example, and a starter graph based on the selected template. Templates:
  • simple-chatbot — Basic conversational agent
  • react-agent — ReAct agent with tool use

aegra dev

Start the development server with hot reload and automatic PostgreSQL.
What it does:
  1. Starts a PostgreSQL container via Docker Compose
  2. Loads your .env file
  3. Applies database migrations automatically
  4. Runs uvicorn with --reload by default

aegra serve

Start the production server without Docker. You must provide a running database.
What it does:
  1. Loads your .env file
  2. Runs uvicorn in production mode (no reload)
  3. Applies database migrations automatically
  4. Connects to the database configured via DATABASE_URL or POSTGRES_* variables
Use aegra serve for:
  • PaaS platforms (Railway, Render, Fly.io)
  • Inside Docker containers (generated Dockerfile uses this as CMD)
  • Bare metal / VM with external PostgreSQL
  • Kubernetes pod specs

aegra up

Build and start all Docker services (PostgreSQL + app).

aegra down

Stop Docker services.

aegra version

Show version information.

When to use each command