codereporter
One command. Instant HTML code-intelligence report for any repository.
codereporter /path/to/your/project
Opens a self-contained dashboard in your browser with:
- Lines of code, comment ratio, blank lines — per file and overall
- Language breakdown with share bars and charts
- Functions, async functions, classes — with counts
- API endpoint detection (FastAPI, Flask, Express.js)
- TODO / FIXME / HACK / BUG tracker with file + line references
- Top imported packages ranked by usage frequency
- Long-line detector (>100 chars)
Installation
pip
pip install codereporter
uv
uv pip install codereporter
from source
git clone https://github.com/yourusername/codereporter
cd codereporter
pip install -e .
Usage
# Analyse the current directory
codereporter
# Analyse a specific repo
codereporter /path/to/project
# Custom output file name
codereporter /path/to/project --output my_report.html
# Don't auto-open the browser
codereporter . --no-open
# Also dump raw JSON stats
codereporter . --json
# Show version
codereporter --version
The HTML report is written into the analysed directory (default: code_report.html) and opened in your browser automatically.
Python API
You can also use codereporter as a library:
from codereporter import count_code_stats, build_html
data = count_code_stats("/path/to/repo")
# Access structured stats
print(data["summary"]["functions"]) # total function count
print(data["by_language"]["Python"]) # per-language breakdown
print(data["todos"]) # list of TODO/FIXME items
print(data["endpoints"]) # list of detected API endpoints
# Generate the HTML report
html = build_html(data)
with open("report.html", "w") as f:
f.write(html)
Data shape
count_code_stats() returns:
{
"summary": {
"root": str,
"generated_at": str, # ISO timestamp
"files": int,
"loc": int, # total lines
"blank": int,
"comments": int,
"code": int,
"functions": int,
"async_functions": int,
"classes": int,
"endpoints": int,
"todos": int,
"long_lines": int,
},
"by_language": {
"Python": {"files": int, "loc": int, "code": int, "comments": int,
"functions": int, "classes": int, "endpoints": int},
...
},
"file_details": [
{"path": str, "lang": str, "loc": int, "code": int, "comments": int,
"comment_ratio": float, "functions": int, "classes": int,
"endpoints": int, "todos": int, "long_lines": int, "max_line_len": int},
... # sorted by LOC descending
],
"todos": [
{"file": str, "line": int, "tag": str, "text": str},
...
],
"endpoints": [
{"file": str, "line": int, "method": str, "raw": str},
...
],
"top_imports": [("requests", 12), ("os", 9), ...], # top 20
}
Supported languages
Python · JavaScript · TypeScript · JSX/TSX · Java · Go · Rust · C# · PHP · Ruby · Kotlin · Swift · SQL · Shell · YAML · TOML · JSON · Markdown · HTML · CSS · SCSS · Sass · Less · Vue · Svelte · C · C++
Ignored directories
.git · __pycache__ · .venv / venv / env · node_modules · dist · build · .mypy_cache · .pytest_cache · .next · .nuxt · coverage · .tox
Requirements
- Python 3.11+
- No external runtime dependencies (stdlib only)
License
MIT
Metadata
Release files for codereporter 0.2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| codereporter-0.2.6-py3-none-any.whl | Python 3 | none | any | Details for codereporter-0.2.6-py3-none-any.whl |
Release files / codereporter-0.2.6-py3-none-any.whl
| Download URL | codereporter-0.2.6-py3-none-any.whl |
|---|---|
| Size | 31.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf1ba2502725ac76aa5c98f1a097e3fd4f821fc5ca6dd48f19d3e7e9f4385baa
|
|
BLAKE2b-256 checksum How to use checksums |
fe37130445935b3e4f52e461c41d0a166eb657989850402541736b0ff6c299ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Security for codereporter 0.2.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.