Generate a human-readable brief for any GitHub repository using Claude AI
Project description
devbrief
Project situational awareness.
devbrief is a developer CLI for rapid project situational awareness:
devbrief repo— takes a GitHub URL, pulls repository metadata, README, and file tree, then asks Claude to produce a structured brief directly in your terminal.devbrief logs— streams a log file (or stdin) into a local browser dashboard with live filtering, level highlighting, and rolling metrics.devbrief env— audits a project directory for environment hygiene:.gitignorecoverage,.env/.env.examplekey drift, and secret pattern detection in committed files.
Installation
pip
pip install devbrief
uvx (run without installing)
uvx devbrief repo <github-url>
uv (install globally)
uv tool install devbrief
Setup
An Anthropic API key is required. Store it securely with:
devbrief auth
This validates your key against the Anthropic API and writes it to ~/.config/devbrief/config.toml with 600 permissions. You will not be prompted again until the key is cleared or replaced.
CI / non-interactive environments:
devbrief auth --api-key "$ANTHROPIC_API_KEY"
# or just export the env var — devbrief picks it up automatically
export ANTHROPIC_API_KEY=sk-ant-...
Usage
Usage: devbrief [OPTIONS] COMMAND [ARGS]...
Project situational awareness.
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy │
│ it or customize the installation. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ repo Analyze a GitHub repository. │
│ auth Manage API credentials. │
│ logs Stream logs into a live dashboard. │
│ env Check project environment health. │
╰──────────────────────────────────────────────────────────────────────────────╯
devbrief repo
devbrief repo <github-url> [--output FILE] [--no-cache]
Briefs are cached locally in ~/.cache/devbrief/ and keyed by the repository's latest commit SHA. Subsequent calls on the same repo with no new commits return instantly with a (cached — last updated Xh ago) note.
Examples:
# Print the brief to the terminal (served from cache if unchanged)
devbrief repo https://github.com/anthropics/anthropic-sdk-python
# Save the brief as a markdown file
devbrief repo https://github.com/astral-sh/uv --output uv-brief.md
# Force a fresh Claude call, bypassing the cache
devbrief repo https://github.com/astral-sh/uv --no-cache
| Option | Short | Description |
|---|---|---|
--output FILE |
-o |
Save the brief as a markdown file |
--no-cache, --refresh |
Skip cache and force a fresh API call | |
--help |
Show usage and exit |
devbrief auth
devbrief auth # interactive prompt (hidden input)
devbrief auth --api-key sk-ant-... # non-interactive
devbrief auth --show # display masked stored key
devbrief auth --clear # remove stored key
devbrief logs
devbrief logs [FILE] [--port PORT] [--no-browser]
Opens a local browser dashboard at http://127.0.0.1:7890 (default port).
Examples:
# Visualise a log file
devbrief logs /var/log/app.log
# Pipe from a running process
your-app 2>&1 | devbrief logs
# Use a custom port
devbrief logs /var/log/app.log --port 8080
| Option | Description |
|---|---|
FILE |
Path to a log file. Omit to read from stdin. |
--port PORT |
Dashboard port (default: 7890) |
--no-browser |
Do not open the browser automatically |
--help |
Show usage and exit |
The dashboard auto-detects common log formats (JSON structured logs, ISO timestamp prefix, [LEVEL], LEVEL:) and supports live client-side filtering by level, keyword, and time range. New lines appended to the file appear within ~3 seconds.
devbrief env
devbrief env [PATH] [--strict] [--quiet]
Audits a project directory for common environment-hygiene issues. Three checks run in sequence:
- .gitignore audit — verifies the file exists and warns on each missing advisory entry (
.env,.env.local,.env.*.local,*.pem,*.key,id_rsa,id_rsa.*,.aws/credentials). - .env drift — compares keys between
.envand.env.example; warns on keys missing from.envor undocumented in.env.example. - Secret scan — walks the directory tree (respecting
.gitignore) and flags lines matching five patterns: Anthropic API keys, OpenAI API keys, AWS access key IDs, GitHub tokens, and PEM private key headers. Implemented as a compiled Rust extension for near-native performance on large trees.
Examples:
# Audit the current directory
devbrief env
# Audit a specific project root
devbrief env /path/to/project
# Exit code 1 on any warning (CI-friendly strict mode)
devbrief env --strict
# Plain text output (no Rich formatting, useful for scripts)
devbrief env --quiet
| Option | Description |
|---|---|
PATH |
Project root to scan (default: current directory) |
--strict |
Treat warnings as errors — exit 1 if any warnings present |
--quiet |
Suppress Rich formatting; plain text output only |
--help |
Show usage and exit |
Exit code 0 when all checks pass (or warnings only without --strict). Exit code 1 on any error, or any warning under --strict.
Credential resolution order
--api-keyflagANTHROPIC_API_KEYenvironment variable~/.config/devbrief/config.toml- Error with instructions to run
devbrief auth
Output sections
Each generated brief contains:
- One-line description — a crisp summary of the project
- Problem it solves — the core need being addressed
- Tech stack — detected languages, frameworks, and tools
- Getting started — steps extracted from the README
- Who would find it useful — the target audience
- Limitations / potential improvements — honest trade-offs
How it works
GitHub URL
│
├── /repos/:owner/:repo/commits?per_page=1 → latest commit SHA
│ │
│ └── Cache hit? (~/.cache/devbrief/<sha256(url+sha)>.json)
│ ├── Yes → return cached brief + "(cached Xh ago)"
│ └── No ↓
│
├── /repos/:owner/:repo → name, description, stars, language, topics
├── /repos/:owner/:repo/readme → decoded README content (first 3000 chars)
└── /repos/:owner/:repo/contents → top-level file tree
│
└── Structured prompt → Claude (model from config) → Rich terminal output
│
└── Write to cache
If the GitHub API is unreachable, the most recent cached brief for that URL is served regardless of age.
Migrating from v0.1.x
| v0.1.x | v0.2.x |
|---|---|
devbrief <url> |
devbrief repo <url> |
export ANTHROPIC_API_KEY=... |
devbrief auth (or keep the env var) |
Development
Requires uv and Rust (stable toolchain).
git clone https://github.com/s3bc40/devbrief
cd devbrief
uv sync --all-groups
uv run maturin develop # compile the Rust extension
Run locally
uv run devbrief repo https://github.com/s3bc40/devbrief
uv run devbrief env .
Run tests
# Python test suite (122 tests)
uv run pytest
# Rust unit tests (12 tests)
PYO3_BUILD_EXTENSION_MODULE=1 cargo test --manifest-path rust/Cargo.toml
Lint
uv run ruff check src/ tests/
uv run ruff format src/ tests/
Project structure
src/devbrief/
├── cli.py # Typer app — registers all subcommands
├── _devbrief_core.pyi # Type stubs for the Rust extension
├── py.typed # PEP 561 marker
├── commands/
│ ├── repo.py # devbrief repo
│ ├── auth.py # devbrief auth
│ ├── logs.py # devbrief logs — FastAPI server, log parser, ring buffer
│ └── env.py # devbrief env — gitignore audit, .env drift, secret scan
├── templates/
│ ├── base.html # Base HTML layout (HTMX)
│ └── logs/
│ └── dashboard.html # Log dashboard template
├── core/
│ ├── credentials.py # API key + model resolution chain
│ ├── config.py # Config file read/write (~/.config/devbrief/config.toml)
│ └── cache.py # Local brief cache (~/.cache/devbrief/)
├── github.py # GitHub REST API fetchers
├── brief.py # Prompt construction and Claude API call
└── display.py # Rich terminal rendering
rust/
├── Cargo.toml # Rust crate (cdylib + rlib)
└── src/lib.rs # PyO3 extension: diff_env_files, scan_secrets
tests/
├── test_credentials.py # Credential resolution + auth command tests
├── test_logs.py # Log parser, ring buffer, polling endpoints
├── test_cache.py # Cache module + repo cache integration tests
├── test_github.py # GitHub fetcher tests
├── test_display.py # Rich display tests
├── test_env.py # env command tests (Python orchestration layer)
└── MANUAL_QA.md # Manual QA scenarios for devbrief env v0.4.0
Contributing
- Fork the repository and create a branch from
main. - Make focused commits with explicit messages (one concern per commit).
- Add or update tests for any changed behaviour.
- Open a pull request — describe the problem and your solution.
Please do not open issues to ask for new AI providers or models; the project is intentionally scoped to the Anthropic API.
License
MIT — see LICENSE for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file devbrief-0.4.2-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: devbrief-0.4.2-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 911.8 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e238c1327e43c8533e6cfabc80ffc499246066108c251bb31b244d726872225
|
|
| MD5 |
9b964fbccef08c12b6d0ab46c8b504e1
|
|
| BLAKE2b-256 |
e678cdaface6faffe6f0e13b712fac685887fb7f674e6d735ad69cb99de4727b
|
Provenance
The following attestation bundles were made for devbrief-0.4.2-cp313-cp313-win_amd64.whl:
Publisher:
release.yml on s3bc40/devbrief
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
devbrief-0.4.2-cp313-cp313-win_amd64.whl -
Subject digest:
5e238c1327e43c8533e6cfabc80ffc499246066108c251bb31b244d726872225 - Sigstore transparency entry: 1185652420
- Sigstore integration time:
-
Permalink:
s3bc40/devbrief@24c60deb80a9661b3bebde6c2bd134bf2b9dbcf1 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/s3bc40
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@24c60deb80a9661b3bebde6c2bd134bf2b9dbcf1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file devbrief-0.4.2-cp313-cp313-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: devbrief-0.4.2-cp313-cp313-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.13, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c274a4b3e41094470fcc7bff91a5e08969600854dffa0da53a232da03e7101c
|
|
| MD5 |
847d7a42396d61609e4f4f059f6c4105
|
|
| BLAKE2b-256 |
74467a1e5b1ce7a20cd633a2ea30f500bd293f6bb340ca18d7aa24357e086298
|
Provenance
The following attestation bundles were made for devbrief-0.4.2-cp313-cp313-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on s3bc40/devbrief
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
devbrief-0.4.2-cp313-cp313-manylinux_2_28_x86_64.whl -
Subject digest:
1c274a4b3e41094470fcc7bff91a5e08969600854dffa0da53a232da03e7101c - Sigstore transparency entry: 1185652371
- Sigstore integration time:
-
Permalink:
s3bc40/devbrief@24c60deb80a9661b3bebde6c2bd134bf2b9dbcf1 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/s3bc40
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@24c60deb80a9661b3bebde6c2bd134bf2b9dbcf1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file devbrief-0.4.2-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: devbrief-0.4.2-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
137e169f6e0a29bb72898b333b9d7a72912595fd130c34649f5542806a4d2a49
|
|
| MD5 |
513202b3bcbe277065b4363191a3e016
|
|
| BLAKE2b-256 |
c97ac4e0dcf6fce5ac19162ecf37dd5a382ef27cbfd4742de1730b47055e40f8
|
Provenance
The following attestation bundles were made for devbrief-0.4.2-cp313-cp313-macosx_11_0_arm64.whl:
Publisher:
release.yml on s3bc40/devbrief
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
devbrief-0.4.2-cp313-cp313-macosx_11_0_arm64.whl -
Subject digest:
137e169f6e0a29bb72898b333b9d7a72912595fd130c34649f5542806a4d2a49 - Sigstore transparency entry: 1185653003
- Sigstore integration time:
-
Permalink:
s3bc40/devbrief@24c60deb80a9661b3bebde6c2bd134bf2b9dbcf1 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/s3bc40
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@24c60deb80a9661b3bebde6c2bd134bf2b9dbcf1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file devbrief-0.4.2-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: devbrief-0.4.2-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 911.6 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4734136a4c4db1ec48c95cd17cb25695932d56f477f5c544a5825a48a31389e
|
|
| MD5 |
2529a9c5e5f9c138ad1bff91cd846511
|
|
| BLAKE2b-256 |
ab77b9b3342f1d8ef2079de88bdeb3c57cc3b6c6d50436b73a85a9e4611e801d
|
Provenance
The following attestation bundles were made for devbrief-0.4.2-cp312-cp312-win_amd64.whl:
Publisher:
release.yml on s3bc40/devbrief
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
devbrief-0.4.2-cp312-cp312-win_amd64.whl -
Subject digest:
d4734136a4c4db1ec48c95cd17cb25695932d56f477f5c544a5825a48a31389e - Sigstore transparency entry: 1185652317
- Sigstore integration time:
-
Permalink:
s3bc40/devbrief@24c60deb80a9661b3bebde6c2bd134bf2b9dbcf1 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/s3bc40
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@24c60deb80a9661b3bebde6c2bd134bf2b9dbcf1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file devbrief-0.4.2-cp312-cp312-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: devbrief-0.4.2-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9e3210d99974a47524dd5b24d252527c0fbc4eb73d5109062827018e4d9731f
|
|
| MD5 |
6f625fcbab6b6d20c729cfff789f06e5
|
|
| BLAKE2b-256 |
5a957037eeaccd53443659eaa197141d36a06be86d21adec62cbc16bbd1cb38c
|
Provenance
The following attestation bundles were made for devbrief-0.4.2-cp312-cp312-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on s3bc40/devbrief
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
devbrief-0.4.2-cp312-cp312-manylinux_2_28_x86_64.whl -
Subject digest:
d9e3210d99974a47524dd5b24d252527c0fbc4eb73d5109062827018e4d9731f - Sigstore transparency entry: 1185653083
- Sigstore integration time:
-
Permalink:
s3bc40/devbrief@24c60deb80a9661b3bebde6c2bd134bf2b9dbcf1 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/s3bc40
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@24c60deb80a9661b3bebde6c2bd134bf2b9dbcf1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file devbrief-0.4.2-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: devbrief-0.4.2-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf1dfa14d6236a358a4f6be67492a8d05ef9ad6a314fee5bfaa7ae2f5db49a74
|
|
| MD5 |
67b32664a70ac6dbb463244f7d450b79
|
|
| BLAKE2b-256 |
d2cbca08b52e6668a784dde1172bc5240c8889314fa4fa5f4c2786935816e135
|
Provenance
The following attestation bundles were made for devbrief-0.4.2-cp312-cp312-macosx_11_0_arm64.whl:
Publisher:
release.yml on s3bc40/devbrief
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
devbrief-0.4.2-cp312-cp312-macosx_11_0_arm64.whl -
Subject digest:
bf1dfa14d6236a358a4f6be67492a8d05ef9ad6a314fee5bfaa7ae2f5db49a74 - Sigstore transparency entry: 1185652661
- Sigstore integration time:
-
Permalink:
s3bc40/devbrief@24c60deb80a9661b3bebde6c2bd134bf2b9dbcf1 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/s3bc40
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@24c60deb80a9661b3bebde6c2bd134bf2b9dbcf1 -
Trigger Event:
push
-
Statement type: