All Astrolock CLI commands.
Getting Help
astrolock --help # All commands
astrolock <command> --help # Command-specific help
Core Commands
| Command | Description |
|---|
astrolock init | Initialize a new site |
astrolock write | Start development server |
astrolock build | Build for production |
astrolock preview | Preview production build |
Content Commands
| Command | Description |
|---|
astrolock content <collection> <title> | Create new content |
Examples
# Create a blog post
astrolock content blog "My New Post"
# Create an audio entry
astrolock content mixes "Summer Mix 2025"
# Create an author profile
astrolock content author "Jane Smith"
Import Commands
| Command | Description |
|---|
astrolock import rekordbox | Import Rekordbox DJ mixes |
astrolock import images <collection> <path> | Create image collection from folder |
astrolock import media <collection> <path> | Bulk import media files |
astrolock import stock-images | Generate placeholder images |
Deploy Commands
| Command | Description |
|---|
astrolock deploy <target> | Deploy to a target |
astrolock deploy to <target> | Deploy with explicit routing |
Examples
# Deploy to a target
astrolock deploy live --execute
# Dry run (preview what would be deployed)
astrolock deploy stage
Collections
Collections are configured in .astrolock/astrolock.yaml. Edit this file to add, modify, or remove collections.
collections:
mixes:
displayName: "DJ Mixes"
contentType: "audio"
defaults:
contentExtension: "mp3"