
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
gatsby-cli
Advanced tools
Gatsby command-line interface for creating new sites and running Gatsby commands
The gatsby-cli npm package is a command-line interface tool for creating, developing, and managing Gatsby sites. It provides a range of commands to streamline the development process, from setting up new projects to deploying them.
Create a new Gatsby site
This command initializes a new Gatsby site in a directory called 'my-gatsby-site'. It sets up the necessary files and dependencies to get started with a Gatsby project.
gatsby new my-gatsby-site
Develop a Gatsby site
This command starts a local development server and watches for changes in your Gatsby site. It provides hot-reloading and a GraphQL data layer for building and testing your site locally.
gatsby develop
Build a Gatsby site
This command generates a production-ready static site. It compiles your site into static files that can be deployed to any web server.
gatsby build
Serve a Gatsby site
This command starts a local server to serve the production build of your site. It is useful for testing the final output before deploying it.
gatsby serve
Clean Gatsby cache
This command deletes the .cache and public directories. It is useful for troubleshooting and ensuring a clean build environment.
gatsby clean
Create React App is a command-line tool to set up a new React project with a single command. It provides a similar experience to gatsby-cli but is focused on React applications rather than static site generation.
Next.js is a React framework that provides a CLI for creating and managing projects. It offers server-side rendering and static site generation, making it a versatile alternative to Gatsby for building modern web applications.
Vue CLI is a command-line tool for scaffolding Vue.js projects. It offers a similar set of features to gatsby-cli but is tailored for Vue.js applications, including project creation, development server, and build commands.
Gatsby command line tool.
Let's you create new Gatsby sites using Gatsby starters
Also let's you run commands on sites. The tool runs code from the gatsby
package
installed locally.
npm install --global gatsby-cli
Run gatsby --help
for full help.
gatsby new gatsby-site
See the Gatsby starters docs for more
At the root of a Gatsby site run gatsby develop
to start the Gatsby development server.
At the root of a Gatsby site run gatsby build
to do a production build of a site.
At the root of a Gatsby site run gatsby serve
to serve the production build of the site for testing.
FAQs
Gatsby command-line interface for creating new sites and running Gatsby commands
The npm package gatsby-cli receives a total of 221,342 weekly downloads. As such, gatsby-cli popularity was classified as popular.
We found that gatsby-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.