Camp Codegen: Python SDK and colorful CLI for AI-assisted smart contract generation, compilation, and deployment
Project description
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
client = AcadClient() # uses default Railway API + env overrides
# Start the AI pipeline
job_id = client.start_pipeline(
prompt="ERC721 with minting",
network="basecamp",
max_iters=5,
filename="AIGenerated.sol",
)
# 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="basecamp",
)
print(res)
Quick Start (CLI)
Camp Codegen provides two equivalent entry points:
camp
# or
acad
You’ll be prompted for Base URL (default: Railway), API Key (optional), and Auth header (default: X-API-Key). The menu offers:
- AI pipeline
- Job status
- Log streaming
- Artifacts (print or save)
- ERC20 deploy
- AI helpers (generate/fix/compile)
Configuration
Environment variables:
ACAD_API_KEY– API key (optional)ACAD_BASE_URL– override base URL (default: production Railway)ACAD_AUTH_HEADER– override auth header name (default:X-API-Key)ACAD_DEFAULT_OWNER– default owner address for ERC20 (optional; built‑in default is set)
Error Handling
Errors are raised as AcadError with fields status, code, and details. The CLI pretty‑prints error details.
Project Layout
acad_sdk/– SDK packageclient.py–AcadClientandAcadErrorcli.py– Rich‑powered CLI entrypoint (also exposed ascampandacad)
acad_cli.py– standalone CLI script (same UX)
License & Attribution
MIT License.
Created by BlockX Internet — https://blockxint.com
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 camp_codegen-0.1.1.tar.gz.
File metadata
- Download URL: camp_codegen-0.1.1.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca587f794a2b910d6a529580fd7dd21d6bea3a32823b28971ad2f28fc3fddd3f
|
|
| MD5 |
9589b4a1b5a629754b83ed27c365bb0f
|
|
| BLAKE2b-256 |
fb5ea19f76da50c39f6ebf3ae4bb941f4ddb9601f134381682285f6bf2f1f394
|
File details
Details for the file camp_codegen-0.1.1-py3-none-any.whl.
File metadata
- Download URL: camp_codegen-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d25f691447b14087d0f1a52251d1c251298a3666a73c94b5a2195352f6f3bf5
|
|
| MD5 |
b0782df640d4c6ad838a7ad17e4834d8
|
|
| BLAKE2b-256 |
bbb5a3b76ac972c6b5eaa635e06b7835d040486c3124ffee0884b61adbcb1c8b
|