The create astro CLI command is the fastest way to start a new Astro project from scratch. It will walk you through every step of setting up your new Astro project and allow you to choose from a few different official starter templates.
You can also run the CLI command with the template flag to begin your project using any existing theme or starter template. Explore our themes and starters showcase where you can browse themes for blogs, portfolios, documentation sites, landing pages, and more!
To install Astro manually instead, see our step-by-step manual installation guide.
Prerequisites
Section titled “Prerequisites”- Node.js -
v22.12.0or higher. Odd-numbered versions likev23are not supported. - Text editor - We recommend VS Code with our Official Astro extension.
- Terminal - Astro is accessed through its command-line interface (CLI).
Browser compatibility
Section titled “Browser compatibility”Astro is built with Vite which targets browsers with modern JavaScript support by default. For a complete reference, you can see the list of currently supported browser versions in Vite.
Install from the CLI wizard
Section titled “Install from the CLI wizard”You can run create astro anywhere on your machine, so there’s no need to create a new empty directory for your project before you begin. If you don’t have an empty directory yet for your new project, the wizard will help create one for you automatically.
CLI installation flags
Section titled “CLI installation flags”You can run the create astro command with additional flags to customize the setup process (e.g. answering “yes” to all questions, skipping the Houston animation) or your new project (e.g. install git or not, add integrations).
Add integrations
Section titled “Add integrations”You can start a new Astro project and install any official integrations or community integrations that support the astro add command at the same time by passing the --add argument to the create astro command.
Run the following command in your terminal, substituting any integration that supports the astro add command:
Use a theme or starter template
Section titled “Use a theme or starter template”You can start a new Astro project based on an official example or the main branch of any GitHub repository by passing a --template argument to the create astro command.
Run the following command in your terminal, substituting the official Astro starter template name, or the GitHub username and repository of the theme you want to use:
By default, this command will use the template repository’s main branch. To use a different branch name, pass it as part of the --template argument: <github-username>/<github-repo>#<branch>.
Manual Setup
Section titled “Manual Setup”This guide will walk you through the steps to manually install and configure a new Astro project.
If you prefer not to use our automatic create astro CLI tool, you can set up your project yourself by following the guide below.