Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

Quick Start

This quick start is intended for intermediate to advanced developers. For a gentler intro to Gatsby, head to our tutorial!

Getting started with Gatsby

  1. Create a new site

It’ll ask for a site title and the name of the project’s directory. Continue following the prompts to choose your preferred language (JavaScript or TypeScript), CMS, styling tools and additional features.

  1. Once everything is downloaded you will see a message with instructions for navigating to your site and running it locally.

The CLI created the site as a new folder with the name you chose in step 1.

Start by going to the directory with

Start the local development server with

Gatsby will start a hot-reloading development environment accessible by default at http://localhost:8000.

  1. Now you’re ready to make changes to your site!

Try editing the home page in src/pages/index.js. Saved changes will live reload in the browser.

What’s next?

Use flags

The CLI also supports two flags:

Flags are not positional, so these commands are equivalent:

  • npm init gatsby -y -ts my-site-name
  • npm init gatsby my-site-name -y -ts

Add more features

Follow our guides to add more functionality to your site or browse our plugins to quickly install additional features.

Deploy your site

Try using Gatsby Cloud to build and deploy your site to one of many hosting providers.

Edit this page on GitHub
© 2024 Gatsby, Inc.