CLI reference
Astropress ships a CLI that covers the full project lifecycle. Run astropress --help at any time for a summary, or astropress list tools for the full command catalogue.
Project setup
Section titled “Project setup”astropress new [dir]
Section titled “astropress new [dir]”Scaffold a new Astropress project in dir (default: current directory). Runs an interactive wizard to choose your CMS, email provider, analytics, and other integrations. All wizard choices can also be passed as flags to run non-interactively.
astropress init is an alias for astropress new.
Flags:
| Flag | Options | Default |
|---|---|---|
--cms | builtin | keystatic | payload | builtin |
--email | none | listmonk | none |
--transactional-email | none | resend | smtp | none |
--analytics | none | umami | plausible | matomo | posthog | none |
--community | none | giscus | remark42 | giscus |
--search | none | pagefind | meilisearch | none |
--commerce | none | medusa | vendure | none |
--forum | none | flarum | discourse | none |
--chat | none | tiledesk | none |
--payments | none | hyperswitch | none |
--notify | none | ntfy | gotify | none |
--schedule | none | rallly | calcom | none |
--video | none | peertube | none |
--podcast | none | castopod | none |
--events | none | hievents | pretix | none |
--status | none | uptime-kuma | none |
--knowledge-base | none | bookstack | none |
--crm | none | twenty | none |
--sso | none | authentik | zitadel | none |
--social | none | postiz | mixpost | none |
--forms | none | formbricks | typebot | none |
--courses | none | frappe-lms | none |
--docs | none | starlight | vitepress | mdbook | none |
--donations | polar | give-lively | liberapay | pledge-crypto | — |
--job-board | boolean flag | off |
--enable-api | boolean flag | off |
--ab-testing | none | growthbook | unleash | none |
--heatmap | none | posthog | none |
Multiple --donations values can be combined in one command.
Examples:
# Interactive wizard (recommended for first-time use)astropress new my-site
# Non-interactive — specific choicesastropress new my-site --cms builtin --email listmonk --analytics umami
# GitHub Pages static site with search and commentsastropress new my-site --search pagefind --community giscus
# Full-featured: newsletter + commerce + paymentsastropress new my-site --email listmonk --commerce medusa --payments hyperswitchastropress add [flags] [dir]
Section titled “astropress add [flags] [dir]”Add one or more integrations to an existing Astropress project. Accepts the same flags as new. Writes config stubs and .env additions without overwriting existing values.
# Add Meilisearch search and ntfy push notificationsastropress add --search meilisearch --notify ntfy
# Add a docs site to your projectastropress add --docs starlightDevelopment
Section titled “Development”astropress dev [dir]
Section titled “astropress dev [dir]”Start the Astro dev server for the project in dir (default: current directory).
astropress dev # http://localhost:4321, admin at /ap-adminastropress dev ./my-siteastropress doctor [dir]
Section titled “astropress doctor [dir]”Check project health: reads .env, verifies required variables are set, reports the active runtime (local / D1 / Supabase), checks schema state.
Run this first when debugging unexpected behaviour.
astropress doctor # human-readable outputastropress doctor --json # machine-readable JSONastropress doctor --strict # exit non-zero on any warningdoctor warns on: missing or weak SESSION_SECRET, scaffold-default passwords still in use, ADMIN_BOOTSTRAP_DISABLED not set, missing .data/ directory, and deprecated env var names.
Database
Section titled “Database”astropress db migrate [--target local|d1|supabase]
Section titled “astropress db migrate [--target local|d1|supabase]”Apply all pending .sql migrations in order. Defaults to --target local (SQLite file at .data/admin.sqlite).
astropress db migrate # local SQLiteastropress db migrate --target d1 # Cloudflare D1 (requires wrangler)astropress db migrate --migrations-dir ./migrationsastropress db migrate --dry-run # preview without writingastropress db rollback [--target local|d1|supabase]
Section titled “astropress db rollback [--target local|d1|supabase]”Revert the last applied migration using its stored rollback SQL.
astropress db rollbackastropress db rollback --dry-runContent import
Section titled “Content import”astropress import wordpress [--file path] [--media]
Section titled “astropress import wordpress [--file path] [--media]”Import content from a WordPress WXR export file. The import is staged — it writes structured JSON artifacts for review before applying. Run without --apply-local first to inspect what will change.
# Stage only (recommended first step)astropress import wordpress --file export.xml
# Stage and apply to local SQLiteastropress import wordpress --file export.xml --apply-local
# Download media attachments tooastropress import wordpress --file export.xml --apply-local --download-media
# Resume a previous import (skips already-downloaded media)astropress import wordpress --file export.xml --apply-local --resumeastropress import wix [--source path]
Section titled “astropress import wix [--source path]”Import content from a Wix CSV export. Same flags as WordPress.
astropress import wix --source wix-export.csv --apply-localastropress import crawl [--url https://example.com]
Section titled “astropress import crawl [--url https://example.com]”Crawl any public website and import discovered pages as content records. Useful for migrating from static generators or hand-authored HTML sites.
astropress import crawl --url https://example.comBackup and restore
Section titled “Backup and restore”astropress backup [--out path]
Section titled “astropress backup [--out path]”Create a file-based snapshot of all content. astropress sync export is an alias.
astropress backup --project-dir ./my-site --out backups/$(date +%Y%m%d)astropress restore [--from path]
Section titled “astropress restore [--from path]”Restore content from a snapshot. astropress sync import is an alias.
astropress restore --project-dir ./my-site --from backups/20260101Deployment
Section titled “Deployment”astropress deploy [--target vercel|cloudflare|netlify|fly]
Section titled “astropress deploy [--target vercel|cloudflare|netlify|fly]”Build and push to the specified host.
astropress publish [--incremental] [--slugs slug1,slug2]
Section titled “astropress publish [--incremental] [--slugs slug1,slug2]”Build and publish to a static host. --incremental rebuilds only pages affected by the named slugs (faster for large sites).
astropress publish # full rebuildastropress publish --incremental --slugs /blog/post-1,/blog/post-2Version management
Section titled “Version management”astropress upgrade --check
Section titled “astropress upgrade --check”Report any breaking changes between the current version and the latest release. Shows env variable renames, schema changes, and removed APIs.
astropress upgrade --apply
Section titled “astropress upgrade --apply”Apply pending migrations and config renames for the current version.
astropress upgrade --check # see what would changeastropress upgrade --apply # apply itServices
Section titled “Services”astropress services bootstrap [--provider d1|supabase|appwrite]
Section titled “astropress services bootstrap [--provider d1|supabase|appwrite]”Provision your content-services provider: creates the required tables, buckets, and API keys.
astropress services verify
Section titled “astropress services verify”Confirm that all configured services are reachable and that API keys are valid.
astropress services bootstrap --provider supabaseastropress services verifyUtilities
Section titled “Utilities”astropress config migrate
Section titled “astropress config migrate”Rewrite legacy environment variable names to their current equivalents in .env.
astropress config migrate # rewrites ASTROPRESS_DATA_SERVICES → ASTROPRESS_CONTENT_SERVICES, etc.astropress completions [bash|zsh|fish|powershell]
Section titled “astropress completions [bash|zsh|fish|powershell]”Print a shell completion script. Add to your shell profile to enable tab-completion for all Astropress commands and flags.
astropress completions bash >> ~/.bashrcastropress completions zsh >> ~/.zshrcastropress completions fish >> ~/.config/fish/completions/astropress.fishastropress completions powershell | Out-String | Invoke-Expressionastropress list tools
Section titled “astropress list tools”Print all available CLI commands with one-line descriptions.
astropress list providers
Section titled “astropress list providers”Print all available integration options, grouped by category.
astropress list providers# Email: listmonk, resend, smtp# Analytics: umami, plausible, matomo, posthog# Commerce: medusa, vendure# ...