Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix broken CLI + add __main__.py#16

Merged
dockfixlabs merged 2 commits into
mainfrom
fix-cli
Jul 6, 2026
Merged

Fix broken CLI + add __main__.py#16
dockfixlabs merged 2 commits into
mainfrom
fix-cli

Conversation

@dockfixlabs

Copy link
Copy Markdown
Owner

Critical Fix: CLI binary was broken

Problem: The CLI entry point used main_group.callback as main, which required a Click context that didn't exist in standalone mode. Result: agentguard command failed with 'no active click context'.

Root cause: Click @click.group(invoke_without_command=True) with @click.pass_context decorator pattern. The callback wrapper requires a context object.

Fix:

  1. Changed main = main_group.callback to main = main_group - Click Group objects are directly callable
  2. Added agentguard/main.py - enables python -m agentguard

Verified: agentguard --version now returns agentguard, version 0.7.0

@dockfixlabs dockfixlabs merged commit 4e27f9f into main Jul 6, 2026
4 checks passed
@dockfixlabs dockfixlabs deleted the fix-cli branch July 6, 2026 21:26
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