mirror of
https://github.com/ForLoopCodes/xdist.git
synced 2026-04-26 20:35:56 +03:00
An htop-style CLI dashboard for tracking AI usage, limits, and costs across multiple providers.
| .claude/skills/forloop | ||
| openusage@41e50e3959 | ||
| src | ||
| .gitignore | ||
| bun.lock | ||
| index.ts | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
xDIST (Did I Ship Today?)
An htop-style CLI dashboard for tracking AI usage, limits, and costs across multiple providers.
Installation
bun install -g xdist
Usage
Simply run:
xdist
Or run without installing:
bunx xdist
- Chernobyl Heatmap: Character-by-character scan animation for revealing historical data.
- Provider Tracking: Support for GitHub Copilot, Anthropic, OpenAI, and more.
- Claude Local Monitor: Reads Claude Code analytics from
~/.claude/stats-cache.json(offline). - Quota & Cost: Track both usage limits (requests) and cost caps (USD).
- Theme Support: Unified "success" (scanline) aesthetics.
- Auto-Config: Prompt-based credential setup for new providers.
bun run start
The app will also create .usage-limits.config.json in your project folder for local settings and stored credentials.
Keyboard shortcuts
Global:
qorCtrl+Cquitrrefresh usagetcycle themesgo to settingsdgo to dashboardtabtoggle dashboard/settings
Dashboard:
↑/↓orj/kmove selectionenterconfigure selected provider
Settings:
↑/↓orj/kmove selectionspaceenable/disable providereorenterset credentialsbtoggle billing mode (quota/payg)mset monthly limituset manual used valuecset manual cost
GitHub token notes
For billing usage reports:
- User endpoint typically needs Plan (read).
- Organization endpoint typically needs Administration (read) on the organization.
- You can use:
- Fine-grained PAT
- GitHub App user access token
This app queries the monthly premium-request endpoint across the last 24 months, keeps model-level breakdown for the current month, and builds the graph from monthly trend points.
Claude local stats notes
- xDIST reads Claude Code usage from
~/.claude/stats-cache.json. - It shows message-based activity (7d/30d/365d), model token totals, and historical daily usage.
- Remaining % / hard rate-limit values are not available from this local Claude cache format.
- No additional API calls are made for this local mode.
Extending providers
Provider adapters live in src/providers/index.ts.
To add a new provider:
- Add a provider definition to
PROVIDERS - Implement
isConfiguredandfetchUsage - Add any provider-specific config fields if needed