Skip to content

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.

VariableDefaultUsed byPurpose
PETROVA_HOMEwalks up from cwd looking for registry.yaml + spec/verbs/_common.schema.json; falls back to ~/code/workspace/petrova-hqAll commandsPath to the petrova-hq checkout. Skills derive everything from here.
PETROVA_WORKSPACEparent directory of PETROVA_HOMEAll commandsWhere governed repos live (each at $PETROVA_WORKSPACE/<slug>).
PETROVA_GITHUB_TOKEN(none)Write verbs --applyFine-grained PAT. See auth.
PETROVA_APP_ID(none)Write verbs --applyGitHub App numeric ID.
PETROVA_APP_PRIVATE_KEY_PATH(none)Write verbs --applyPath to App private key (.pem).
PETROVA_APP_INSTALLATION_ID(none)Write verbs --applyApp installation ID.

cli/src/github-app.ts:resolveAuth():

  1. If PETROVA_GITHUB_TOKEN set → use PAT.
  2. Else if all three of PETROVA_APP_* set → use GitHub App.
  3. Else → no auth (dry-run still works; --apply errors with AUTH_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.

Terminal window
# .envrc or shell rc
export PETROVA_GITHUB_TOKEN="$(op read 'op://PETROVA/PETROVA_GITHUB_TOKEN/credential')"
Terminal window
export PETROVA_APP_ID=12345
export PETROVA_APP_PRIVATE_KEY_PATH=~/.petrova/petrova-app.private-key.pem
export PETROVA_APP_INSTALLATION_ID=67890
Terminal window
# Repos cloned to ~/work/devarno/<slug>
export PETROVA_WORKSPACE=~/work/devarno
Terminal window
# Run petrova from anywhere, pointing at a specific checkout
export PETROVA_HOME=/srv/petrova-hq
  • 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.