howmuchleft v0.14.1 /internal/dashboard
On this page

Discovers Claude Code profiles, fetches usage data in parallel, and renders a multi-profile dashboard with progress bars and tier labels.

#internal/dashboard

#internal/dashboard

#ProfileResult

Go go
type ProfileResult struct

ProfileResult holds the rendered output for a single profile.

#DiscoverProfiles

Go go
func DiscoverProfiles() []string

DiscoverProfiles returns deduplicated profile directories from 3 sources:

  1. Config file profiles array
  2. Claudewheel/claudelauncher options.json
  3. ~/.claude-* directories with .credentials.json

Always includes ~/.claude as default.

#FetchAndRender

Go go
func FetchAndRender(dir string, barCfg *render.BarConfig) (string, error)

FetchAndRender fetches usage for a profile directory and renders 3 lines.

#RenderDashboard

Go go
func RenderDashboard(dirs []string) string

RenderDashboard fetches all profiles in parallel and returns the complete output.

#RunLive

Go go
func RunLive(dirs []string) error

RunLive runs the dashboard in live mode with periodic refresh.

#RunOnce

Go go
func RunOnce(dirs []string) error

RunOnce renders the dashboard once to stdout.

#Run

Go go
func Run(live bool) error

Run is the exported entry point for the dashboard.

Search