Skip to main content

Gatsby js

The Gatsby CLI tool lets you quickly create new Gatsby-powered sites and run commands for developing Gatsby sites. It is a published npm package.

The Gatsby CLI is available via npm and should be installed globally by running:

npm install -g gatsby-cli

See the available commands:

gatsby --help
Usage: gatsby <command> [options]
Commands:  gatsby develop                   Start development server. Watches files, rebuilds, and hot reloads                                   if something changes  gatsby build                     Build a Gatsby project.  gatsby serve                     Serve previously built Gatsby site.  gatsby info                      Get environment information for debugging and issue reporting  gatsby repl                      Get a node repl with context of Gatsby environment, see (add docs                                   link here)  gatsby new [rootPath] [starter]  Create new Gatsby project.
Options:  --verbose      Turn on verbose output                                    [boolean] [default: false]  --no-color     Turn off the color in output                              [boolean] [default: false]  -h, --help     Show help                                                                  [boolean]  -v, --version  Show version number                                                        [boolean]

Create a Gatsby site:

gatsby new my-site

Start the development mode:

gatsby develop

View your site locally:
Open up a new tab in your browser and navigate to http://localhost:8000/

read more

Last updated on by obenidir