Skip to main content

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 the pip on your PATH is bound to a Python 3.12+ interpreter. Anaconda's default pip (Python 3.9) is the common pitfall — PyPI hides every release from it with Requires-Python >=3.12 and the error message is unhelpful. uv and pipx both 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

substrate_setup-0.3.0.tar.gz (44.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

substrate_setup-0.3.0-py3-none-any.whl (36.3 kB view details)

Uploaded Python 3

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

Hashes for substrate_setup-0.3.0.tar.gz
Algorithm Hash digest
SHA256 2330ae9eb91ab72e8b335da54eeb50568749ae78444ed2029a6116b1324a224d
MD5 50f92b757597db3db111bbd940518209
BLAKE2b-256 77032408f776a934f63c540ef07823dd94f1b9722fda4e3a4b822949bff51b57

See more details on using hashes here.

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

Hashes for substrate_setup-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 250708a8f00a0970cc1cef8a90625161859076b875e0cf6c7c3778069e1f7ed9
MD5 cf4f81918581cb992f342593c8b2911e
BLAKE2b-256 53ffa79b456042494c68d0d9575c0f04984a1a1d01bd90462d8e7f2ddc2d18e9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page