CLI
Execution Workflow
-
Install the CLI extra when standalone alchemy commands are needed.
-
Point every command at an explicit dotted config path via --config .
-
Use init , make-migrations , upgrade , and downgrade as the core lifecycle.
-
Use inspection commands such as check , heads , history , and show-current-revision in CI or troubleshooting.
-
Use branch-management and utility commands only when the migration graph actually requires them.
Implementation Rules
-
Prefer explicit config paths over implicit discovery in automation.
-
Keep destructive commands such as drop-all behind clear environment guards.
-
Use check in CI for drift detection before deployments.
-
Embed the CLI into Click or Typer only when the project already has an application CLI worth extending.
Example Pattern
alchemy init --config path.to.alchemy_config.config alchemy make-migrations --config path.to.alchemy_config.config -m "add users" alchemy upgrade --config path.to.alchemy_config.config
Validation Checklist
-
Confirm the dotted config path imports cleanly in the target environment.
-
Confirm migration commands operate on the intended database bind.
-
Confirm CI uses check or revision-inspection commands before deploys.
-
Confirm destructive or offline SQL modes are only used intentionally.
Cross-Skill Handoffs
-
Use advanced-alchemy-getting-started if the config object itself is not wired yet.
-
Use advanced-alchemy-litestar or advanced-alchemy-flask when framework CLIs expose the same migration commands.
-
Use advanced-alchemy-database-seeding when fixture dumping or loading is part of the operational workflow.
Advanced Alchemy References