One-shot local configurator for coding agents against a Substrate gateway
Project description
substrate-setup
One-shot configurator that points local coding agents at a Substrate gateway.
Install
substrate-setup requires Python 3.12+. The installers below pick the right interpreter automatically — you don't need a Python 3.12 already on your machine:
# Option A — uv (recommended; downloads Python 3.12 on demand if missing)
uv tool install substrate-setup
# Option B — pipx
pipx install substrate-setup
Don't have uv? Install it once with:
curl -LsSf https://astral.sh/uv/install.sh | sh # macOS / Linux
# or on Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Why not
pip install substrate-setup? It works only if thepipon your PATH is bound to a Python 3.12+ interpreter. Anaconda's defaultpip(Python 3.9) is the common pitfall — PyPI hides every release from it withRequires-Python >=3.12and the error message is unhelpful.uvandpipxboth create an isolated 3.12 venv for the tool, so they sidestep the issue entirely.
Use
export SUBSTRATE_API_KEY="sk-substrate-..." # or be prompted
substrate-setup configure # detect installed agents and wire them up
substrate-setup verify # read-only: confirm everything points at the gateway
substrate-setup remove # strip the substrate-managed entries
substrate-setup --help
Supported agents: hermes, cursor, aider, continue, claude-code, codex.
Subset with --agents-only hermes,aider. Preview without writing: --dry-run. Override the gateway base URL: --base-url https://your-gateway.example.com.
Per-agent catalog UX (0.3.0+)
| Agent | How it learns about Substrate's models |
|---|---|
hermes |
Live URL fetch via model_catalog.providers.substrate.url. Picker shows all chat-capable Substrate models, refreshed on Hermes' 24h TTL. |
cursor |
Walkthrough printed after configure — copy the base URL, key, and model ids into Cursor's Settings → Models. |
aider |
~/.aider.model.metadata.json written with one entry per chat-capable Substrate model. Use --model openai/<id> to switch. |
continue |
All chat-capable Substrate models written as separate models: entries in ~/.continue/config.yaml. |
claude-code |
~/.claude/settings.json env block (ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_MODEL). The /model picker stays opus/sonnet/haiku — use claude --model openai/<id> for any other Substrate model. Note: requires Substrate's /v1/messages endpoint, which is gated behind a Fly feature flag — until it's flipped, requests return 404. |
codex |
~/.codex/config.toml [model_providers.substrate] block with wire_api = "responses". Set SUBSTRATE_API_KEY in your shell rc. Note: requires Substrate's /v1/responses endpoint (gateway protocol adapters Phase 2 — not yet started). |
Project details
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 substrate_setup-0.3.0.tar.gz.
File metadata
- Download URL: substrate_setup-0.3.0.tar.gz
- Upload date:
- Size: 44.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2330ae9eb91ab72e8b335da54eeb50568749ae78444ed2029a6116b1324a224d
|
|
| MD5 |
50f92b757597db3db111bbd940518209
|
|
| BLAKE2b-256 |
77032408f776a934f63c540ef07823dd94f1b9722fda4e3a4b822949bff51b57
|
File details
Details for the file substrate_setup-0.3.0-py3-none-any.whl.
File metadata
- Download URL: substrate_setup-0.3.0-py3-none-any.whl
- Upload date:
- Size: 36.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
250708a8f00a0970cc1cef8a90625161859076b875e0cf6c7c3778069e1f7ed9
|
|
| MD5 |
cf4f81918581cb992f342593c8b2911e
|
|
| BLAKE2b-256 |
53ffa79b456042494c68d0d9575c0f04984a1a1d01bd90462d8e7f2ddc2d18e9
|