oe.env sync
Configure oe.env sync targets, variables, and dry runs
Use oe.env sync to load variables from varlock and sync them to Vercel, GitHub
Actions secrets and variables, and/or CircleCI.
Options
| Option | Default | Description |
|---|---|---|
--vercel | preview, production | Sync to Vercel defaults. |
--vercel=<env> | None | Sync to one Vercel environment. Repeatable. |
--vercel=<project>:<env> | None | Sync to one Vercel environment for a specific project. Repeatable. |
--circle-ci | preview | Sync to the default CircleCI source environment. |
--circle-ci=<env> | None | Sync to one CircleCI source environment. |
--circle-ci=<project>:<env> | None | Sync to one CircleCI project and source environment. |
--github | preview | Sync preview values to GitHub. Uses OE_ENV_GITHUB_ENVIRONMENT when set, otherwise repository scope. |
--github=<env> | None | Sync one source environment to GitHub. Uses OE_ENV_GITHUB_ENVIRONMENT when set, otherwise repository scope. |
--github=<github-env>:<env> | None | Sync one source environment to an explicit GitHub environment. |
--include=<names> | All syncable names | Comma-separated variable names to sync. |
--exclude=<names> | None | Comma-separated variable names to omit from the selected sync set. |
--dry-run | false | Validate and preview without making changes. |
When no target flags are provided, the tool attempts the default targets:
vercel:preview, vercel:production, and circle-ci:preview. GitHub is opt in
and is not part of the default target set. In this implicit mode, unavailable
services are skipped. When a target flag is provided explicitly, that service
must pass its checks or the command exits with an error.
Valid source environments are development, preview, and production.
Bare service flags select their default environments. You can also pass
default explicitly. Both --vercel preview and --vercel=preview are
accepted. Empty values, such as --vercel=, are rejected.
Use oe.env sync --help to show usage.
GitHub Actions usage
When syncing to GitHub, varlock sensitivity decides the destination: sensitive
values are available through the secrets context, and non-sensitive values
are available through the vars context.
Reference synced values in your workflow files:
KRAKEN_GRAPHQL_ENDPOINT: ${{ vars.KRAKEN_GRAPHQL_ENDPOINT }}
KRAKEN_X_CLIENT_IP_SECRET_KEY: ${{ secrets.KRAKEN_X_CLIENT_IP_SECRET_KEY }}Target limitations
CircleCI only supports one source environment per sync. Vercel and GitHub support multiple targets when every target resolves to a distinct final destination. Vercel destinations are project and environment pairs. GitHub destinations are repository scope or GitHub environment scope. The command exits with an error when two targets resolve to the same destination.