GitOps and the CLI
Your pipeline applies your integrations, variables, channels, APIs and what runs where from your Git repository with the weikio CLI. Weik.io needs no Git credentials and no network path to your Git host. Secret values go into Weik.io and never into the repository.
From pull request to production
The example repository contains the project finance. Its shared documents (integrations, channels and APIs) are in finance/shared. What runs in each environment is in finance/devtest and finance/production.
A change starts in a folder in Git. A pull request runs weikio diff, and the pipeline posts the plan as a comment. The merge runs weikio apply and the change reaches devtest. Promoting a tested version to production is a pull request that changes the version, and production applies it after the repository's required reviewers approve. git revert rolls a change back through the same steps.
Plan in the pull request
The pull request workflow runs
weikio diffwith the devtest key and posts its output as a comment. In the comment you see the versions an apply would create, the variables that change, the deployments that move and what it would delete. If a changed integration has no new version,weikio diffmarks it as refused and fails the check before anyone merges.Terminal$ weikio diff -f ./finance/shared -f ./finance/devtest --env devtest --prune financeMerge to apply to devtest
On merge to
mainthe devtest workflow applies the integrations, channels, APIs, variables and deployments in one call. Weik.io builds each changed integration once, in this step. You deploy the same versions to the other environments.Terminal$ weikio apply -f ./finance/shared \ -f ./finance/devtest --env devtest --prune finance -yPromote with a pull request
To promote, change the version in the production deployment file. The reviewer then sees what will run.
finance/production/ deployments/ erp-invoice-export.yaml apiVersion: weik.io/v1 kind: deployment metadata: { name: erp-invoice-export, project: finance, environment: production } spec: { version: 1.1.0, state: started }Apply to production after review
The production workflow plans in a job of its own. Its apply job waits in GitHub's
productionenvironment until the required reviewers have read the plan and approved.Terminal$ weikio apply -f ./finance/production --env production --prune finance -yRoll back with a revert
A revert of the promotion goes through the same review and puts the earlier version back without a build. In an incident,
weikio rollbackputs the earlier version back. The next apply from Git sets the deployment back to the version in the repository.Terminal$ git revert a1b2c3d
The workflow file
In GitHub Actions, the production workflow is a plan job and an apply job. Any CI system that runs a shell command works the same way.
name: production
on:
push:
branches: [main]
paths: ['finance/**']
env:
WEIKIO_SERVER: https://weikio.example.com
jobs:
plan: # the diff the reviewers read before they approve
runs-on: ubuntu-latest
environment: production-plan # has the production key, no reviewers
env:
WEIKIO_API_KEY: ${{ secrets.WEIKIO_API_KEY }}
steps:
- uses: actions/checkout@v4
- run: | # installs the CLI, pinned version, and gives the commit's subject line as the reason
curl -fsSL https://weik.io/install.sh | WEIKIO_CLI_VERSION=2026.2.4 sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "WEIKIO_REASON=$(git log -1 --format=%s)" >> "$GITHUB_ENV"
- run: weikio diff -f ./finance/production --env production --prune finance || [ $? -eq 2 ]
apply:
needs: plan
runs-on: ubuntu-latest
environment: production # waits for GitHub's required reviewers
env:
WEIKIO_API_KEY: ${{ secrets.WEIKIO_API_KEY }}
steps:
- uses: actions/checkout@v4
- run: |
curl -fsSL https://weik.io/install.sh | WEIKIO_CLI_VERSION=2026.2.4 sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "WEIKIO_REASON=$(git log -1 --format=%s)" >> "$GITHUB_ENV"
- run: printf '%s' "$ERP_API_KEY" | weikio secret set finance/erp-api-key --env production -y
env: # after the approval, like the apply
ERP_API_KEY: ${{ secrets.ERP_API_KEY }}
- run: weikio apply -f ./finance/production --env production --prune finance -yWhat keeps it safe
Keys per environment
For each repository, you create one API key per environment and give it the deployer role on the repository's projects. The devtest key can't change production even if someone edits the workflow. In the audit log, you see the key and the commit's subject line as the reason for each change.
Docs: Keep integrations in GitPrune and drift
--prune deletes only what is no longer in the folder. weikio diff --prune exits non-zero when Weik.io differs from the folder. Run it nightly against production as your drift check.
Export
weikio export writes every document of a project, or of the installation, as YAML that applies again unchanged. Secrets come out without their values.
The commit in the audit log
The CLI records the repository, branch and commit of every apply from a pipeline. weikio describe integration shows applied from weikio-integrations@a1b2c3d. In the audit log, you open the commit from the apply's record.




weikio audit query line.The CLI
The weikio commands that read or change Weik.io call its HTTP API. You publish a version with apply and run it in an environment with deploy. While you develop, run does both.
weikio --help groups the commands under Getting started, Develop, Deploy and run, Configuration, Events and data, APIs, Agents, Access and Administration. Commands print tables for people and accept -o json and -o yaml for scripts. Completion is available for bash, zsh, fish and PowerShell.
$ curl -fsSL https://weik.io/install.sh | shirm https://weik.io/install.ps1 | iexChanges in the admin UI
Changes made in the admin UI are versions like any other. In a dialog, you see the CLI line that does the same thing. A change saved in the browser is in the audit log with the person who made it. To get it into Git, run weikio export.




weikio member add line.Editors
Weik.io serves the JSON schema of every document kind at GET /api/v1/schemas/{kind}. The schemas are also in the schemas/ folder of the GitHub repository. The YAML language server validates and completes your files with them in Visual Studio Code and other editors.
Questions
Does Weik.io pull from my repository?
No, your pipeline pushes with the CLI. Weik.io needs no Git credentials and no network path to your Git host.
Which CI systems work?
Any CI system that runs a shell command works. For GitHub Actions, you find complete workflows for the plan, devtest and production in the docs.
Can I work without Git?
Yes, the admin UI and the CLI change the same documents. When you want them in Git, weikio export writes them out.
Where do secret values go?
Secret values go into Weik.io with weikio secret set, from a terminal or from a pipeline step after the approval. They never go into the repository.
Read the GitOps docs
In the guide, you set up the plan workflow and the devtest and production workflows in your repository.




