Fastly CLI
$ fastly Official High RiskFastly CLI (fastly) configures Fastly CDN services, VCL/Compute@Edge deployments, KV/Config stores, and cache purges from a Go binary equipped with --json, --non-interactive, --auto-yes (-y), and --profile token isolation.
brew install fastly/tap/fastly fastly has first-class --non-interactive and --json flags plus local Compute build/serve tooling.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Explicit --non-interactive, --auto-yes, and --json global flags make fastly exceptionally clean for headless automation.
- Global
--json,--non-interactive, and--auto-yesflags
Versioned draft-then-activate service model and --profile token scoping prevent accidental live CDN breaks, though purge --all is high-risk.
- Draft version cloning separates edits from live activation
Single static Go binary installable via Homebrew tap, go install, or GitHub releases.
- Cross-platform Go binary distribution
Covers VCL, Compute builds, dictionaries, and KV stores cleanly.
- Complete CDN and Compute@Edge CLI coverage
Official fastly/cli repository actively maintained by Fastly.
- Official
fastly/cliunder Apache-2.0
Detailed command reference at fastly.com/documentation/reference/cli/ and strong --help.
- Complete CLI reference docs
Security, Auth & Guardrails
Stores profiles in ~/.config/fastly/config.toml, or reads FASTLY_API_TOKEN / --token.
CLI is free (Apache-2.0); Fastly CDN/Compute traffic incurs account billing.
# Fastly CLI Agent Rules - ALWAYS pass `--json --non-interactive` and pin `--service-id` explicitly. - Edit cloned draft versions; never pass `--activate` or run `fastly purge --all` without approval. - Use `FASTLY_API_TOKEN` with least-privilege scope (`engineer` vs `superuser`).
Agent-Ready Command Recipes
Safe Read-Only Queries
fastly service list --json --non-interactive
Lists CDN and Compute services with IDs and active versions in JSON.
fastly service-version list --service-id 12345 --json --non-interactive
Checks draft, active, and locked service versions.
Controlled Writes & Previews
fastly service-version clone --service-id 12345 --version latest --non-interactive --json
Creates an editable draft version without activating or altering live traffic.
Strengths for Agents
- + Dedicated
--non-interactiveglobal flag guarantees zero unexpected TTY hangs. - + Consistent
--jsonoutput across service and version management. - + Immutable versioned config workflow lets agents prepare drafts before activation.
Caveats & Pitfalls
- ! Lacks a universal
--dry-runflag outside versioned draft workflows. - !
fastly compute publishbuilds and activates unless split intobuild+deploy.