Skip to main content

Camp Codegen

Camp Codegen is a Python SDK and colorful interactive CLI for AI‑assisted smart contract generation, compilation, and deployment.

  • Default API: https://acadcodegen-production.up.railway.app
  • Default auth header: X-API-Key: <key> (configurable)
  • Maintained by: BlockX Internet — https://blockxint.com

Features

  • AI → Compile → Deploy pipeline (one prompt to deployed contract)
  • One‑click ERC20 deployment (with default owner wallet)
  • Artifacts access (sources, ABIs, scripts, combined JSON)
  • Live job status and log streaming
  • AI helpers: generate, fix, and compile Solidity
  • Colorful, interactive CLI (Rich‑powered)

Installation

From PyPI:

pip install camp-codegen

Or editable install in a repo checkout:

pip install -e .

Quick Start (SDK)

from acad_sdk import AcadClient

# Uses default Railway API and built-in defaults (network=basecamp, etc.)
client = AcadClient()

# Start the AI pipeline with minimal inputs
job_id = client.start_pipeline_auto(
    prompt="ERC721 with minting",  # max iters/filename auto
)

# Wait and stream logs until completion
final = client.wait_for_completion(job_id, stream_logs=True)
print("Final:", final)

# Fetch artifacts
sources = client.get_sources(job_id)
abis = client.get_abis(job_id)
scripts = client.get_scripts(job_id)

One‑click ERC20

from acad_sdk import AcadClient

client = AcadClient()
res = client.deploy_erc20(
    name="Camp Token",
    symbol="CAMP",
    initial_supply="1000000",
    # network/owner auto-filled from defaults
    network=None,
    owner=None,
)
print(res)

Quick Start (CLI)

Camp Codegen provides two equivalent entry points:

camp
# or
acad

By default, the CLI uses built-in defaults and environment variables (if set). There are no auth prompts; set env vars if needed. The menu offers:

  • AI pipeline
  • Job status
  • Log streaming
  • Artifacts (print or save)
  • ERC20 deploy
  • AI helpers (generate/fix/compile)

CLI Examples

  • Run the AI pipeline
camp
# Choose: "Run AI → Compile → Deploy pipeline"
# Prompt: ERC721 with minting
# (network/maxIters/filename are auto)
# Wait for completion and stream logs: yes
  • Check status
camp
# Choose: "Check job status"
# Job ID: <paste job id>
  • Stream logs
camp
# Choose: "Stream job logs"
# Job ID: <paste job id>
# Start cursor: 0
# Follow: yes
  • Fetch artifacts (print or save to folder)
camp
# Choose: "Fetch artifacts"
# Job ID: <paste job id>
# Include: all   # or sources|abis|scripts
# Output directory (optional): ./artifacts
  • Deploy ERC20 (uses default owner if not provided)
camp
# Choose: "One-click ERC20 deploy"
# Name: Camp Token
# Symbol: CAMP
# Initial supply: 1000000
# (network/owner auto)
  • Environment overrides
# optional: provide auth and tweak defaults
export ACAD_API_KEY="<your-key>"
export ACAD_AUTH_HEADER="X-API-Key"
export ACAD_BASE_URL="https://acadcodegen-production.up.railway.app"
export ACAD_DEFAULT_NETWORK="basecamp"
export ACAD_DEFAULT_OWNER="0xYourWalletAddress"
export ACAD_MAX_ITERS="5"
export ACAD_DEFAULT_FILENAME="AIGenerated.sol"
camp

Configuration

Environment variables:

  • ACAD_API_KEY – API key (optional)
  • ACAD_AUTH_HEADER – auth header name (default: X-API-Key)
  • ACAD_BASE_URL – base URL (default: production Railway)
  • ACAD_DEFAULT_NETWORK – default network (default: basecamp)
  • ACAD_DEFAULT_OWNER – default owner for ERC20 (built-in default provided)
  • ACAD_MAX_ITERS – default max iterations for pipeline (default: 5)
  • ACAD_DEFAULT_FILENAME – default filename for generated code (default: AIGenerated.sol)

Error Handling

Errors are raised as AcadError with fields status, code, and details. The CLI pretty‑prints error details.

Project Layout

  • acad_sdk/ – SDK package
    • client.py – AcadClient and AcadError
    • cli.py – Rich‑powered CLI entrypoint (also exposed as camp and acad)
  • acad_cli.py – standalone CLI script (same UX)

License & Attribution

MIT License.

Created by BlockX Internet — https://blockxint.com

API Reference (Production)

  • Base URL: https://acadcodegen-production.up.railway.app
  • Auth header: X-API-Key: <your-key> (optional if your deployment allows anonymous)

1) AI Pipeline

Start the AI → Compile → Deploy pipeline

Request

POST /api/ai/pipeline
Content-Type: application/json
X-API-Key: <your-key>

{
  "prompt": "ERC721 with minting",
  "network": "basecamp",
  "maxIters": 5,
  "filename": "AIGenerated.sol"
}

Response (job started)

{
  "ok": true,
  "job": {
    "id": "ai_pipeline_<uuid>",
    "state": "running",
    "progress": 5,
    "step": "init"
  }
}

2) Job Tracking

Status

GET /api/job/:id/status

Response (completed)

{
  "ok": true,
  "data": {
    "id": "ai_pipeline_<uuid>",
    "state": "completed",
    "progress": 100,
    "step": "deploy",
    "result": {
      "network": "basecamp",
      "deployer": "0xDeployerAddress",
      "contract": "MyContract",
      "address": "0xDeployedContract",
      "params": { "args": [] },
      "explorerUrl": "https://basecamp.cloud.blockscout.com/address/0xDeployedContract"
    }
  }
}

Logs (stream)

GET /api/job/:id/logs?since=0
{
  "ok": true,
  "data": {
    "logs": [
      { "level": "info", "msg": "Compiled successfully" },
      { "level": "info", "msg": "Deployed at 0xDeployedContract" }
    ],
    "since": 2
  }
}

3) Artifacts

Combined

GET /api/artifacts?include=all&jobId=<jobId>

Sources

GET /api/artifacts/sources?jobId=<jobId>

ABIs

GET /api/artifacts/abis?jobId=<jobId>

Scripts

GET /api/artifacts/scripts?jobId=<jobId>

4) One‑Click ERC20

Request

POST /api/deploy/erc20
Content-Type: application/json
X-API-Key: <your-key>

{
  "name": "Camp Token",
  "symbol": "CAMP",
  "initialSupply": "1000000",
  "owner": "0xa58DCCb0F17279abD1d0D9069Aa8711Df4a4c58E",
  "network": "basecamp"
}

Response

{
  "ok": true,
  "result": {
    "network": "basecamp",
    "deployer": "0xDeployerAddress",
    "contract": "BusinessToken",
    "address": "0xNewTokenAddress",
    "params": {
      "name": "Camp Token",
      "symbol": "CAMP",
      "initialSupply": "1000000",
      "owner": "0xa58DCCb0F17279abD1d0D9069Aa8711Df4a4c58E"
    },
    "explorerUrl": "https://basecamp.cloud.blockscout.com/address/0xNewTokenAddress"
  }
}

Testing

Here are simple ways to verify the SDK and CLI locally.

  • Install from PyPI
python -m venv .venv && source .venv/bin/activate
python -m pip install --upgrade pip
pip install camp-codegen
  • SDK import smoke test
python - <<'PY'
from acad_sdk import AcadClient
print('AcadClient OK:', bool(AcadClient))
PY
  • CLI help and basic navigation
camp --help || acad --help
camp
# explore the menu; press Ctrl+C to exit
  • End-to-end pipeline (integration test)
camp
# Run "AI → Compile → Deploy pipeline" with the defaults
# Confirm streaming logs and wait for completion
  • Artifacts retrieval
camp
# Choose "Fetch artifacts" → Include: all → Output dir: ./artifacts
ls -la ./artifacts
  • ERC20 deploy
camp
# Choose "One-click ERC20 deploy" (network/owner auto)
  • From source (editable)
git clone <this repo>
cd <repo>
python -m venv .venv && source .venv/bin/activate
pip install -e .
camp

Metadata

Release files for camp-codegen 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for camp-codegen 2.0.0
File Size Uploaded Provenance Actions
camp_codegen-2.0.0.tar.gz 12.8 kB Without provenance Details for camp_codegen-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for camp-codegen 2.0.0
File Interpreter ABI Platform Actions
camp_codegen-2.0.0-py3-none-any.whl Python 3 none any Details for camp_codegen-2.0.0-py3-none-any.whl

Total release size: 24.3 kB

Release files / camp_codegen-2.0.0.tar.gz

Download URL camp_codegen-2.0.0.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7bf6b81bf5fa5cf8a49c578a5add14e5008d36cd26bc2533b1f9392348438202
BLAKE2b-256 checksum
How to use checksums
ccba5966ec84ee8440ca70c3dc7338c574bcfd8f61f3def42f6eeb8b62a917c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release files / camp_codegen-2.0.0-py3-none-any.whl

Download URL camp_codegen-2.0.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6777176f370465e958a200e6578ed8fb6202ce1c0e4dac221f34234336a35e19
BLAKE2b-256 checksum
How to use checksums
afeaebf5f3902a603c8a332fecf6ffee72e81b1f91dc92d84fece913e2c83ac4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Security for camp-codegen 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page