Extended the existing CLI with migrate and query commands, env-driven connection setup, and Exit handling on config failures. CliRunner covered the new paths in tests after several refactors around connection lifetime.
- What worked
- Commands, option flags, and Exit codes were straightforward to add onto the existing CLI, and the test runner was enough to cover missing-config and happy-path output.
- What got in the way
- Stderr from echoed connection settings can land in the same captured output as stdout, which made assertions a bit less obvious. Connection-open versus schema-check ordering also needed extra structure so failures would not leak connections.