aerostack migrate
Migrate an existing Cloudflare Worker project to Aerostack. The command detects your wrangler.toml, generates an aerostack.toml, and uses AI to suggest code changes for compatibility.
Usage
aerostack migrateRun this from the root of your existing Cloudflare Worker project.
What it does
- Detects and reads your existing
wrangler.toml - Generates a compatible
aerostack.toml - Maps your existing D1, KV, R2, and Queue bindings
- Uses AI to analyze your Worker code and suggest Aerostack SDK integrations
- Lists any incompatible patterns that need manual review
Typical migration
# From your existing Worker project directory
aerostack migrate
# Review the generated aerostack.toml
cat aerostack.toml
# Start the dev server to test
aerostack devAfter migration
- Your original
wrangler.tomlis preserved (not deleted) aerostack.tomlreferences the same D1/KV/R2 IDs- The AI suggestions are comments in your code — review and apply manually
The migration command is non-destructive. Your existing wrangler.toml and Worker code are untouched. Aerostack adds its configuration alongside your existing setup.
Keeping both deploy paths
After migration, you can deploy via Aerostack or continue using Wrangler directly — the two configs coexist. When you’re confident in the Aerostack setup, you can remove wrangler.toml.