crabenv

Sinks

Explicit managed deployment surfaces for crabenv variables

Sinks are optional deployment/build files that need crabenv variables.

crabenv only manages explicit marker blocks:

# crabenv:start format=<format> scope=<scope> owner=<owner>
# crabenv:end

Everything outside the markers is yours. Inside the markers, crabenv controls the variable list, ordering, and output shape for the selected format.

Supported formats

FormatFile typeOutput
gha-env.github/workflows/*.yml, .yamlGitHub Actions env: map entries
gha-echo.github/workflows/*.yml, .yamlshell echo lines that append to a dotenv file

Request here if you think a new format is necessary.

Marker fields

FieldRequiredMeaning
formatyesSink renderer, for example gha-env or gha-echo.
scopeyespublic, private, or all.
owneryesOne app/workspace path, for example apps/web or ..

Sync

crabenv doctor              # report sink drift
crabenv doctor --fix        # preview fix plan
crabenv doctor --fix --yes  # rewrite managed sink blocks

crabenv format / crabenv fmt does not rewrite sinks.

Rules

  • Sinks are opt-in. crabenv never infers variables from arbitrary deployment files.
  • format, scope, and owner are required.
  • Unknown options fail closed.
  • Supported GitHub Actions sinks scan .github/workflows/*.yml and .github/workflows/*.yaml.
  • Generated names come from schema variables for the selected owner/scope.
  • Entries are sorted with crabenv's deterministic env ordering.
  • If an existing generated line uses ${{ vars.NAME }} or ${{ secrets.NAME }}, crabenv preserves that GitHub namespace choice for that variable.