gh-pulse
GitHub analytics CLI for engineering visibility across multiple repositories.
This is a retroactive README: it documents what is implemented today in this repo (CLI, core library, cache, TUI, and output formats), not just the original MVP idea.
What It Does
- Builds engineering activity reports from GitHub data:
- Personal (
--for=me)
- Individual (
--for=@username)
- Team (
--for=team)
- Exec (
--for=exec)
- Syncs PRs, events, reviews, comments, and commits into a local SQLite cache.
- Supports multiple output targets:
tui, table, json, markdown, slack, csv
- Audience presets:
internal, customer
- Includes blocker detection (
stale / stuck), shipped/theme summaries, repo breakdowns, and trend history.
- Attributes work to PR contributors and commit co-authors (via
Co-authored-by trailers) where possible.
Stack
- Runtime: Bun + TypeScript
- GitHub API: Octokit (REST + GraphQL)
- Validation/config parsing: Zod + YAML
- Local cache: SQLite (
bun:sqlite)
- Monorepo layout:
apps/* + packages/*
Quick Start
1. Install dependencies
bun install
2. Create config
mkdir -p ~/.config/gh-pulse
cp examples/config.yaml ~/.config/gh-pulse/config.yaml
Edit the copied file for your org/repos/team settings.
3. Authenticate GitHub
gh-pulse resolves a GitHub token in this order:
github_token in config (supports ${ENV_VAR} substitution)
gh auth token from GitHub CLI
If neither is available, the CLI exits with an explicit error.
4. Run it
./gh-pulse --for=me --period=today
CLI Usage
gh-pulse [options]
AUDIENCE
--for, -f <target> me | team | exec | @<username>
--period, -p <period> today | week | sprint | month | quarter
--since <date> Start date (ISO 8601, relative: 7d/2w/1m, or today/yesterday/now)
--until <date> End date (ISO 8601, relative, or today/yesterday/now)
SCOPE
--repos, -r <pattern> Repo filter (glob or comma-list)
--org, -o <org> GitHub org to scan
OUTPUT
--format <fmt> tui | table | json | markdown | slack | csv | internal | customer
Default: tui on TTY, table otherwise
--concise Omit Deploy/CI section and cap blockers to top 10
--hyperlinks <mode> auto | always | never
--compare Compare specific users side-by-side
--users <list> Comma list of users for compare mode (@alice,bob)
--bucket <size> day | week | month (history/trend buckets)
--sort <field> Sort by field
--quiet, -q Suppress progress output
--verbose, -v Show detailed progress
CONFIG
--config, -c <path> Config file path
--sync Force fresh sync (ignore cache TTL)
INFO
--version, -V Show version number
--help, -h Show this help message
FILTERS
--blockers Focus on stale/stuck PRs only
--include-drafts Include draft PRs in metrics
Examples
# Personal daily standup
./gh-pulse --for=me --period=today
# Team weekly markdown report
./gh-pulse --for=team --period=week --format=markdown
# Exec report in Slack-ready format
./gh-pulse --for=exec --period=month --format=slack
# Compare contributors side-by-side
./gh-pulse --compare --users=@alice,@bob --period=sprint --format=table
# Only blockers, concise output
./gh-pulse --for=team --blockers --concise
# Customer-facing summary from shipped feat/fix themes
./gh-pulse --for=team --period=week --format=customer
Config Reference
Default config path resolution:
--config <path>
GH_PULSE_CONFIG
$XDG_CONFIG_HOME/gh-pulse/config.yaml
~/.config/gh-pulse/config.yaml
Default cache path resolution:
cache.path from config
$XDG_CACHE_HOME/gh-pulse/cache.db
~/.cache/gh-pulse/cache.db
Example:
# Optional if gh CLI auth is configured
github_token: ${GITHUB_TOKEN}
linear_api_key: ${LINEAR_API_KEY}
orgs:
- acme-co
repos:
- acme-co/webapp
- acme-co/cos
- your-username/*
repo_descriptions:
acme-co/webapp: Customer web app
team:
strategy: org_members # org_members | config_list | repo_contributors
members: [] # used when strategy=config_list
exclude:
bots: true
forks: true
archived: true
authors:
- dependabot[bot]
- renovate[bot]
thresholds:
stale_days: 2
stuck_days: 4
large_pr_lines: 500
blocker_max_age_days: 90
timezone: America/Los_Angeles
cache:
path: ${XDG_CACHE_HOME}/gh-pulse/cache.db
ttl_hours: 1
sync_ttl_hours: 24
concurrency: 5
use_etags: true
use_timeline: true
use_graphql: true
Report Sections (Current)