Command reference
Every Basalt command, flag, and exit code, listed.
| Command | Description | Flags | Exit codes |
|---|---|---|---|
basalt init [directory] | Create a new site in the given directory, or the current directory if none is given. | --template <name>Use a starter template. Available: default, blog. | 0 success, 1 directory exists or invalid template. |
basalt dev | Start a local development server that rebuilds on file changes. | --port <number>Port to listen on (default 3000). --host <address>Host to bind (default localhost). | 0 started, 1 port in use or bad config. |
basalt build | Build the site into the output directory. | --output <path>Output directory (default _site). | 0 success, 1 build error. |
basalt serve | Serve the built site from the output directory without rebuilding. | --port <number>Port to listen on (default 3000). | 0 started, 1 missing output or port in use. |
basalt clean | Remove the output directory and any cached data. | None. | 0 success, 1 permission denied. |
basalt new <path> | Create a new content file at the given path, including frontmatter. | --title <text>Set the title in frontmatter. | 0 created, 1 path exists or invalid. |
basalt version | Print the installed version. | None. | 0 success. |
basalt help [command] | Show help for a command. | None. | 0 success, 1 unknown command. |