Official Netlify CLI for deploying sites, running local dev, and managing Netlify projects, env vars, functions, and logs.
$npm install netlify-cli -g
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis
Netlify CLI is the official command surface for deploying and operating Netlify sites from a repo, local shell, or CI job. It covers deploys, local dev emulation, environment variables, logs, site management, functions, and raw Netlify API calls.
What It Enables
- Deploy static sites, serverless functions, and edge functions as draft or production builds, including site creation and build triggers.
- Run local Netlify dev with redirects, deploy-context env vars, and function simulation, then invoke or serve functions for testing.
- Inspect and change Netlify state from the shell: list sites, manage env vars, stream logs, call Open API methods, and manage Netlify agent tasks.
Agent Fit
- Several high-value commands expose
--json, including deploy, site listing, status, env management, functions listing, and agent task inspection. - The command surface fits inspect/change/verify loops well in CI or local automation when the repo is already linked to a Netlify project.
- Browser login, project linking, and some fallback prompts mean unattended runs work best with explicit flags and a preset
NETLIFY_AUTH_TOKEN.
Caveats
- JSON output is command-specific rather than universal, so some flows still return human-oriented logs or interactive prompts.
- A lot of the value assumes an existing Netlify project or repo context; greenfield setup is less smooth for headless agents.