Skip to content

feat(context): add set and use aliases to context default command - #527

Open
reginaldalfret wants to merge 1 commit into
openai:mainfrom
reginaldalfret:feat/context-default-aliases
Open

reginaldalfret wants to merge 1 commit into
openai:mainfrom
reginaldalfret:feat/context-default-aliases

Conversation

@reginaldalfret

Copy link
Copy Markdown

Description

Addresses part of #312 by adding set and use command aliases to orchard context default NAME.

Currently, switching the active default context requires running orchard context default <NAME>, whereas users frequently expect orchard context set <NAME> or orchard context use <NAME> (similar to common CLI conventions such as kubectl config use-context).

Changes

  • Updated newDefaultCommand() in internal/command/context/default.go to declare Aliases: []string{"set", "use"}.
  • Added unit tests in internal/command/context/default_test.go verifying the command aliases and verifying that orchard context dispatches set and use to the default context command.

Verification

  • Tested locally with go test -v ./internal/command/context/...:
=== RUN   TestNewDefaultCommandAliases
--- PASS: TestNewDefaultCommandAliases (0.00s)
=== RUN   TestContextCommandFindSubcommand
--- PASS: TestContextCommandFindSubcommand (0.00s)
PASS
ok  	github.com/cirruslabs/orchard/internal/command/context	2.192s

Adds 'set' and 'use' aliases to 'orchard context default NAME' to improve CLI ergonomics and address openai#312.

Signed-off-by: reginaldalfret <reginaldalfret@gmail.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-24T13:35:58.502624Z
We couldn’t complete this review. Comment @codex review to try again.
42c31b3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@yzhuang-oai

Copy link
Copy Markdown
Contributor

@reginaldalfret can you fix the lint issue?

This branch has not been deployed

No deployments
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