Agentic infrastructure provisioning from code analysis
Project description
Infera
Agentic infrastructure provisioning from code analysis. Infera analyzes your codebase, infers the optimal cloud architecture, and provisions resources automatically.
Features
- Intelligent Analysis: Detects frameworks (React, Vue, FastAPI, Django, etc.) and dependencies
- Best Practice Templates: Uses proven architecture patterns for different project types
- Cost Estimation: Shows per-resource and total monthly cost estimates
- Hybrid Execution: Uses cloud SDKs for simple resources, Terraform for complex setups
- Rollback on Failure: Atomic provisioning with automatic cleanup
Quick Setup
1. Install via pipx (recommended)
pipx install infera
Or with pip:
pip install infera
2. Set your Anthropic API key
export ANTHROPIC_API_KEY="your-api-key"
3. Configure your cloud provider
# For GCP
gcloud auth login
gcloud config set project YOUR_PROJECT_ID
4. Run infera
cd /path/to/your/project
infera init # Analyze codebase and create config
infera plan # Preview infrastructure and costs
infera apply # Provision resources
Installation Options
pipx (isolated environment)
pipx install infera
pip (global)
pip install infera
From source (development)
git clone https://github.com/computer-reinvention/infera.git
cd infera
uv sync
uv run infera --help
Requirements
- Python 3.11+
- Google Cloud SDK (for GCP provider)
ANTHROPIC_API_KEYenvironment variable
CLI Commands
| Command | Description |
|---|---|
infera init |
Analyze codebase and create configuration |
infera plan |
Generate execution plan with cost estimate |
infera apply |
Provision infrastructure |
infera destroy |
Tear down all resources |
infera status |
Show current infrastructure state |
Supported Architectures
- Static Site: React, Vue, Angular → Cloud Storage + CDN
- API Service: FastAPI, Flask, Express → Cloud Run
- Full Stack: Next.js, Django → Cloud Run + Cloud SQL
- Containerized: Dockerfile → Cloud Run from container
Configuration
After infera init, configuration is stored in .infera/config.yaml:
version: "1.0"
project_name: my-app
provider: gcp
region: us-central1
resources:
- id: app
type: cloud_run
name: my-app
config:
image: gcr.io/my-project/my-app:latest
memory: 512Mi
min_instances: 0
Development
# Install dev dependencies
uv sync
# Run tests
uv run pytest
# Type checking
uv run pyright
# Format code
uv run ruff format .
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file infera-0.1.0.tar.gz.
File metadata
- Download URL: infera-0.1.0.tar.gz
- Upload date:
- Size: 503.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dce59997334628af9858730e6e2c161ff4264e76079ff5c1b0920ab38ccd717c
|
|
| MD5 |
981a5e0f0cab8b01d48ed7f6466e75e7
|
|
| BLAKE2b-256 |
f4a0c25a731cf0f33e7ebf666d98e4e7af36ec8f10a5baf557add6b0203094b9
|
File details
Details for the file infera-0.1.0-py3-none-any.whl.
File metadata
- Download URL: infera-0.1.0-py3-none-any.whl
- Upload date:
- Size: 543.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0ccdcef61df5cc269747d2d86042ac9597120bf72c7674844e8d589f1f19f25
|
|
| MD5 |
755dd5282335f85a0273fafdacd91875
|
|
| BLAKE2b-256 |
f3587a00c7494e997f71c9497850c3685fe7e985d7b1b1b18e2c290e361cd8ca
|