A full-featured APISIX resource sync tool powered by Bash + jq.
Declarative. Lightweight. Git-friendly. Built for developers.
- ✅ Sync
routes
,upstreams
, andservices
in one pass - ✅ Supports
--dry-run
,--check
,--list
,--prune
- ✅ Accurate diff preview using
jq
-based JSON comparison - ✅ Clean CLI output for CI/CD and GitOps-friendly workflows
- ✅ Zero dependencies beyond
bash
,curl
, andjq
apisix-sync/
├── sync.sh
├── env/
│ └── dev.env
├── routes/
│ └── dev.json
├── services/
│ └── dev.json
├── upstreams/
│ └── shared.json
./sync.sh --env dev --dry-run # Show changes without applying
./sync.sh --env dev --sync # Apply changes to APISIX
./sync.sh --env dev --sync --prune # Sync and delete undeclared remote resources
./sync.sh --env dev --check # Check whether declared resources exist
./sync.sh --env dev --list # List remote routes, services, and upstreams
Each resource file is a pure JSON array. Only the id
field is required per object.
# env/dev.env
ADMIN="http://localhost:8000/apisix/admin"
ADMIN_KEY="your-admin-api-key"
[
{
"id": "auth-login",
"uri": "/auth/login",
"service_id": "zenglow-auth-service"
}
]
- bash ≥ 4.x
- curl
- jq ≥ 1.6
- Vemax — Builder of gateways and configuration master
- Copilot — Your loyal scripting sidekick 🤖✨