Skip to content

[codex] add context setup and env commands#77

Merged
YoungJinJung merged 1 commit intomainfrom
codex/issue-69-context-setup-env
Apr 8, 2026
Merged

[codex] add context setup and env commands#77
YoungJinJung merged 1 commit intomainfrom
codex/issue-69-context-setup-env

Conversation

@YoungJinJung
Copy link
Copy Markdown
Contributor

Summary

  • add unic context setup, unic context unset, and unic env CLI flows
  • support one-step SSO account/role selection with config upsert/reuse
  • copy setup/unset shell commands to the clipboard and document the new workflow

Why

Issue #69 asked for a one-step context setup flow that works well with local shell usage and does not mutate ~/.aws/credentials. This also adds a matching context unset flow to clear the selected context and reset shell env state quickly.

Details

  • add config helpers for loading named contexts, upserting contexts, and unsetting the current context
  • add env rendering for credential, assume-role, and concrete SSO contexts
  • add interactive SSO setup that can log in, list accessible accounts/roles, and save a concrete context
  • keep prompts on stderr and use clipboard copy for setup/unset shell commands
  • extend README usage examples and behavior notes

Validation

  • /opt/homebrew/bin/go test ./...
  • /opt/homebrew/bin/go run ./cmd/unic context setup --help
  • /opt/homebrew/bin/go run ./cmd/unic context unset --help

@YoungJinJung YoungJinJung marked this pull request as ready for review April 7, 2026 13:50
Copy link
Copy Markdown
Contributor

@amazon-q-developer amazon-q-developer bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

I've completed a comprehensive review of PR #77 which adds unic context setup, unic context unset, and unic env CLI commands with SSO integration.

Changes Reviewed:

  • New CLI commands for context management (internal/cli/context.go)
  • SSO authentication and account/role listing (internal/services/aws/sso.go)
  • Context setup workflow with interactive selection (internal/auth/setup.go, internal/auth/env.go)
  • Config file manipulation helpers (internal/config/config.go)
  • Comprehensive test coverage for all new functionality
  • Updated README with usage examples

Assessment:
The implementation is well-structured with proper error handling, testability through function variable injection, and follows Go best practices. The code correctly implements the one-step SSO context setup flow described in issue #69 without mutating ~/.aws/credentials. All critical functionality has corresponding test coverage.

Approval Status: ✅ No blocking issues found. The code is ready for merge.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@YoungJinJung YoungJinJung merged commit 1e5d615 into main Apr 8, 2026
2 checks passed
@YoungJinJung YoungJinJung deleted the codex/issue-69-context-setup-env branch April 8, 2026 04:42
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.

2 participants