UNPKG

5.21 kBMarkdownView Raw
1# Netlify CLI
2[![npm version][npm-img]][npm] [![build status][azure-img]][azure] [![coverage][coverage-img]][coverage] [![dependencies][david-img]][david] [![downloads][dl-img]][dl] [![netlify-status][netlify-img]][netlify]
3
4Welcome to the Netlify CLI! The new 2.0 version was rebuilt from the ground up to help improve the site building experience.
5
6> ⚠️ **If you are looking for docs or to report an issue on [Netlify Dev](https://www.netlify.com/blog/2019/04/09/netlify-dev--our-entire-platform-right-on-your-laptop/), head to the [netlify-dev-plugin repo](https://github.com/netlify/netlify-dev-plugin#what-is-netlify-dev).** This is a new release, we appreciate your patience and bug reports!
7
8## Table of Contents
9
10<!-- AUTO-GENERATED-CONTENT:START (TOC:collapse=true&collapseText=Click to expand) -->
11<details>
12<summary>Click to expand</summary>
13
14- [Installation](#installation)
15- [Usage](#usage)
16- [Documentation](#documentation)
17- [Commands](#commands)
18 * [deploy](#deploy)
19 * [init](#init)
20 * [link](#link)
21 * [login](#login)
22 * [open](#open)
23 * [sites](#sites)
24 * [status](#status)
25 * [unlink](#unlink)
26 * [watch](#watch)
27 * [dev](#dev)
28 * [functions](#functions)
29- [Contributing](#contributing)
30- [License](#license)
31
32</details>
33<!-- AUTO-GENERATED-CONTENT:END -->
34
35## Installation
36
37Netlify CLI requires [Node.js](https://nodejs.org) version 8 or above. To install, run the following command from any directory in your terminal:
38
39```bash
40npm install netlify-cli -g
41```
42
43## Usage
44
45Installing the CLI globally provides access to the `netlify` command.
46
47```sh-session
48netlify [command]
49
50# Run `help` for detailed information about CLI commands
51netlify [command] help
52```
53
54## Documentation
55
56To learn how to log in to Netlify and start deploying sites, visit the [documentation on Netlify](https://www.netlify.com/docs/cli).
57
58For a full command reference, see the list below, or visit [cli.netlify.com](https://cli.netlify.com/).
59
60## Commands
61
62<!-- AUTO-GENERATED-CONTENT:START (GENERATE_COMMANDS_LIST) -->
63### [deploy](/docs/commands/deploy.md)
64
65Create a new deploy from the contents of a folder
66
67### [init](/docs/commands/init.md)
68
69Configure continuous deployment for a new or existing site
70
71### [link](/docs/commands/link.md)
72
73Link a local repo or project folder to an existing site on Netlify
74
75### [login](/docs/commands/login.md)
76
77Login to your Netlify account
78
79### [open](/docs/commands/open.md)
80
81Open settings for the site linked to the current folder
82
83| Subcommand | description |
84|:--------------------------- |:-----|
85| [`open:admin`](/docs/commands/open.md#openadmin) | Opens current site admin UI in Netlify |
86| [`open:site`](/docs/commands/open.md#opensite) | Opens current site url in browser |
87
88
89### [sites](/docs/commands/sites.md)
90
91Handle various site operations
92
93| Subcommand | description |
94|:--------------------------- |:-----|
95| [`sites:create`](/docs/commands/sites.md#sitescreate) | Create an empty site (advanced) |
96| [`sites:list`](/docs/commands/sites.md#siteslist) | List all sites you have access to |
97
98
99### [status](/docs/commands/status.md)
100
101Print status information
102
103| Subcommand | description |
104|:--------------------------- |:-----|
105| [`status:hooks`](/docs/commands/status.md#statushooks) | Print hook information of the linked site |
106
107
108### [unlink](/docs/commands/unlink.md)
109
110Unlink a local folder from a Netlify site
111
112### [watch](/docs/commands/watch.md)
113
114Watch for site deploy to finish
115
116### [dev](/docs/commands/dev.md)
117
118Local dev server
119
120| Subcommand | description |
121|:--------------------------- |:-----|
122| [`dev:exec`](/docs/commands/dev.md#devexec) | Exec command |
123
124
125### [functions](/docs/commands/functions.md)
126
127Manage netlify functions
128
129| Subcommand | description |
130|:--------------------------- |:-----|
131| [`functions:build`](/docs/commands/functions.md#functionsbuild) | build functions locally |
132| [`functions:create`](/docs/commands/functions.md#functionscreate) | create a new function locally |
133
134
135
136<!-- AUTO-GENERATED-CONTENT:END -->
137
138## Contributing
139
140See [CONTRIBUTING.md](CONTRIBUTING.md) for more info on how to make contributions to this project.
141
142## License
143
144MIT. See [LICENSE](LICENSE) for more details.
145
146[npm-img]: https://img.shields.io/npm/v/netlify-cli.svg
147[npm]: https://npmjs.org/package/netlify-cli
148[azure-img]: https://dev.azure.com/netlify/Netlify%20CLI/_apis/build/status/netlify.cli?branchName=master
149[azure]: https://dev.azure.com/netlify/Netlify%20CLI/_build?definitionId=3
150[travis-img]: https://img.shields.io/travis/netlify/cli/master.svg
151[travis]: https://travis-ci.org/netlify/cli
152[av-img]: https://ci.appveyor.com/api/projects/status/imk2qjc34ly7x11b/branch/master?svg=true
153[av]: https://ci.appveyor.com/project/netlify/cli
154[dl-img]: https://img.shields.io/npm/dm/netlify-cli.svg
155[dl]: https://npmjs.org/package/netlify-cli
156[coverage-img]: https://img.shields.io/coveralls/netlify/cli/master.svg
157[coverage]: https://coveralls.io/github/netlify/cli
158[david-img]: https://david-dm.org/netlify/cli/status.svg
159[david]: https://david-dm.org/netlify/cli
160[netlify-img]: https://api.netlify.com/api/v1/badges/d3807379-2dcf-4a43-9c00-e7e8d90ecf70/deploy-status
161[netlify]: https://app.netlify.com/sites/cli/deploys