app

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.7.1"

Version is the next or current release version, without the Git tag's v prefix. Update it and CHANGELOG.md together as described in docs/releases.md.

Variables

This section is empty.

Functions

func Run

func Run(args []string) int

Run starts the terminal app and returns a process exit code.

Types

type Exchange

type Exchange struct {
	Currency     string
	Rate         float64
	Date, Source string
	FetchedAt    time.Time
}

Exchange changes presentation only. All usage calculations remain in USD.

type Metric

type Metric struct {
	Value   float64
	Known   bool
	Partial bool
}

Presence is preserved: missing metrics must never silently become zero.

type Options

type Options struct {
	ShowVersion                               bool
	CacheTTL                                  time.Duration
	Offline                                   bool
	CacheDir                                  string
	NoCache                                   bool
	Theme, ExportDir, PlanAgent, PlanCurrency string
	PlanCost                                  float64
	BillingDay                                int
	Group, TZ, Bin                            string
	Currency                                  string
	Range                                     datefilter.Range
	Demo                                      bool
	// contains filtered or unexported fields
}

type Preferences added in v0.3.0

type Preferences struct {
	ExportDir      string `toml:"export_dir"`
	DateFormat     string `toml:"date_format"`
	ClockFormat    string `toml:"clock_format"`
	SessionsSort   string `toml:"sessions_sort"`
	ModelsSort     string `toml:"models_sort"`
	Currency       string `toml:"currency"`
	Theme          string `toml:"theme"`
	Grouping       string `toml:"grouping"`
	Display        string `toml:"display"`
	CompactNumbers bool   `toml:"compact_numbers"`
	Layout         string `toml:"layout"`
}

Preferences contains only choices deliberately remembered between sessions.

type Row

type Row struct {
	Name, Agent    string
	Usage          Usage
	Models, Agents []Row
	Metadata       map[string]json.RawMessage
	// contains filtered or unexported fields
}

type Snapshot

type Snapshot struct {
	PriceDate     time.Time
	PriceSource   string
	PriceRevision string
	Unpriced      []string
	Sections      map[string][]Row
	Loaded        time.Time
}

type Usage

type Usage struct{ Input, Output, Read, Write, Tokens, Cost Metric }

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL