Skip to content
Weik.ioDocs
2026.2
Try Weik.io

Drift and export

Weik.io 2026.2

Find changes made by hand with a nightly weikio diff, and write what runs as YAML files with weikio export. Video

Watch: Deleting and undoing through Git, 3:59

The video deletes a deployment by removing its document from the repository and undoes the delete with git revert.

On this page

A nightly weikio diff shows which documents of your folder someone changed by hand with the CLI or the admin UI. Such a change is called drift. The next apply puts the document back, but leaves alone anything added by hand that the folder never had. To write what runs as YAML files, use weikio export.

A nightly drift check#

To see what somebody changed by hand, run weikio diff against production every night in a workflow such as this one:

.github/workflows/drift.yaml
name: drift
on:
  schedule:
    - cron: '0 3 * * *'
env:
  WEIKIO_SERVER: https://weikio.example.com
jobs:
  drift:
    runs-on: ubuntu-latest
    environment: production-plan
    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"
      - run: weikio diff -f ./finance/production --env production --prune finance

The job fails when the diff finds a difference, because weikio diff exits with 2 when Weik.io differs from the folder. The exit codes are fixed, so a pipeline can branch on them:

Exit code Meaning
0 No change
2 Changes or drift found, and the output lists them
7 A document or a directory would be refused
1 An error, such as an installation that can’t be reached

Changes made in the admin UI#

The admin UI saves into the same records the folder applies. When an apply replaces files or fields that a person saved in the admin UI, a warning row says whose save it replaced and when.

Prune keeps an integration made in the browser, because no apply of the folder put it there. It also keeps one that the folder put there and a person later switched to editing in the browser, and the apply lists that one as kept. To remove either of them, delete it by hand.

Export everything#

weikio export writes documents as multi-document YAML that applies again unchanged:

Terminal
$ weikio export --project finance --out-dir ./out

Without --out-dir, the YAML goes to standard output. These flags change what the export writes:

Flag What it does
--out-dir ./out Writes one file per kind, named for the kind in the plural, such as integrations.yaml or api-versions.yaml, and prints a line for each file it wrote
--env production Exports the documents of one environment

When a platform administrator exports with no project, the export starts with the installation’s settings.

An export never contains a secret’s value. Set the values again with weikio secret set where you apply the export.

Start a repository from what runs#

If your Weik.io installation started in the admin UI, an export moves it into Git:

  1. Export each project’s documents into the repository’s folders.
  2. Put each Camel integration’s folder of files beside them.
  3. Apply them from the pipeline with --prune.

The first apply with --prune deletes nothing.

Move between installations#

An export also moves a project to another installation, for example from a self-hosted installation to Weik.io Cloud or back:

Terminal
$ weikio export --project finance --out-dir ./finance-export
$ weikio apply -f ./finance-export --context new-hub

Then finish the move in the new installation:

  1. Apply each Camel integration’s directory from your repository, and the installation builds its versions.
  2. Set the secrets.
  3. Enrol the agents.
  4. Deploy the integrations.

Users and API keys don’t live in Git, so create them in the new installation too.

Sign in to the live demo

Sign in with the shared viewer account, which can open every screen of the example projects and can't change anything.

E-mail
viewer@demo.weik.io
Password
try-weikio-live-demo
Open the live demo