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

Netlify CLI

$ netlify Official Med Risk
Netlify · Code & DevOps · MIT · macos / linux / windows

Official CLI for developing, linking, and deploying sites, Edge Functions, and environment variables on Netlify. Supports --json on key inspection commands and defaults deploys to preview URLs unless --prod is passed.

FCRS-1.0 Score
83 /100
Good
Medium Confidence
Zero-Friction Install
npm install -g netlify-cli
CLI vs MCP Decision Hybrid (CLI + MCP)

Use netlify CLI for local dev (netlify dev), build verification, and deploys; pair with Netlify MCP if querying platform docs or account-wide context.

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 20 / 25

Supports --json on inspection commands (sites:list, env:list, deploy --json) and headless NETLIFY_AUTH_TOKEN, though unlinked repos prompt interactively.

  • Supports --json across sites:list, env:list, and deploy
  • Supports NETLIFY_AUTH_TOKEN and NETLIFY_SITE_ID env vars
Trust & Safety 20 / 25

Draft preview deploys are safe by default (requiring explicit --prod for live traffic), though env:set and sites:delete mutate live state.

  • netlify deploy defaults to draft URLs without --prod
  • env:list exposes values unless scoped carefully
Setup & Portability 13 / 15

Distributed via npm/npx across macOS, Linux, and Windows; requires Node.js.

  • Cross-platform Node.js CLI with npx netlify-cli support
Utility & Efficiency 13 / 15

Covers local dev emulation, functions, env vars, and preview/prod deployments in one tool.

  • Combines local netlify dev and remote deploy workflows
Maintenance & Lineage 9 / 10

Official Netlify CLI maintained under MIT license.

  • First-party netlify/cli repository
Docs & Verifiability 8 / 10

Clear CLI reference docs and built-in --help across subcommands.

  • Official docs at docs.netlify.com/cli

Security, Auth & Guardrails

Auth Modes
OAuth Browser Env API Key Config File
Credential Storage

Stores OAuth tokens in ~/.config/netlify/config.json and supports NETLIFY_AUTH_TOKEN plus NETLIFY_SITE_ID for CI/headless shells.

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

MIT open-source CLI; Netlify hosting bandwidth and build minutes depend on your account plan.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Netlify CLI (netlify) Agent Rules
- Set `NETLIFY_AUTH_TOKEN` and `NETLIFY_SITE_ID` to avoid interactive site-linking prompts.
- Default to `netlify deploy` (draft preview); never pass `--prod` without explicit user approval.

Agent-Ready Command Recipes

Safe Read-Only Queries

List Netlify sites as JSON
netlify sites:list --json

Returns accessible Netlify sites and their IDs/URLs in structured JSON.

Inspect site environment variables
netlify env:list --json

Outputs configured environment variable keys and contexts in JSON.

Controlled Writes & Previews

Create a draft preview deploy
netlify deploy --dir=dist --message="agent preview"

Deploys dist/ to a non-production draft preview URL without altering live production traffic.

Strengths for Agents

  • + Draft preview deploys by default prevent accidental production overwrites.
  • + --json support on sites:list, env:list, and deploy gives structured URLs and IDs.
  • + NETLIFY_AUTH_TOKEN + NETLIFY_SITE_ID enable clean headless CI execution.

Caveats & Pitfalls

  • ! Running commands without .netlify/state.json or NETLIFY_SITE_ID can trigger interactive prompts.
  • ! Large npm dependency tree causes noticeable startup latency compared to Go/Rust CLIs.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI