Install the Netlify CLI and authenticate non-interactively with NETLIFY_AUTH_TOKEN
domain: netlify.com · 9 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗
Documented steps
Auth: Personal access token (PAT) generated in Netlify UI under Applications > Personal access tokens, exported as NETLIFY_AUTH_TOKEN env var or passed via --auth flag on any command
Ensure Node.js >= 18.14.0 is installed (required by Netlify CLI)
Install globally: npm install -g netlify-cli
For CI, prefer a local/dev dependency instead: npm install netlify-cli --save-dev (with a lockfile for reproducible builds)
In the Netlify UI, go to User settings > Applications > Personal access tokens > New access token, name it, set an expiration date, and click Generate token (copy it immediately — it cannot be viewed again)
Export it in your shell or CI secret store: export NETLIFY_AUTH_TOKEN=your_personal_access_token
Verify auth works non-interactively (no browser login needed): netlify status --json
Any CLI command can also take the token explicitly instead of relying on the env var: netlify deploy --auth "$NETLIFY_AUTH_TOKEN"
Official docs: https://docs.netlify.com/api-and-cli-guides/cli-guides/get-started-with-cli/ ; https://cli.netlify.com/commands/status
Known gotchas
Resetting your Netlify account password permanently invalidates ALL personal access tokens and OAuth tokens created before the reset — CI pipelines using an old token will start failing and need a freshly generated token
The token value is shown only once at creation time in the UI; if you navigate away without copying it, you must generate a new one
If your team uses SAML SSO, tokens are denied team access by default unless you were logged into that team via SSO when you generated the token
netlify login (interactive OAuth) stores a token in a local config.json instead — not suitable for CI; use NETLIFY_AUTH_TOKEN or --auth for non-interactive/automated use
Node.js 18.14.0+ is a hard requirement for the CLI to run at all
Give your agent this knowledge — and 17,900+ more routes
One MCP install gives any agent live access to the full route map across 6,000+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?