Skip to content

feat: add __main__.py for local CLI execution#465

Open
jwm4 wants to merge 1 commit into
mainfrom
feat/add-main-module
Open

feat: add __main__.py for local CLI execution#465
jwm4 wants to merge 1 commit into
mainfrom
feat/add-main-module

Conversation

@jwm4
Copy link
Copy Markdown
Contributor

@jwm4 jwm4 commented May 21, 2026

Summary

  • Adds src/agentready/__main__.py so the CLI can be run via PYTHONPATH=src python -m agentready, bypassing the installed entry point
  • Updates CLAUDE.md to document the local development invocation pattern

Motivation

When multiple editable installs of agentready exist (e.g., git/agentready and git/reviews/agentready), only one can own the agentready CLI entry point at a time. Running PYTHONPATH=src python -m agentready always uses the local source tree, eliminating confusion about which checkout is active.

Test plan

  • PYTHONPATH=src python -m agentready assess . runs successfully
  • black . && isort . && ruff check . passes
  • pytest passes (1238 passed, 21 skipped)

Posted by Bill Murdock with assistance from Claude Code.

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Documentation

    • Updated Quick Reference guide with local development instructions, including command snippet for running agentready assess from a local repository checkout with proper environment configuration.
  • Chores

    • Implemented module entry point enabling streamlined command invocation.

Enables `PYTHONPATH=src python -m agentready` to run the CLI from the
local source tree, bypassing whichever editable install is active. Useful
when multiple checkouts exist and only one can own the `agentready` entry
point at a time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 13191914-2aef-4d52-93a8-d82b59f42dca

📥 Commits

Reviewing files that changed from the base of the PR and between 871fe25 and eb4ceba.

📒 Files selected for processing (2)
  • CLAUDE.md
  • src/agentready/__main__.py

📝 Walkthrough

Walkthrough

This PR adds a Python module entrypoint (__main__.py) to the agentready package, enabling the tool to be invoked as python -m agentready. It then documents the local development workflow in CLAUDE.md, showing developers how to run the tool against their own repository checkouts.

Changes

CLI Entrypoint and Documentation

Layer / File(s) Summary
CLI module entrypoint
src/agentready/__main__.py
New module that imports and invokes the cli object from agentready.cli.main, enabling the tool to run via python -m agentready.
Local development documentation
CLAUDE.md
Quick Reference table retains the "Entry Point" row, and a new "Local development" subsection documents running agentready assess locally using PYTHONPATH=src to point to the source checkout.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title follows Conventional Commits format with 'feat' type and clearly describes the main change: adding main.py for local CLI execution.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-main-module
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/add-main-module

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jwm4 jwm4 requested a review from kami619 May 21, 2026 20:03
@github-actions
Copy link
Copy Markdown
Contributor

📉 Test Coverage Report

Branch Coverage
This PR 73.6%
Main 73.7%
Diff ⚠️ -0.1%

Coverage calculated from unit tests only

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