Parent: #28
Depends on: #33, #34, #35, #36, #37 (Tasks 1.5, 2.1, 2.2, 3.1, 3.2)
Task
Integrate API-key flow into the init command in src/commands/init.rs.
File to Modify
src/commands/init.rs
What to Add
resolve_target_url() async function - Handles both connection string and API-key modes
- Integration with interactive picker when in API-key mode
- Call
check_and_enable_logical_replication() when using API-key mode
- Call
create_missing_databases() when databases don't exist
- Save target state after successful selection
See docs/plans/api-key-flow-implementation.md Task 3.3 for full code.
How to Test
# Test with explicit target (should work as before)
cargo run -- init --source "postgresql://localhost/test" --target "postgresql://localhost/target" --local
# Test with API key (should show interactive picker)
export SEREN_API_KEY=your_key
cargo run -- init --source "postgresql://localhost/test" --local
Commit Message
feat(init): Integrate API-key flow with interactive target selection
Parent: #28
Depends on: #33, #34, #35, #36, #37 (Tasks 1.5, 2.1, 2.2, 3.1, 3.2)
Task
Integrate API-key flow into the init command in
src/commands/init.rs.File to Modify
src/commands/init.rsWhat to Add
resolve_target_url()async function - Handles both connection string and API-key modescheck_and_enable_logical_replication()when using API-key modecreate_missing_databases()when databases don't existSee
docs/plans/api-key-flow-implementation.mdTask 3.3 for full code.How to Test
Commit Message
feat(init): Integrate API-key flow with interactive target selection