Variable syntax
Reqbook supports two placeholder forms that can appear anywhere in request blocks, response blocks, and pipeline definitions. Inline variable resolved from any variable source::param in the path frontmatter field and URL paths; use {{name}} everywhere else.
Resolution priority
When the same variable name appears in more than one source, the highest-priority source wins. Reqbook resolves variables in this order, from highest to lowest:The web UI, CLI, flows, and agent tools use the same priority order. A request that runs in the browser should resolve the same variables when an agent or CI runs it.
Priority in practice
Environment template and local values
api-docs/_shared/env.template.md stores the shared shape and safe defaults for each environment. api-docs/_shared/env.md stores the local values used at runtime and is gitignored by default. Select an environment with --env=<name>.
.env.local local secrets
.env.local uses standard dotenv syntax. It is gitignored by default and is never committed to version control.
RQB_* environment variables
Reqbook reads only variables prefixed withRQB_ from the OS environment. The prefix is stripped and the remainder is converted to lower camelCase before resolution.
CI/CD pattern
Set secrets as masked CI environment variables and map them with theRQB_ prefix:
Missing variables
If a variable cannot be resolved from any source, Reqbook exits with code 2 before making any network request. The error message names the variable and lists the ways to fix it.Nested variables
the current Reqbook release does not resolve variables recursively. If resolving{{baseUrl}} produces a string that contains another {{variable}}, Reqbook returns an error rather than performing a second resolution pass.