Netlify-cli
Pluggable CLI for Netlify. π
Usage
$ npm install -g netlify-cli
$ netlify-cli COMMAND
running command...
$ netlify-cli (-v|--version|version)
netlify-cli/2.0.0-alpha.4 darwin-x64 node-v10.8.0
$ netlify-cli --help [COMMAND]
USAGE
$ netlify-cli COMMAND
...
You can also access the cli from the following aliases:
netlify-cli addons
[36mHandle addon operations[39m
USAGE
$ netlify-cli addons
DESCRIPTION
The addons command will help you manage all your netlify addons
EXAMPLES
$ netlify addons:create addon-xyz --value foo
$ netlify addons:update addon-xyz --value bar
$ netlify addons:delete addon-xyz
$ netlify addons:list
See code: src/commands/addons/index.js
netlify-cli addons:create NAME
Add an addon extension to your site
USAGE
$ netlify-cli addons:create NAME
ARGUMENTS
NAME addon namespace
DESCRIPTION
...
Addons are a way to extend the functionality of your Netlify site
See code: src/commands/addons/create/index.js
netlify-cli addons:delete NAME
Remove an addon extension to your site
USAGE
$ netlify-cli addons:delete NAME
ARGUMENTS
NAME addon namespace
DESCRIPTION
...
Addons are a way to extend the functionality of your Netlify site
See code: src/commands/addons/delete/index.js
netlify-cli addons:list
list current site addons
USAGE
$ netlify-cli addons:list
OPTIONS
--json
DESCRIPTION
...
Addons are a way to extend the functionality of your Netlify site
See code: src/commands/addons/list/index.js
netlify-cli addons:update NAME
Update an addon extension
USAGE
$ netlify-cli addons:update NAME
ARGUMENTS
NAME addon namespace
DESCRIPTION
...
Addons are a way to extend the functionality of your Netlify site
See code: src/commands/addons/update/index.js
netlify-cli deploy [PUBLISHFOLDER]
[36mCreate a new deploy from the contents of a folder.[39m
USAGE
$ netlify-cli deploy [PUBLISHFOLDER]
ARGUMENTS
PUBLISHFOLDER folder to deploy (optional)
OPTIONS
--functions=functions
See code: src/commands/deploy/index.js
netlify-cli init
[36mConfigure continuous deployment[39m
USAGE
$ netlify-cli init
OPTIONS
--force
--manual
See code: src/commands/init.js
netlify-cli link
[36mLink a local repo or project folder to an existing site on Netlify[39m
USAGE
$ netlify-cli link
OPTIONS
--force
--id=id
--name=name
EXAMPLES
$ netlify init --id 123-123-123-123
$ netlify init --name my-site-name
See code: src/commands/link/index.js
netlify-cli login
[36mLogin to account[39m
USAGE
$ netlify-cli login
See code: src/commands/login/index.js
netlify-cli logout
[36mLogout of account[39m
USAGE
$ netlify-cli logout
See code: src/commands/logout/index.js
netlify-cli sites
[36mHandle site operations[39m
USAGE
$ netlify-cli sites
DESCRIPTION
The sites command will help you manage all your sites
EXAMPLES
$ netlify sites:create --name my-new-site
$ netlify sites:update --name my-new-site
$ netlify sites:delete --name my-new-site
$ netlify sites:list
See code: src/commands/sites/index.js
netlify-cli sites:create
create a site
USAGE
$ netlify-cli sites:create
OPTIONS
-a, --account-slug=account-slug account slug to create the site under
-c, --custom-domain=custom-domain custom domain to use with the site
-i, --session-id=session-id session ID for later site transfers
-n, --name=name name of site
-p, --password=password password protect the site
-s, --force-tls force TLS connections
DESCRIPTION
...
Create an empty site
See code: src/commands/sites/create/index.js
netlify-cli sites:delete SITEID
delete a site
USAGE
$ netlify-cli sites:delete SITEID
ARGUMENTS
SITEID Site ID to delete
OPTIONS
-n, --name=name name to print
DESCRIPTION
...
Extra documentation goes here
EXAMPLE
$ netlify site:delete 123-432621211
See code: src/commands/sites/delete/index.js
netlify-cli sites:list
list sites
USAGE
$ netlify-cli sites:list
DESCRIPTION
...
Extra documentation goes here
See code: src/commands/sites/list/index.js
netlify-cli sites:update
update a site
USAGE
$ netlify-cli sites:update
OPTIONS
-n, --name=name name to print
DESCRIPTION
...
Extra documentation goes here
See code: src/commands/sites/update/index.js
netlify-cli sites:watch
Watch for site deploy to finish
USAGE
$ netlify-cli sites:watch
DESCRIPTION
...
Extra documentation goes here
See code: src/commands/sites/watch/index.js
netlify-cli status
[36mPrint currently logged in use[39m
USAGE
$ netlify-cli status
See code: src/commands/status/index.js
netlify-cli unlink
[36mUnlink a local repo from a Netlify site[39m
USAGE
$ netlify-cli unlink
See code: src/commands/unlink/index.js
Notes from previous CLIs
This CLI supercedes our old Go CLI and old Node CLI.
Go CLI commands
via https://github.com/netlify/netlifyctl
Available Commands:
assets # List assets attached to a site
βββ add # Add an asset to a site
βββ info # Show information for an asset or a group of them
deploy # Deploy your site
form # List forms
βββ submissions # list form submissions
help # Help about any command
init # Configure continuous deployment
login # Log user in
site # Handle site operations
βββ create # create site
βββ update # Update site settings
version
Node CLI Commands
via https://github.com/netlify/netlify-cli
createSite = require("../lib/commands/create_site"),
deleteSite = require("../lib/commands/delete_site"),
deploy = require("../lib/commands/deploy"),
publish = require("../lib/commands/publish"),
init = require("../lib/commands/init"),
list = require("../lib/commands/list_sites"),
updateSite = require("../lib/commands/update_site"),
openSite = require("../lib/commands/open"),
env = require("../lib/commands/env"),
Misc examples
Local Development
- Clone down the repo
$ git clone git@github.com:netlify/cli.git
- Install dependencies
$ npm install
- Run CLI locally during development
$ ./bin/run [command]
When developing, you can use watch mode which will automatically rebuild the cli and run tests with ava:
$ npm run watch