How sylva1027/waifu-usage works
Waifu Usage is a local dashboard for aggregating AI-coding-tool usage. The main workflow is: the user launches the local service, imports or scans harness logs, the service normalizes and stores usage, then queries and presents metrics, trends, quota windows and cost estimates in the browser. The full edition adds skins, sharing and achievements; Lite retains usage, trends and history management. Relationships involving unsampled modules are included only where the README or source index supports them; several feature branches are documented capabilities rather than inspected call paths.
Main entry points: usage-reader.js Usage reader · server.js HTTP service · app.js Dashboard application · cli.js CLI launch
Components 25
Local service
- CLI launch
src/cli.js - HTTP service
src/server.js - Server core
src/server-core.js - Usage executor
src/usage-executor-waifu.js
Usage data
- Source acquisition
src/usage-source-acquisition.js - Harness adapters
src/usage-sources.js - Usage records
src/usage-record-store.js - Usage metadata
src/usage-metadata-store.js - History archive
src/history-archive.js
Queries and pricing
- Usage reader
src/waifu/usage-reader.js - Range and grouping
src/usage-query.js - Usage rollups
src/usage-rollups.js - Pricing catalog
src/pricing.js - Pricing persistence
src/pricing-store.js
Dashboard experience
- Dashboard application
public/app.js - Lite application
public/lite/app.js - Dashboard rendering
public/dashboard-render.js - Trend analysis
public/overview-trend-data.js - Calendar ranges
public/calendar.js - Localization
public/locale.js
Personal features
- Character skins
public/skins.js - Share cards
public/share-card.js - Achievements
src/achievement-runtime.js
Other components
- User
- Harness logs
Connections 26
- User → CLI launch: launches
README.md - CLI launch → HTTP service: starts
README.md - HTTP service → Server core: configures
src/server.js - HTTP service → Usage executor: creates
src/server.js - User → Harness logs: selects logs
README.md - Harness logs → Source acquisition: scans or imports
README.md - Source acquisition → Harness adapters: dispatches sources
- Usage executor → Usage reader: serves usage
- Usage reader → Usage records: reads
src/waifu/usage-reader.js - Usage reader → Usage metadata: reads
src/waifu/usage-reader.js - Usage reader → Range and grouping: resolves ranges
src/waifu/usage-reader.js - Usage reader → Usage rollups: aggregates with
src/waifu/usage-reader.js - HTTP service → History archive: supports archive import
src/server.js - HTTP service → Pricing persistence: loads catalog
src/server.js - Pricing persistence → Pricing catalog: provides catalog
src/server.js - Usage reader → Pricing catalog: estimates costs
src/waifu/usage-reader.js - User → Dashboard application: views dashboard
README.md - Dashboard application → Dashboard rendering: renders metrics
public/app.js - Dashboard application → Trend analysis: uses trend data
public/app.js - Dashboard application → Calendar ranges: uses date ranges
public/app.js - Dashboard application → Localization: translates view
public/app.js - User → Lite application: chooses Lite
README.md - Lite application → Dashboard rendering: renders metrics
public/lite/app.js - User → Character skins: chooses themes
README.md - User → Share cards: creates share cards
README.md - User → Achievements: reviews milestones
README.md