CLI Reference


astro dev

Runs the Astro development server. This starts an HTTP server that responds to requests for pages stored in src/pages (or which folder is specified in your configuration).

See the dev server docs for more information on how the dev server works.



Specifies should port to run on. Defaults to 3000.

astro build

Builds your site for production.

Global Flags

--config path

Specify the path to the config file. Defaults to astro.config.mjs. Use this if you use a different name for your configuration file or have your config file in another folder.

astro --config config/astro.config.mjs dev

--project-root path

Specify the path to the project root. If not specified the current working directory is assumed to be the root.

The root is used for finding the Astro configuration file.

astro --project-root examples/snowpack dev


Clears the cache (dependencies are built within Astro apps).


Enables verbose logging, which is helpful when debugging an issue.


Enables silent logging, which is helpful for when you don’t want to see Astro logs.


Print the Astro version number and exit.


Print the help message and exit.