CLI Reference
Complete reference for the bim command.
Commands
bim build
Build the site.
bim build [OPTIONS]
Options:
| Option | Description | Default |
|---|---|---|
--drafts | Include draft content | false |
-o, --output <DIR> | Output directory | dist |
--clean | Remove output before building | false |
Examples:
# Basic build
bim build
# Include drafts
bim build --drafts
# Custom output directory
bim build --output public
# Clean build
bim build --clean
bim watch
Watch for changes and rebuild.
bim watch [OPTIONS]
Options:
| Option | Description | Default |
|---|---|---|
--drafts | Include draft content | false |
-o, --output <DIR> | Output directory | dist |
Example:
bim watch --drafts
bim serve
Build and serve locally.
bim serve [OPTIONS]
Options:
| Option | Description | Default |
|---|---|---|
-p, --port <PORT> | Server port | 3000 |
--host <HOST> | Bind address | 127.0.0.1 |
--drafts | Include drafts | false |
-w, --watch | Watch for changes | false |
Examples:
# Basic serve
bim serve
# Custom port
bim serve --port 8080
# With watching
bim serve --watch --drafts
# Network accessible
bim serve --host 0.0.0.0
bim prep-images
Process images only.
bim prep-images [OPTIONS]
Options:
| Option | Description | Default |
|---|---|---|
--force | Reprocess all images | false |
-o, --output <DIR> | Output directory | dist |
Examples:
# Process new/changed images
bim prep-images
# Force reprocess all
bim prep-images --force
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error |
Environment Variables
| Variable | Description |
|---|---|
RUST_LOG | Logging level (e.g., debug, info) |
Example:
RUST_LOG=debug bim build
Related: #cli #commands #reference @documentation