← Back to CLIs
Melvynx

netlify

Deploy and manage Netlify sites via CLI - deploy, env, functions, sites, build. Use when user mentions 'netlify', 'netlify deploy', or wants to manage Netlify sites.

Install

$ npx api2cli install netlify

Details

Skill type: Official CLI
Auth type: bearer
Version: 1.0.0
Author: Melvynx
Views: 0

README

netlify

Setup

npm i -g netlify-cli

Verify installation:

netlify --version

Always use --json flag when calling commands programmatically (where supported).

Authentication

netlify login

Check auth status:

netlify status

Resources

Sites

CommandDescription
netlify sites:listList all sites
netlify sites:createCreate a new site
netlify sites:create --name <name>Create a site with a specific name
netlify sites:delete <site-id>Delete a site
netlify linkLink current directory to a site
netlify unlinkUnlink current directory
netlify openOpen site in browser
netlify open:adminOpen site admin in browser

Deploy

CommandDescription
netlify deployCreate a draft deploy
netlify deploy --prodDeploy to production
netlify deploy --dir <path>Deploy a specific directory
netlify deploy --prod --dir <path>Deploy specific directory to production

Environment Variables

CommandDescription
netlify env:listList all environment variables
netlify env:set KEY valueSet an environment variable
netlify env:unset KEYRemove an environment variable
netlify env:get KEYGet value of an environment variable
netlify env:import .envImport variables from a .env file

Functions

CommandDescription
netlify functions:listList all functions
netlify functions:create <name>Create a new function
netlify functions:invoke <name>Invoke a function locally
netlify functions:serveServe functions locally

Local Development

CommandDescription
netlify devStart local development server
netlify dev --port 8888Start dev server on specific port
netlify buildBuild the project locally
netlify initInitialize a new Netlify project

Global Flags

FlagDescription
--jsonOutput result as JSON
--auth <token>Netlify auth token
--site <id>Specify site ID
--debugEnable debug output
--httpProxy <url>Use HTTP proxy
Sponsors