A minimal Python CLI application template with modern Python features and type hints.
- Uses virtual environments for isolation
- Type hints and mypy for static type checking
- Modern Python packaging with pyproject.toml
- Black for code formatting
After every change, run:
mypy cli app && black --check cli appThis will check for type errors and formatting issues.
cli/: Command-line interface for git analysisapp/: FastAPI web service for git analysisextension/: Chrome extension for GitHub integration
The extension activates on GitHub repository pages and provides:
- Analysis popup accessible via toolbar icon
- Direct integration with local FastAPI server
- JSON visualization of repository metrics
Git analysis requires a backend service because:
- GitPython needs filesystem access
- Git operations require system-level access
- Cannot run Python directly in extension
- Use background script for persistent state between content script and popup
- Content script injects into GitHub pages to extract repo info
- Popup must handle case where content script isn't ready
- Always use DOMContentLoaded in popup script
Client-side options have limitations:
- Pyodide (WASM Python): No filesystem/git access
- WebContainer API: Limited browser support, sandboxed
- Requires 'wasm-unsafe-eval' in CSP
- Must load from CDN or package
- Resets on popup close
- isomorphic-git: Requires fetching full repo data first
cli/: Command-line interface for git analysisapp/: FastAPI web service for git analysisextension/: Chrome extension for GitHub integration
The extension activates on GitHub repository pages and provides:
- Analysis popup accessible via toolbar icon
- Direct integration with local FastAPI server
- JSON visualization of repository metrics
Git analysis requires a backend service because:
- GitPython needs filesystem access
- Git operations require system-level access
- Cannot run Python directly in extension
Client-side options have limitations:
- Pyodide (WASM Python): No filesystem/git access
- WebContainer API: Limited browser support, sandboxed
- Requires 'wasm-unsafe-eval' in CSP
- Must load from CDN or package
- Resets on popup close
- isomorphic-git: Requires fetching full repo data first