Skip to content

GitOps with foureyesctl

import { Steps, Callout, Tabs } from ‘@astrojs/starlight/components’;

foureyesctl is the GitOps CLI. You declare tests, alert rules, and dashboards as YAML and reconcile them against a live server. Resources are name-keyed (reconcile matches on name, not id), so the same bundle applies cleanly across environments.

foureyesctl ships as a pre-built binary. Install it with the one-line installer:

Terminal window
curl -fsSL https://foureyes.space/install.sh \
| sh -s -- --component cli
CommandDoes
foureyesctl exportDump the live server’s config as YAML.
foureyesctl diff -f <file|dir>Show how your declared YAML diverges from live state.
foureyesctl apply -f <file|dir>Reconcile declared YAML into the server.

Global flags include --server, --ca-cert, --insecure (dev), and --token.

  1. Export the current state as a starting point:

    Terminal window
    foureyesctl export > bundle.yaml
  2. Edit bundle.yaml — add or change tests, alert rules, dashboards.

  3. Diff to preview the change:

    Terminal window
    foureyesctl diff -f bundle.yaml
  4. Apply (dry-run first, then for real):

    Terminal window
    foureyesctl apply -f bundle.yaml --prune --dry-run
    foureyesctl apply -f bundle.yaml --prune
# An HTTP test against an internal endpoint, alerting on two-of-three nodes.
apiVersion: foureyes/v1
kind: Test
metadata:
name: api-health
spec:
type: TEST_TYPE_HTTP
target: https://api.internal/healthz
interval: 30s
assignedNodes: [pop-a, pop-b, pop-c]
---
apiVersion: foureyes/v1
kind: AlertRule
metadata:
name: api-down
spec:
test: api-health
metric: success
threshold: 1 # success must be >= 1 (i.e. failing when 0)
operator: less_than
consecutiveRounds: 3
nodeThreshold: 2 # fire when >= 2 of 3 nodes are violating
`foureyesctl` speaks REST to the server. A proper operator bearer/mTLS auth path is a pre-multi-tenant follow-up; for now treat the endpoint as trusted.