CLIActive

Astro CLI

Command-line interface to develop, build, and preview an Astro project from a terminal.

Open source page ↗

Field note

What it does

The Astro CLI provides commands to develop, build, and preview your project from a terminal window, with flags to customize behavior.

Capabilities

Available capabilities

Tags

Tags

Ways to use it

Ways to use it

npm

javascript / astro

npm

javascript / astro

cli

javascript / astro

npm

Not filed / Not filed

Product features

Product features

alt (required)

astro add

Add an integration.

astro build

Build your project and write it to disk.

astro check

Check your project for errors.

astro dev

Start the development server with a live, updating preview of your site in a browser.

astro info

List info about your current Astro setup.

astro preferences

Configure user preferences.

astro preview

Preview your build locally.

astro sync

Generate TypeScript types for all Astro modules.

densities

format

<Image />

Image and Assets API Reference

Imports from astro:assets

inferSize

quality

sizes

src (required)

width and height (required for images in public/ )

widths