# @sgrove/netlify-cli

> Netlify command line tool

Latest version **9.8.1-beta.0** (published 2022-02-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @sgrove/netlify-cli
pnpm add @sgrove/netlify-cli
yarn add @sgrove/netlify-cli
bun add @sgrove/netlify-cli
```

Provides the commands `ntl`, `netlify`.

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 9.8.1-beta.0 |
| Published | 2022-02-24 |
| First published | 2021-12-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^12.20.0 \|\| ^14.14.0 \|\| >=16.0.0 |
| Dependencies | 108 |
| Unpacked size | 2.2 MB |
| Known vulnerabilities | 0 (+9 in 6 direct dependencies) |
| Install scripts | yes |
| GitHub stars | 1918 |
| Author | Netlify Inc. |
| Maintainers | sgrove |
| Keywords | api, cli, netlify, static |

## Links

- npm: https://www.npmjs.com/package/@sgrove/netlify-cli
- Repository: https://github.com/netlify/cli
- Issues: https://github.com/netlify/cli/issues
- npm.io page: https://npm.io/package/@sgrove/netlify-cli

## Dependencies (108)

- [del](https://npm.io/package/del.md) ^6.0.0
- [ora](https://npm.io/package/ora.md) ^5.0.0
- [pump](https://npm.io/package/pump.md) ^3.0.0
- [toml](https://npm.io/package/toml.md) ^3.0.0
- [uuid](https://npm.io/package/uuid.md) ^8.0.0
- [boxen](https://npm.io/package/boxen.md) ^5.0.0
- [chalk](https://npm.io/package/chalk.md) ^4.0.0
- [debug](https://npm.io/package/debug.md) ^4.1.1
- [execa](https://npm.io/package/execa.md) ^5.0.0
- [fuzzy](https://npm.io/package/fuzzy.md) ^0.1.3
- [hasha](https://npm.io/package/hasha.md) ^5.2.2
- [isexe](https://npm.io/package/isexe.md) ^2.0.0
- [listr](https://npm.io/package/listr.md) ^0.14.3
- [p-map](https://npm.io/package/p-map.md) ^4.0.0
- [tempy](https://npm.io/package/tempy.md) ^1.0.0
- [cookie](https://npm.io/package/cookie.md) ^0.4.0
- [dotenv](https://npm.io/package/dotenv.md) ^16.0.0
- [hasbin](https://npm.io/package/hasbin.md) ^1.2.3
- [is-wsl](https://npm.io/package/is-wsl.md) ^2.2.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.20
- [semver](https://npm.io/package/semver.md) ^7.3.5
- [tabtab](https://npm.io/package/tabtab.md) ^3.0.2
- [backoff](https://npm.io/package/backoff.md) ^2.5.0
- [ci-info](https://npm.io/package/ci-info.md) ^3.0.0
- [decache](https://npm.io/package/decache.md) ^4.6.0
- [envinfo](https://npm.io/package/envinfo.md) ^7.3.1
- [express](https://npm.io/package/express.md) ^4.17.1
- [find-up](https://npm.io/package/find-up.md) ^5.0.0
- [graphql](https://npm.io/package/graphql.md) ^16.1.0
- [netlify](https://npm.io/package/netlify.md) ^11.0.0
- [omit.js](https://npm.io/package/omit.js.md) ^2.0.2
- [p-event](https://npm.io/package/p-event.md) ^4.2.0
- [winston](https://npm.io/package/winston.md) ^3.2.1
- [chokidar](https://npm.io/package/chokidar.md) ^3.0.2
- [dot-prop](https://npm.io/package/dot-prop.md) ^6.0.0
- [get-port](https://npm.io/package/get-port.md) ^5.1.0
- [inquirer](https://npm.io/package/inquirer.md) ^6.5.1
- [minimist](https://npm.io/package/minimist.md) ^1.2.5
- [p-filter](https://npm.io/package/p-filter.md) ^2.1.0
- [path-key](https://npm.io/package/path-key.md) ^3.1.1
- [raw-body](https://npm.io/package/raw-body.md) ^2.4.1
- [ansi2html](https://npm.io/package/ansi2html.md) ^0.0.1
- [commander](https://npm.io/package/commander.md) ^9.0.0
- [env-paths](https://npm.io/package/env-paths.md) ^2.2.0
- [is-docker](https://npm.io/package/is-docker.md) ^2.0.0
- [wait-port](https://npm.io/package/wait-port.md) ^0.2.2
- [better-opn](https://npm.io/package/better-opn.md) ^3.0.0
- [clean-deep](https://npm.io/package/clean-deep.md) ^3.0.2
- [http-proxy](https://npm.io/package/http-proxy.md) ^1.18.0
- [jwt-decode](https://npm.io/package/jwt-decode.md) ^3.0.0
- [log-update](https://npm.io/package/log-update.md) ^5.0.0
- [multiparty](https://npm.io/package/multiparty.md) ^4.2.1
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0
- [p-wait-for](https://npm.io/package/p-wait-for.md) ^3.0.0
- [prettyjson](https://npm.io/package/prettyjson.md) ^1.2.1
- [ansi-styles](https://npm.io/package/ansi-styles.md) ^5.0.0
- [ascii-table](https://npm.io/package/ascii-table.md) 0.0.9
- [concordance](https://npm.io/package/concordance.md) ^5.0.0
- [configstore](https://npm.io/package/configstore.md) ^5.0.0
- [cron-parser](https://npm.io/package/cron-parser.md) ^4.2.1
- [from2-array](https://npm.io/package/from2-array.md) ^0.0.4
- [locate-path](https://npm.io/package/locate-path.md) ^6.0.0
- [log-symbols](https://npm.io/package/log-symbols.md) ^4.0.0
- [memoize-one](https://npm.io/package/memoize-one.md) ^6.0.0
- [read-pkg-up](https://npm.io/package/read-pkg-up.md) ^7.0.1
- [ansi-escapes](https://npm.io/package/ansi-escapes.md) ^5.0.0
- [content-type](https://npm.io/package/content-type.md) ^1.0.4
- [is-plain-obj](https://npm.io/package/is-plain-obj.md) ^3.0.0
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^8.5.1
- [lambda-local](https://npm.io/package/lambda-local.md) ^2.0.1
- [through2-map](https://npm.io/package/through2-map.md) ^3.0.0
- [@octokit/rest](https://npm.io/package/@octokit/rest.md) ^18.0.0
- [folder-walker](https://npm.io/package/folder-walker.md) ^3.2.0
- [git-repo-info](https://npm.io/package/git-repo-info.md) ^2.1.0
- [static-server](https://npm.io/package/static-server.md) ^2.2.1
- [terminal-link](https://npm.io/package/terminal-link.md) ^2.1.1
- [@netlify/build](https://npm.io/package/@netlify/build.md) ^26.3.5
- [gitconfiglocal](https://npm.io/package/gitconfiglocal.md) ^2.1.0
- [@netlify/config](https://npm.io/package/@netlify/config.md) ^17.0.12
- [express-logging](https://npm.io/package/express-logging.md) ^1.1.1
- [parse-gitignore](https://npm.io/package/parse-gitignore.md) ^1.0.1
- [through2-filter](https://npm.io/package/through2-filter.md) ^3.0.0
- [update-notifier](https://npm.io/package/update-notifier.md) ^5.0.0
- [gh-release-fetch](https://npm.io/package/gh-release-fetch.md) ^3.0.0
- [parse-github-url](https://npm.io/package/parse-github-url.md) ^1.0.2
- [copy-template-dir](https://npm.io/package/copy-template-dir.md) ^1.4.0
- [https-proxy-agent](https://npm.io/package/https-proxy-agent.md) ^5.0.0
- [string-similarity](https://npm.io/package/string-similarity.md) ^4.0.4
- [write-file-atomic](https://npm.io/package/write-file-atomic.md) ^4.0.0
- [flush-write-stream](https://npm.io/package/flush-write-stream.md) ^2.0.0
- [netlify-redirector](https://npm.io/package/netlify-redirector.md) ^0.2.1
- [node-version-alias](https://npm.io/package/node-version-alias.md) ^1.0.1
- [parallel-transform](https://npm.io/package/parallel-transform.md) ^1.2.0
- [source-map-support](https://npm.io/package/source-map-support.md) ^0.5.19
- [to-readable-stream](https://npm.io/package/to-readable-stream.md) ^2.1.0
- [@netlify/plugins-list](https://npm.io/package/@netlify/plugins-list.md) ^6.13.1
- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) ^1.1.0
- [http-proxy-middleware](https://npm.io/package/http-proxy-middleware.md) ^2.0.0
- [netlify-headers-parser](https://npm.io/package/netlify-headers-parser.md) ^6.0.2
- [@netlify/framework-info](https://npm.io/package/@netlify/framework-info.md) ^9.0.2
- [netlify-redirect-parser](https://npm.io/package/netlify-redirect-parser.md) ^13.0.3
- [netlify-onegraph-internal](https://npm.io/package/netlify-onegraph-internal.md) 0.0.50
- [@netlify/zip-it-and-ship-it](https://npm.io/package/@netlify/zip-it-and-ship-it.md) ^5.8.0
- [@netlify/routing-local-proxy](https://npm.io/package/@netlify/routing-local-proxy.md) ^0.34.1
- [inquirer-autocomplete-prompt](https://npm.io/package/inquirer-autocomplete-prompt.md) ^1.0.1
- [@netlify/plugin-edge-handlers](https://npm.io/package/@netlify/plugin-edge-handlers.md) ^3.0.6
- [strip-ansi-control-characters](https://npm.io/package/strip-ansi-control-characters.md) ^2.0.0
- [@netlify/local-functions-proxy](https://npm.io/package/@netlify/local-functions-proxy.md) ^1.1.1

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 9.8.1-beta.0 (latest) — 2022-02-24
- 8.12.1-beta.2 — 2022-01-22
- 8.12.1-beta.1 — 2022-01-21
- 8.12.1-beta.0 — 2022-01-21
- 8.9.9-beta.0 — 2022-01-19
- 8.6.24-beta.0 — 2022-01-14
- 8.6.1-beta.6 — 2022-01-07
- 8.6.1-beta.5 — 2022-01-06
- 8.6.1-beta.4 — 2022-01-06
- 8.6.1-beta.3 — 2022-01-05
- 8.6.1-beta.1 — 2022-01-01
- 8.6.1-beta.0 — 2021-12-31
- 8.1.8-beta.3 — 2021-12-30
- 8.1.8-beta.2 — 2021-12-23
- 8.1.8-beta.1 — 2021-12-23
- … 2 more at https://npm.io/package/@sgrove/netlify-cli/versions

## README

![Netlify CLI](cli.png)

[![Coverage Status](https://codecov.io/gh/netlify/cli/branch/main/graph/badge.svg)](https://codecov.io/gh/netlify/cli)
[![npm version][npm-img]][npm] [![downloads][dl-img]][dl] [![netlify-status][netlify-img]][netlify] [![security][snyk-img]][snyk]

Interact with [Netlify](http://netlify.com/) from the comfort of your CLI.

See the [CLI command line reference](https://cli.netlify.com/commands/) to get started and the docs on using [Netlify Dev](https://github.com/netlify/cli/blob/main/docs/netlify-dev.md) to run your site locally.

## Table of Contents

<!-- AUTO-GENERATED-CONTENT:START (TOC:collapse=true&collapseText=Click to expand) -->
<details>
<summary>Click to expand</summary>

- [Installation](#installation)
- [Usage](#usage)
- [Documentation](#documentation)
- [Commands](#commands)
  - [addons](#addons)
  - [api](#api)
  - [build](#build)
  - [completion](#completion)
  - [deploy](#deploy)
  - [dev](#dev)
  - [env](#env)
  - [functions](#functions)
  - [graph](#graph)
  - [init](#init)
  - [link](#link)
  - [lm](#lm)
  - [login](#login)
  - [open](#open)
  - [sites](#sites)
  - [status](#status)
  - [switch](#switch)
  - [unlink](#unlink)
  - [watch](#watch)
- [Contributing](#contributing)
- [Development](#development)
- [License](#license)

</details>
<!-- AUTO-GENERATED-CONTENT:END -->

## Installation

Netlify CLI requires [Node.js](https://nodejs.org) version 12 or above. To install, run the following command from any directory in your terminal:

```bash
npm install netlify-cli -g
```

When using the CLI in a CI environment we recommend installing it locally as a development dependency, instead of globally.
To install locally, run the following command from the root directory of your project:

```bash
npm install --save-dev netlify-cli
```

**Important:** Running `npm install netlify-cli -g` in CI means you're always installing the latest version of the CLI, including **breaking changes**. When you install locally and use a [lock file](https://docs.npmjs.com/cli/v7/commands/npm-ci) you guarantee reproducible builds. To manage CLI updates we recommend using an automated tool like [renovate](https://github.com/renovatebot/renovate) or [dependabot](https://dependabot.com/).

Alternatively you may also use Homebrew: `brew install netlify-cli` (thanks [@cglong](https://github.com/netlify/cli/issues/291)).

## Usage

Installing the CLI globally provides access to the `netlify` command.

```sh-session
netlify [command]

# Run `help` for detailed information about CLI commands
netlify [command] help
```

## Documentation

To learn how to log in to Netlify and start deploying sites, visit the [documentation on Netlify](https://www.netlify.com/docs/cli).

For a full command reference, see the list below, or visit [cli.netlify.com](https://cli.netlify.com/).

## Commands

<!-- AUTO-GENERATED-CONTENT:START (GENERATE_COMMANDS_LIST) -->
### [addons](/docs/commands/addons.md)

(Beta) Manage Netlify Add-ons

| Subcommand | description  |
|:--------------------------- |:-----|
| [`addons:auth`](/docs/commands/addons.md#addonsauth) | Login to add-on provider  |
| [`addons:config`](/docs/commands/addons.md#addonsconfig) | Configure add-on settings  |
| [`addons:create`](/docs/commands/addons.md#addonscreate) | Add an add-on extension to your site  |
| [`addons:delete`](/docs/commands/addons.md#addonsdelete) | Remove an add-on extension to your site  |
| [`addons:list`](/docs/commands/addons.md#addonslist) | List currently installed add-ons for site  |


### [api](/docs/commands/api.md)

Run any Netlify API method

### [build](/docs/commands/build.md)

(Beta) Build on your local machine

### [completion](/docs/commands/completion.md)

(Beta) Generate shell completion script

| Subcommand | description  |
|:--------------------------- |:-----|
| [`completion:install`](/docs/commands/completion.md#completioninstall) | Generates completion script for your preferred shell  |


### [deploy](/docs/commands/deploy.md)

Create a new deploy from the contents of a folder

### [dev](/docs/commands/dev.md)

Local dev server

| Subcommand | description  |
|:--------------------------- |:-----|
| [`dev:exec`](/docs/commands/dev.md#devexec) | Exec command  |
| [`dev:trace`](/docs/commands/dev.md#devtrace) | Trace command  |


### [env](/docs/commands/env.md)

(Beta) Control environment variables for the current site

| Subcommand | description  |
|:--------------------------- |:-----|
| [`env:get`](/docs/commands/env.md#envget) | Get resolved value of specified environment variable (includes netlify.toml)  |
| [`env:import`](/docs/commands/env.md#envimport) | Import and set environment variables from .env file  |
| [`env:list`](/docs/commands/env.md#envlist) | Lists resolved environment variables for site (includes netlify.toml)  |
| [`env:migrate`](/docs/commands/env.md#envmigrate) | Migrate environment variables from one site to another  |
| [`env:set`](/docs/commands/env.md#envset) | Set value of environment variable  |
| [`env:unset`](/docs/commands/env.md#envunset) | Unset an environment variable which removes it from the UI  |


### [functions](/docs/commands/functions.md)

Manage netlify functions

| Subcommand | description  |
|:--------------------------- |:-----|
| [`functions:build`](/docs/commands/functions.md#functionsbuild) | Build functions locally  |
| [`functions:create`](/docs/commands/functions.md#functionscreate) | Create a new function locally  |
| [`functions:invoke`](/docs/commands/functions.md#functionsinvoke) | Trigger a function while in netlify dev with simulated data, good for testing function calls including Netlify's Event Triggered Functions  |
| [`functions:list`](/docs/commands/functions.md#functionslist) | List functions that exist locally  |
| [`functions:serve`](/docs/commands/functions.md#functionsserve) | (Beta) Serve functions locally  |


### [graph](/docs/commands/graph.md)

(Beta) Control the Netlify Graph functions for the current site

| Subcommand | description  |
|:--------------------------- |:-----|
| [`graph:config:write`](/docs/commands/graph.md#graphconfigwrite) | Write a .graphqlrc.json file to the current directory for use with local tooling (e.g. the graphql extension for vscode)  |
| [`graph:edit`](/docs/commands/graph.md#graphedit) | Launch the browser to edit your local graph functions from Netlify  |
| [`graph:handler`](/docs/commands/graph.md#graphhandler) | Generate a handler for a Graph operation given its name. See `graph:operations` for a list of operations.  |
| [`graph:library`](/docs/commands/graph.md#graphlibrary) | Generate the Graph function library  |
| [`graph:operations`](/docs/commands/graph.md#graphoperations) | List all of the locally available operations  |
| [`graph:pull`](/docs/commands/graph.md#graphpull) | Pull down your local Netlify Graph schema, and process pending Graph edit events  |


### [init](/docs/commands/init.md)

Configure continuous deployment for a new or existing site. To create a new site without continuous deployment, use `netlify sites:create`

### [link](/docs/commands/link.md)

Link a local repo or project folder to an existing site on Netlify

### [lm](/docs/commands/lm.md)

Handle Netlify Large Media operations

| Subcommand | description  |
|:--------------------------- |:-----|
| [`lm:info`](/docs/commands/lm.md#lminfo) | Show large media requirements information.  |
| [`lm:install`](/docs/commands/lm.md#lminstall) | Configures your computer to use Netlify Large Media  |
| [`lm:setup`](/docs/commands/lm.md#lmsetup) | Configures your site to use Netlify Large Media  |


### [login](/docs/commands/login.md)

Login to your Netlify account

### [open](/docs/commands/open.md)

Open settings for the site linked to the current folder

| Subcommand | description  |
|:--------------------------- |:-----|
| [`open:admin`](/docs/commands/open.md#openadmin) | Opens current site admin UI in Netlify  |
| [`open:site`](/docs/commands/open.md#opensite) | Opens current site url in browser  |


### [sites](/docs/commands/sites.md)

Handle various site operations

| Subcommand | description  |
|:--------------------------- |:-----|
| [`sites:create`](/docs/commands/sites.md#sitescreate) | Create an empty site (advanced)  |
| [`sites:create-template`](/docs/commands/sites.md#sitescreate-template) | (Beta) Create a site from a starter template  |
| [`sites:delete`](/docs/commands/sites.md#sitesdelete) | Delete a site  |
| [`sites:list`](/docs/commands/sites.md#siteslist) | List all sites you have access to  |


### [status](/docs/commands/status.md)

Print status information

| Subcommand | description  |
|:--------------------------- |:-----|
| [`status:hooks`](/docs/commands/status.md#statushooks) | Print hook information of the linked site  |


### [switch](/docs/commands/switch.md)

Switch your active Netlify account

### [unlink](/docs/commands/unlink.md)

Unlink a local folder from a Netlify site

### [watch](/docs/commands/watch.md)

Watch for site deploy to finish


<!-- AUTO-GENERATED-CONTENT:END -->

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for more info on how to make contributions to this project.

## Development

You'll need to follow these steps to run Netlify CLI locally:

    uninstall any globally installed versions of netlify-cli
    clone and install deps for https://github.com/netlify/cli
    npm link from inside the cli folder

Now you're both ready to start testing and to contribute to the project!

## License

MIT. See [LICENSE](LICENSE) for more details.

[npm-img]: https://img.shields.io/npm/v/netlify-cli.svg
[npm]: https://npmjs.org/package/netlify-cli
[av-img]: https://ci.appveyor.com/api/projects/status/imk2qjc34ly7x11b/branch/master?svg=true
[av]: https://ci.appveyor.com/project/netlify/cli
[dl-img]: https://img.shields.io/npm/dm/netlify-cli.svg
[dl]: https://npmjs.org/package/netlify-cli
[david-img]: https://david-dm.org/netlify/cli/status.svg
[david]: https://david-dm.org/netlify/cli
[snyk-img]: https://snyk.io/test/npm/netlify-cli/badge.svg
[snyk]: https://snyk.io/test/npm/netlify-cli
[netlify-img]: https://api.netlify.com/api/v1/badges/d3807379-2dcf-4a43-9c00-e7e8d90ecf70/deploy-status
[netlify]: https://app.netlify.com/sites/cli/deploys

---
_Source: https://npm.io/package/@sgrove/netlify-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
