Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.aegra.dev/llms.txt

Use this file to discover all available pages before exploring further.

The Aegra CLI manages project creation, development servers, and Docker deployments.

Install

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

Commands

aegra init

Create a new Aegra project interactively.
aegra init              # Prompts for location, template, and name
aegra init ./my-agent   # Create at path (still prompts for template)
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.
aegra dev
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
OptionDefaultDescription
--host127.0.0.1Host to bind to
--port2026Port to bind to
--config / -cAuto-detectedPath to aegra.json
--env-file / -e.envPath to .env file
--file / -fAuto-detectedPath to docker-compose.yml
--no-db-checkSkip database readiness check
--no-reloadDisable auto-reload
--debug-portWhen set, run the server under debugpy and listen on this port (enables remote debugging)
--wait-for-clientfalseWhen used with --debug-port, debugpy will wait for a debugger client to attach before starting the app
--debug-host-Host for the debugger to bind to (defaults to loopback). Binding to a non-loopback address is unsafe.

aegra serve

Start the production server without Docker. You must provide a running database.
aegra serve
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
OptionDefaultDescription
--host0.0.0.0Host to bind to
--portFrom env or 2026Port to bind to
--config / -cAuto-detectedPath to aegra.json
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 up
OptionDefaultDescription
--build / --no-buildBuild onBuild images before starting
--file / -fAuto-detectedPath to compose file
SERVICE...AllSpecific services to start

aegra down

Stop Docker services.
aegra down              # Stop containers
aegra down --volumes    # Stop and remove data volumes

aegra version

Show version information.
aegra version

When to use each command

ScenarioCommand
Local developmentaegra dev
Self-hosted Docker productionaegra up
PaaS deployment (Railway, Render)aegra serve
Kubernetesaegra serve (in pod spec)
Inside a Docker containeraegra serve (as CMD)