Environment variables¶
These are the variables the rtb binary in this repository reads. A tool
you scaffold reads its own set — a tool named mytool with typed config
reads MYTOOL_* — which is a
configuration concern, not
this one.
AI provider keys¶
The scaffolder's AI paths (generate command --prompt / --script,
generate flag without --description, generate docs --provider)
resolve a key from the environment. There is no config-file or keychain
path for these — the key must be in the environment of the rtb process.
--provider |
Variable, in order tried | Required |
|---|---|---|
anthropic (alias claude) |
ANTHROPIC_API_KEY |
yes |
anthropic-local (alias claude-local) |
ANTHROPIC_API_KEY |
yes |
openai |
OPENAI_API_KEY |
yes |
openai-compat (alias openai-compatible) |
OPENAI_API_KEY |
yes |
gemini (alias google) |
GEMINI_API_KEY, then GOOGLE_API_KEY |
yes |
ollama |
none | no — an empty key is used |
An empty string counts as unset, so ANTHROPIC_API_KEY= behaves the same
as not exporting it at all. When nothing matches, the run fails before
any file is touched:
Only the well-known variable names above are consulted. A
<TOOL>_<PROVIDER>_API_KEY form is described in the source comments but
is not implemented; see what RTB does not
do.
Default models¶
When --model is omitted, the provider decides the default:
| Provider | Default model |
|---|---|
anthropic, anthropic-local |
claude-opus-4-7 |
openai, openai-compat |
gpt-4o |
gemini |
gemini-2.0-flash |
ollama |
llama3.3:70b |
Provider catalogues move, and these are compiled-in constants. A default
that a provider has retired surfaces as a provider error naming the
model — override it with --model rather than waiting for a release.
RTB_AI_BASE_URL¶
Overrides the provider endpoint for every scaffolder AI call.
- Default: unset — each provider's standard endpoint is used.
- Effect when set: the URL is parsed, and insecure base URLs are
allowed, so
http://127.0.0.1:…is accepted.
It exists for tests that stand a mock provider up on loopback. Setting it in a real session disables the HTTPS requirement that normally protects your API key in transit, so do not export it in a shell you also use for live provider calls.
CARGO¶
The verifier loop behind generate command --prompt shells out to
cargo check --quiet after each draft. It uses $CARGO when set and
falls back to cargo on PATH — so under cargo run, the same
toolchain that launched rtb is the one that checks the generated code.
CARGO_TARGET_DIR is deliberately removed from the child's environment
so the check builds inside the scaffolded project rather than into the
parent's target directory.
CI¶
rtb telemetry enable refuses to run when CI=true. Consent is a
human decision, and a CI image is not a human.
Related¶
rtb generate— which commands take--provider.- What RTB does not do — the gaps in the above.