Catalog PyPI
PACKAGE EXPLORERView in registry

aegra-cli

PyPI

Aegra CLI - Manage your self-hosted agent deployments

agentsclideploymentdockerlanggraph
Versions collected1
Direct dependencies6From release 0.10.8
Last observed20 Oct, 20:20 UTC

README

Version 0.10.8 documentation

aegra-cli

Aegra CLI - Command-line interface for managing self-hosted agent deployments.

Aegra is an open-source, self-hosted alternative to LangSmith Deployments. Use this CLI to initialize projects, run development servers, and manage Docker services.

Installation

From PyPI

pip install aegra-cli

From Source

# Clone the repository
git clone https://github.com/aegra/aegra.git
cd aegra

# Install all workspace packages
uv sync --all-packages

Quick Start

# Initialize a new Aegra project (prompts for location, template, and name)
aegra init

# Follow the printed next steps
cd <your-project>
cp .env.example .env     # Add your OPENAI_API_KEY
uv sync                  # Install dependencies
uv run aegra dev         # Start PostgreSQL + dev server

Commands

aegra version

Show version information for aegra-cli and aegra-api.

aegra version

Output displays a table with versions for both packages.


aegra init

Initialize a new Aegra project with configuration files and directory structure.

aegra init [PATH] [OPTIONS]

Arguments:

ArgumentDefaultDescription
PATH.Project directory to initialize

Options:

OptionDescription
-t, --template INTTemplate number (1 = "New Aegra Project", 2 = "ReAct Agent")
-n, --name STRProject name
--forceOverwrite existing files if they exist

Templates:

#NameDescription
1New Aegra ProjectSimple chatbot with basic graph structure
2ReAct AgentTool-calling agent with a tools module

Examples:

# Initialize in current directory
aegra init

# Initialize in a specific directory
aegra init my-project

# Initialize with a specific template and name
aegra init my-project --template 2 --name "My ReAct Agent"

# Initialize in current directory, overwriting existing files
aegra init --force

Created Files:

  • aegra.json - Graph configuration
  • pyproject.toml - Python project configuration
  • .env.example - Environment variable template
  • .gitignore - Git ignore rules
  • README.md - Project readme
  • src/<slug>/__init__.py - Package init file
  • src/<slug>/graph.py - Graph implementation
  • src/<slug>/state.py - State schema definition
  • src/<slug>/prompts.py - Prompt templates
  • src/<slug>/context.py - Context configuration
  • src/<slug>/utils.py - Utility functions
  • src/<slug>/tools.py - Tool definitions (ReAct template only)
  • docker-compose.yml - Docker Compose for PostgreSQL and API services
  • Dockerfile - Container build

aegra dev

Run the development server with hot reload.

aegra dev [OPTIONS]

Options:

OptionDefaultDescription
--host HOST127.0.0.1Host to bind the server to
--port PORT2026Port to bind the server to
--app APPaegra_api.main:appApplication import path
-c, --config PATHPath to aegra.json config file
-e, --env-file PATHPath to .env file
-f, --file PATHPath to docker-compose.yml file
--no-db-checkSkip the automatic database check

Examples:

# Start with defaults (localhost:2026)
aegra dev

# Start on all interfaces, port 3000
aegra dev --host 0.0.0.0 --port 3000

# Start with a custom app
aegra dev --app myapp.main:app

# Start with a specific config and env file
aegra dev --config ./aegra.json --env-file ./.env

# Start without automatic database check
aegra dev --no-db-check

The server automatically restarts when code changes are detected.


aegra serve

Run the production server (no hot reload).

aegra serve [OPTIONS]

Options:

OptionDefaultDescription
--host HOST0.0.0.0Host to bind the server to
--port PORT2026Port to bind the server to
--app APPaegra_api.main:appApplication import path
-c, --config PATHPath to aegra.json config file

Examples:

# Start with defaults (0.0.0.0:2026)
aegra serve

# Start with a custom config
aegra serve --config ./aegra.json

aegra up

Start services with Docker Compose.

aegra up [SERVICES...] [OPTIONS]

Arguments:

ArgumentDescription
SERVICESOptional list of specific services to start

Options:

OptionDefaultDescription
-f, --file FILEPath to docker-compose.yml file
--build / --no-build--buildBuild images before starting containers (on by default)

Examples:

# Start all services (builds by default)
aegra up

# Start only postgres
aegra up postgres

# Start without building
aegra up --no-build

# Start with a custom compose file
aegra up -f ./docker-compose.yml

aegra down

Stop services with Docker Compose.

aegra down [OPTIONS]

Options:

OptionDescription
-f, --file FILEPath to docker-compose.yml file
-v, --volumesRemove named volumes declared in the compose file

Examples:

# Stop all services
aegra down

# Stop and remove volumes (WARNING: data will be lost)
aegra down -v

# Stop with a custom compose file
aegra down -f ./docker-compose.yml

Environment Variables

The CLI respects the following environment variables (typically set via .env file):

# Database
POSTGRES_USER=aegra
POSTGRES_PASSWORD=aegra_secret
POSTGRES_HOST=localhost
POSTGRES_DB=aegra

# Authentication
AUTH_TYPE=noop  # Options: noop, custom

# Server (for aegra dev)
HOST=0.0.0.0
PORT=2026

# Configuration
AEGRA_CONFIG=aegra.json

Requirements

  • Python 3.12+
  • Docker (for aegra up and aegra down commands)
  • PostgreSQL (or use Docker)
  • aegra-api: Core API package providing the Agent Protocol server
  • aegra: Meta-package that installs both aegra-cli and aegra-api

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.10.81 Oct 20266

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 20:20 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:16d39afff3a72c83de7f1622fce5b964f15b328ed501c08f0f8e0955c5b63b44