$npx -y skills add fastly/fastly-agent-toolkit --skill fastly-cliExecutes Fastly CLI commands for managing CDN services, Compute deploys, and edge infrastructure. Use when running fastly CLI commands, creating or managing Fastly services from the terminal, deploying Fastly Compute applications, managing backends/domains/VCL snippets via comm
| 1 | ## Trigger and scope |
| 2 | |
| 3 | CRITICAL: many subcommands have unintuitive paths (e.g. `fastly domain create` fails with 403, correct is `fastly service domain create`; logging is under `fastly service logging`; alerts under `fastly service alert`; rate limits under `fastly service rate-limit`). |
| 4 | |
| 5 | Covers: services, backends, domains, VCL snippets, cache purging, Compute/WASM deploys, log streaming (S3/Datadog/Splunk/Kafka/25+ providers), NGWAF/WAF, TLS/mTLS, KV/config/secret stores, stats, alerts, rate limiting, ACLs, and auth tokens. |
| 6 | |
| 7 | # Fastly CLI Overview |
| 8 | |
| 9 | ## References |
| 10 | |
| 11 | | Topic | File | Use when... | |
| 12 | | -------------- | ------------------------------------- | ---------------------------------------------------------------------------------------- | |
| 13 | | Authentication | [auth.md](references/auth.md) | Login, stored tokens, service auth, CI/CD auth setup | |
| 14 | | Compute | [compute.md](references/compute.md) | Building/deploying edge applications, local dev server | |
| 15 | | Services | [services.md](references/services.md) | Service CRUD, backends, domains, ACLs, dictionaries, VCL, purging, rate limiting | |
| 16 | | Logging | [logging.md](references/logging.md) | Log streaming to S3, GCS, Datadog, Splunk, Kafka, 25+ providers | |
| 17 | | NGWAF | [ngwaf.md](references/ngwaf.md) | Next-Gen WAF workspaces, IP/country lists, rules, signals, thresholds, alerts | |
| 18 | | Stats | [stats.md](references/stats.md) | Historical/real-time metrics, cache hit ratios, error rates, bandwidth, regional traffic | |
| 19 | | Stores | [stores.md](references/stores.md) | KV Stores, Config Stores, Secret Stores, resource links | |
| 20 | | TLS | [tls.md](references/tls.md) | Platform TLS, Let's Encrypt subscriptions, custom certs, mutual TLS | |
| 21 | |
| 22 | ## Command Structure |
| 23 | |
| 24 | ``` |
| 25 | fastly <command> <subcommand> [flags] |
| 26 | ``` |
| 27 | |
| 28 | ### Top-Level Commands |
| 29 | |
| 30 | | Category | Commands | |
| 31 | | ------------ | --------------------------------------------------------------------------------------- | |
| 32 | | **Compute** | `compute` - Build and deploy edge applications | |
| 33 | | **Services** | `service` - Manage CDN services, logging, backends, VCL, ACLs, purging | |
| 34 | | **Security** | `ngwaf` - Web application firewall | |
| 35 | | **TLS** | `tls-subscription`, `tls-custom`, `tls-platform`, `tls-config` - Certificate management | |
| 36 | | **Storage** | `kv-store`, `config-store`, `secret-store` - Edge data stores | |
| 37 | | **Auth** | `auth` - Login, stored tokens, active token output, revocation; `auth-token` (deprecated) | |
| 38 | | **Info** | `stats`, `ip-list`, `pops`, `whoami` - Information queries | |
| 39 | | **Other** | `dashboard`, `domain`, `products`, `object-storage`, `tools` | |
| 40 | |
| 41 | ## Global Flags |
| 42 | |
| 43 | Available on most commands: |
| 44 | |
| 45 | ```bash |
| 46 | # Service targeting |
| 47 | --service-id SERVICE_ID # Target service by ID |
| 48 | --service-name NAME # Target service by name |
| 49 | -s SERVICE_ID # Short form |
| 50 | |
| 51 | # Version targeting (version-scoped commands like `fastly service domain/backend/...`) |
| 52 | # NOTE: `fastly domain create` does NOT accept --version (it uses a different API) |
| 53 | --version VERSION # Specific version number |
| 54 | --version active # Currently active version |
| 55 | --version latest # Most recent version |
| 56 | |
| 57 | # Authentication |
| 58 | --token TOKEN # API token or stored token name (use 'default' for default) |
| 59 | |
| 60 | # Output (--json is per-command, not global) |
| 61 | --verbose # Detailed output |
| 62 | --quiet # Minimal output |
| 63 | |
| 64 | # Automation |
| 65 | --accept-defaults # Accept default values |
| 66 | --auto-yes # Skip confirmations |
| 67 | --non-interactive # No prompts |
| 68 | ``` |
| 69 | |
| 70 | ## Key Patterns |
| 71 | |
| 72 | - Target by ID (`-s SERVICE_ID`) or |