Skip to main content

guides/cheatsheets/cli.cheatmd

# CLI Cheatsheet

## Install

```bash
mix igniter.install astral
```

## Scaffold starter files

```bash
mix astral.new
```

## Development server

```bash
mix astral.dev
mix astral.dev --open
mix astral.dev --config astral.config.exs --host localhost --port 4000
```

## Static build

```bash
mix astral.build
mix astral.build --config astral.config.exs
mix astral.build --root site --outdir dist
```

## Example site

```bash
cd examples/basic
mix deps.get
mix astral.dev
mix astral.build
mix check
```

## Build preview

After `mix astral.build`, serve `dist/` with any static file server to preview deploy output. Re-run the build after source changes.

## Project validation

```bash
mix ci
```