feat: add flags to omni config init for non-interactive setup - #63
Merged
Conversation
--name, --endpoint, --auth, and --api-key each skip their interactive prompt, so OAuth profiles can be created with a single command: omni config init --name prod --endpoint https://myorg.omni.co --auth oauth --api-key alone implies --auth api-key. Invalid --auth values and the contradictory --auth oauth + --api-key combination are rejected. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Omni app URLs are https://<slug>.omniapp.co, and that domain is on the endpoint allowlist — so copied examples now pass validation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
n8agrin
approved these changes
Jun 15, 2026
7 tasks
dspangen
added a commit
that referenced
this pull request
Jun 26, 2026
PR #63 added an --api-key flag for non-interactive setup. Accepting a secret on the command line leaks it into shell history and process listings (and from there into anything scraping them, including agentic tooling). Drop the flag and always read the key from a hidden prompt. The non-secret --name, --endpoint, and --auth flags remain, so the primary motivation — one-command non-interactive OAuth setup — still works. For api-key auth the key is now always read via term.ReadPassword, even when --auth api-key is supplied non-interactively. Removes the two tests that exercised the deleted flag. Claude-Session: https://claude.ai/code/session_01EfZEjYSR3cRVTHgifwJYjK Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
--name,--endpoint,--auth, and--api-keyflags toomni config initso profiles can be created without interactive prompts — the main motivation being one-command OAuth setup:Behavior
--api-keyalone implies--auth api-key.--authvalue errors (the interactive prompt keeps its lenient1/2/o/ahandling).--auth oauthcombined with--api-keyis rejected as contradictory.--nameinstead of--profileto avoid colliding with the global-p/--profileflag.https://<slug>.omniapp.coform, which is on the endpoint allowlist.Testing
--auth oauth, invalid--autherror, flag-conflict error.go test ./...passes; the OAuth happy path isn't unit-tested since it requires a live browser login.🤖 Generated with Claude Code