Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Flux CLI

$ flux Foundation High Risk
CNCF / Flux Project · Cloud & Infra · Apache-2.0 · macos / linux / windows

Flux CLI (flux) operates Flux v2 GitOps controllers on Kubernetes, providing cluster pre-flight verification (flux check), dry-run diffing (flux diff kustomization), --export declarative YAML generation, and reconciliation controls.

FCRS-1.0 Score
82 /100
Good
Medium Confidence
Zero-Friction Install
brew install fluxcd/tap/flux
CLI vs MCP Decision CLI Preferred vs MCP

flux diff and flux check inspect local manifests against live Kubernetes clusters directly using ~/.kube/config.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 18 / 25

Supports flux diff and --export cleanly, but flux get emits tabular text rather than native -o json.

  • Supports flux diff and --export; lacks universal -o json on get
Trust & Safety 21 / 25

--export promotes pure declarative GitOps commits and flux diff performs safe server-side dry-run previews.

  • --export avoids imperative cluster writes; flux diff is read-only
Setup & Portability 14 / 15

Single static Go binary via Homebrew tap or official releases across macOS, Linux, and Windows.

  • Single Go binary via brew install fluxcd/tap/flux
Utility & Efficiency 12 / 15

Streamlines Flux CRD authoring, diffing, and reconciliation triggers.

  • Dedicated tooling for Flux v2 CRDs and reconciliation
Maintenance & Lineage 9 / 10

CNCF graduated project (fluxcd/flux2) maintained under Apache-2.0.

  • Official CNCF fluxcd/flux2 repository
Docs & Verifiability 8 / 10

Detailed fluxcd.io/flux/cmd/ reference and --help.

  • Official docs at fluxcd.io/flux/cmd/

Security, Auth & Guardrails

Auth Modes
Config File Env API Key
Credential Storage

Reads cluster access from ~/.kube/config (KUBECONFIG); bootstrap commands optionally read GITHUB_TOKEN or GITLAB_TOKEN.

Side Effects
Read-Only Local Write Remote Write Destructive
Cost & Quotas

100% open-source (Apache-2.0); reconciled workloads consume cluster resources.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Flux CLI Agent Rules
- Always pass `--context` and `-n <namespace>` explicitly on Flux commands.
- Prefer `--export` to generate Git-tracked YAML rather than mutating clusters imperatively.
- Run `flux diff kustomization` before committing or reconciling changes; pair with `kubectl get ... -o json` when JSON is needed.

Agent-Ready Command Recipes

Safe Read-Only Queries

Run cluster prerequisites and controller health check
flux check

Verifies Kubernetes version compatibility and Flux controller health without mutating state.

Diff local Kustomization manifests against live cluster
flux diff kustomization my-app --path=./clusters/prod

Previews server-side apply differences between local Git manifests and cluster resources.

Controlled Writes & Previews

Generate a Flux resource manifest locally with --export
flux create source git my-repo --url=https://github.com/org/repo --branch=main --export

Emits declarative YAML to stdout for Git commit instead of mutating the cluster directly.

Strengths for Agents

  • + --export outputs clean GitOps YAML instead of mutating live clusters.
  • + flux diff kustomization computes accurate server-side dry-run diffs.
  • + Fast single Go binary with explicit --context and --namespace flags.

Caveats & Pitfalls

  • ! Lacks -o json on flux get; use kubectl get kustomizations -o json for JSON output.
  • ! flux bootstrap requires GITHUB_TOKEN or SSH keys and writes commits to Git.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI