UNPKG

955 BMarkdownView Raw
1# gatsby-cli
2
3Gatsby command line tool.
4
5Let's you create new Gatsby sites using
6[Gatsby starters](https://www.gatsbyjs.org/docs/gatsby-starters/).
7
8It also let's you run commands on sites. The tool runs code from the `gatsby`
9package installed locally.
10
11## Install
12
13`npm install --global gatsby-cli`
14
15## How to use
16
17Run `gatsby --help` for full help.
18
19### New
20
21`gatsby new gatsby-site`
22
23See the [Gatsby starters docs](https://www.gatsbyjs.org/docs/gatsby-starters/)
24for more.
25
26### Develop
27
28At the root of a Gatsby site run `gatsby develop` to start the Gatsby
29development server.
30
31Options
32
33```
34 -H, --host Set host. Defaults to localhost
35 -p, --port Set port. Defaults to 8000
36 -o, --open Open the site in your browser for you
37```
38
39### Build
40
41At the root of a Gatsby site run `gatsby build` to do a production build of a
42site.
43
44### Serve
45
46At the root of a Gatsby site run `gatsby serve` to serve the production build of
47the site for testing.