Skip to content

Feature: add interactive connection setup wizard - #8

Merged
hawkfry merged 1 commit into
mainfrom
feat/connection-create-wizard
Mar 15, 2026
Merged

hawkfry merged 1 commit into
mainfrom
feat/connection-create-wizard

Conversation

@hawkfry

@hawkfry hawkfry commented Mar 15, 2026

Copy link
Copy Markdown
Collaborator

Why are we changing this?

omni connections create only worked with --file, which made connection setup awkward for new users and hard to discover from the CLI itself. We now have working auth and live sandbox validation for connection creation, so the next gap is giving users a first-run path that matches the product better.

What has changed?

  • Added an interactive omni connections create wizard in internal/cli/connections.go while keeping --file as the automation path.
  • The wizard now supports the documented Omni connection dialects we can model from the public API/setup docs: postgres, redshift, mysql, mariadb, mssql, snowflake, databricks, bigquery, athena, motherduck, clickhouse, exasol, starrocks, and trino.
  • Added dialect-specific prompts for fields like warehouse, region, defaultSchema, trustServerCertificate, Snowflake private-key auth, and BigQuery service-account JSON.
  • Added coverage for file-based create, interactive Postgres create, BigQuery defaults, and validation failures in internal/cli/connections_test.go.
  • Updated README.md so it no longer implies connections create is file-only.

Implementation note: there is still no public connection delete/archive endpoint in the bundled Omni API spec, so the sandbox connection created during live validation remains in hawkfry-sandbox.

How to test it and expected results?

  1. Run go test ./...
    Expected result: all packages pass.

  2. Run go build -o bin/omni ./cmd/omni
    Expected result: the CLI binary builds successfully.

  3. Run ./bin/omni --json connections create
    Expected result: the CLI starts an interactive wizard and prompts for dialect-specific fields.

  4. Enter a Postgres example such as:

    • Dialect: leave default postgres
    • Display name: Wizard Coverage Postgres
    • Host: db.example.internal
    • Port: accept 5432
    • Database: analytics
    • Username: omni
    • Password: any placeholder value
    • accept defaults for the rest
      Expected result: the command returns success JSON with a connection ID.
  5. Run ./bin/omni --json connections list --name "Wizard Coverage Postgres"
    Expected result: the created connection is returned.

Live validation used https://hawkfry-sandbox.omniapp.co/ and successfully created connection db091329-44e1-494d-a212-09295ff3e037 through the wizard.

Checklist:

  • My pull request represents one logical piece of work.
  • My commits are related to the pull request and look clean.
  • My code follows our coding conventions.
  • My code has appropriate tests and documentation.

@hawkfry
hawkfry merged commit d36adbc into main Mar 15, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant