Skip to content

Verify config in CI

Goal: fail a pipeline when your committed ~/.agentsync/ config is invalid or references a secret that doesn’t exist — before it ever reaches a real machine.

verify validates the config and surfaces every unresolved ${secret:…} / ${env:…} reference.

Terminal window
agentsync verify

CI runners usually don’t have your age identity, so secret resolution would fail. Set AGENTSYNC_ALLOW_OFFLINE_VERIFY=1 to validate structure and reference syntax while skipping the actual decryption:

Terminal window
AGENTSYNC_ALLOW_OFFLINE_VERIFY=1 agentsync verify

This still catches schema errors and malformed references — it just doesn’t prove the vault contains each key.

.github/workflows/agentsync-verify.yml
name: agentsync verify
on: [push, pull_request]
jobs:
verify:
runs-on: ubuntu-latest
env:
AGENTSYNC_HOME: ${{ github.workspace }}/.agentsync
AGENTSYNC_ALLOW_OFFLINE_VERIFY: "1"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: go install github.com/spxrogers/agentsync/cmd/agentsync@latest
- run: agentsync verify