Configuration
Every PETROVA configuration knob is an environment variable. There is no config file — config-as-code wouldn’t survive the registry shape, and config-as-flags would clutter every invocation.
Environment variables
Section titled “Environment variables”| Variable | Default | Used by | Purpose |
|---|---|---|---|
PETROVA_HOME | walks up from cwd looking for registry.yaml + spec/verbs/_common.schema.json; falls back to ~/code/workspace/petrova-hq | All commands | Path to the petrova-hq checkout. Skills derive everything from here. |
PETROVA_WORKSPACE | parent directory of PETROVA_HOME | All commands | Where governed repos live (each at $PETROVA_WORKSPACE/<slug>). |
PETROVA_GITHUB_TOKEN | (none) | Write verbs --apply | Fine-grained PAT. See auth. |
PETROVA_APP_ID | (none) | Write verbs --apply | GitHub App numeric ID. |
PETROVA_APP_PRIVATE_KEY_PATH | (none) | Write verbs --apply | Path to App private key (.pem). |
PETROVA_APP_INSTALLATION_ID | (none) | Write verbs --apply | App installation ID. |
Auth resolution order
Section titled “Auth resolution order”cli/src/github-app.ts:resolveAuth():
- If
PETROVA_GITHUB_TOKENset → use PAT. - Else if all three of
PETROVA_APP_*set → use GitHub App. - Else → no auth (dry-run still works;
--applyerrors withAUTH_MISSING).
The PAT-first order is intentional: solo / dev iteration is more common than App-based automation, so the cheaper-to-rotate path wins precedence.
Examples
Section titled “Examples”Solo dev (PAT)
Section titled “Solo dev (PAT)”# .envrc or shell rcexport PETROVA_GITHUB_TOKEN="$(op read 'op://PETROVA/PETROVA_GITHUB_TOKEN/credential')"Multi-fleet (GitHub App)
Section titled “Multi-fleet (GitHub App)”export PETROVA_APP_ID=12345export PETROVA_APP_PRIVATE_KEY_PATH=~/.petrova/petrova-app.private-key.pemexport PETROVA_APP_INSTALLATION_ID=67890Custom workspace
Section titled “Custom workspace”# Repos cloned to ~/work/devarno/<slug>export PETROVA_WORKSPACE=~/work/devarnoOverride petrova root
Section titled “Override petrova root”# Run petrova from anywhere, pointing at a specific checkoutexport PETROVA_HOME=/srv/petrova-hqWhat is NOT configurable
Section titled “What is NOT configurable”- The verb catalogue — fixed at the 9 in
spec/verbs/. - The schema rules — schemas are authoritative.
- The privileged-paths denylist — hardcoded for safety.
- The default-branch name per repo — declared in
registry.yaml, not env. - Whether dry-run is the default — yes, always, no override.
See also
Section titled “See also”- Install — initial setup.
- Auth — credential setup.
- Output formats — table / json / markdown selection.