Toady is a Python CLI tool that simplifies GitHub pull request reviews
3 days ago
3
A modern CLI tool for efficiently managing GitHub pull request code reviews. Toady helps you fetch unresolved review comments, post replies, and manage review thread resolution—all from your command line.
🔍 Fetch unresolved review threads from any GitHub pull request
💬 Reply to review comments directly from your terminal
✅ Resolve/unresolve review threads with simple commands
🎨 Pretty output formatting for human readability
🤖 JSON output for automation and scripting
🔐 Secure authentication via GitHub CLI (gh)
🏗️ Modular architecture with clean separation of concerns
🧪 Comprehensive testing with 80% coverage requirement
⚡ Fast CI/CD pipeline with elegant reporting
🛡️ GraphQL schema validation for API compatibility
git clone https://github.com/tonyblank/toady-cli.git
cd toady-cli
pip install -e .
git clone https://github.com/tonyblank/toady-cli.git
cd toady-cli
make install-dev
Fetch Unresolved Review Threads
# Auto-detect PR (recommended)
toady fetch
# Get unresolved threads from specific PR
toady fetch --pr 123
# Get human-readable output
toady fetch --format pretty
# Include resolved threads
toady fetch --resolved
Reply to a Review Comment
# Reply to a review thread (recommended)
toady reply --id PRRT_kwDOO3WQIc5Rv3_r --body "Thanks for the feedback! Fixed in latest commit."# Reply using numeric ID (legacy)
toady reply --id 12345678 --body "Fixed!"# Get help with ID types
toady reply --help-ids
Resolve/Unresolve Review Threads
# Resolve a thread
toady resolve --thread-id abc123def
# Unresolve a thread
toady resolve --thread-id abc123def --undo
# Resolve all unresolved threads at once
toady resolve --all --pr 123
# Toady automatically detects your PR context:# - Single PR: fetches automatically# - Multiple PRs: shows interactive selection# - No PRs: displays helpful message
toady fetch
# Override auto-detection for specific PR
toady fetch --pr 123
# Validate all GraphQL queries against GitHub's schema
toady schema validate
# Validate a specific GraphQL query
toady schema check "query { ... }"# Fetch and cache GitHub's GraphQL schema
toady schema fetch
Setup Development Environment
# Clone the repository
git clone https://github.com/tonyblank/toady-cli.git
cd toady-cli
# Install in development mode with all dependencies
make install-dev
Toady CLI follows a modular architecture with clear separation of concerns:
The project uses pytest with a comprehensive test suite organized by type:
# 🎯 Run comprehensive CI/CD pipeline (recommended)
make check
# 🚀 Testing options:
make test# All tests with 80% coverage requirement
make test-fast # Fast unit tests only
make test-integration # Integration tests only
make test-performance # Performance benchmarks
make test-analysis # Generate detailed test suite analysis# 🔍 Code Quality:
make check-fast # Quick validation (no tests)
make lint # Run ruff linting
make format # Format with black
make type-check # Type check with mypy
make pre-commit # Run all pre-commit hooks
tests/
├── unit/ # Fast, isolated unit tests
│ ├── services/ # Service layer tests
│ ├── formatters/ # Output formatting tests
│ ├── models/ # Data model tests
│ └── validators/ # Validation logic tests
├── integration/ # Integration tests
│ ├── cli/ # CLI command tests using CliRunner
│ └── ... # GitHub API integration tests
└── conftest.py # Shared fixtures and test configuration
Tests are organized with pytest markers for targeted execution:
unit: Fast, isolated tests with no external dependencies
integration: Tests requiring GitHub CLI or external services
slow: Performance tests and benchmarks
cli: Command-line interface integration tests
service: Service layer business logic tests
The project maintains high code quality through:
Coverage Requirement: 80% test coverage minimum
Code Formatting: Black for consistent code style
Linting: Ruff for fast and comprehensive code analysis
Type Checking: MyPy with strict configuration
Pre-commit Hooks: Automatic code quality checks on every commit
CI/CD Pipeline: Comprehensive checks with fail-fast behavior
The make check command runs a comprehensive pipeline:
Environment Validation: Verify all tools are available
Code Formatting: Check Black formatting compliance
Linting: Run Ruff analysis for code quality
Type Checking: Validate type hints with MyPy
Test Suite: Execute all 610+ tests with coverage tracking
The pipeline provides elegant, colorized output with detailed timing and failure reporting.
📦 Building and Publishing
# Build distribution packages
make build
# Upload to PyPI (requires credentials)
twine upload dist/*
Fork the repository
Create your feature branch (git checkout -b feature/amazing-feature)
Run tests and checks (make check)
Commit your changes (git commit -m 'Add amazing feature')
Push to the branch (git push origin feature/amazing-feature)
Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.