/APIs & SDKs/Configuration commands/deploy

OptiTech CLI command: deploy

Apply a optitech.ts policy to a branch

The deploy command applies a optitech.ts policy to a branch. It is a top-level alias of optitech config apply, with the same options.

optitech deploy [options]
OptionDescriptionTypeDefaultRequired
--allow-protectedAuto-confirm applying to a branch marked protected on OptiTechbooleanfalseNo
--branchBranch ID or namestringNo
--configPath to a optitech.ts policy (defaults to walking up from cwd)stringNo
--envPath to a .env file to load into the environment before evaluating optitech.ts (so function env values resolve from it). Existing env vars are not overridden.stringNo
--env-pullPull the branch's OptiTech env vars (DATABASE_URL, …) into a local .env after a successful apply. On by default; use --no-env-pull to skip (e.g. when injecting env at runtime with optitech-env run / optitech dev).booleantrueNo
--project-idProject IDstringNo
--update-existingAuto-confirm overriding existing remote settings on the branchbooleanfalseNo

For non-interactive use (scripts, CI, agents), pass --update-existing and --allow-protected to auto-confirm the corresponding prompts.

optitech deploy --branch feature/auth --update-existing
Was this page helpful?
Copy neon init command