Skip to content

feat: add --version flag to CLI - #2

Merged
cubelitblade merged 1 commit into
mainfrom
dev
Sep 5, 2026
Merged

cubelitblade merged 1 commit into
mainfrom
dev

Conversation

@cubelitblade

Copy link
Copy Markdown
Owner

Close #1
Assisted-by: Copilot Chat + Big Pickle

Close #1
Assisted-by: Copilot Chat + Big Pickle
@cubelitblade
cubelitblade merged commit 75d60d7 into main Sep 5, 2026
12 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d11dc6ef3b

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/lode/cli/__init__.py
] = Path("."),
version: Annotated[
bool,
typer.Option("--version", "-v", help="Show version and exit.", is_eager=True),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Make --version short-circuit before workspace validation

When a script requests the version alongside a workspace that no longer exists, such as lode --version -C /missing, Click validates the workspace path and exits with an error before it invokes main, so no version is emitted. is_eager only prioritizes parameter callbacks (Click callback evaluation order); this option has no callback, while the version exit happens later in main. Handle the version exit during eager option processing, or skip workspace validation when it is set.

Useful? React with 👍 / 👎.

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.

Add --version option to CLI

1 participant