Documentation
¶
Index ¶
- func FormatUsage(w io.Writer, summary *UsageSummary, now time.Time) error
- func Install(w io.Writer, fw FileWriter, personal bool) error
- func WindowEnd(start time.Time) time.Time
- func WindowStart(now time.Time) time.Time
- type DirWalker
- type FileWriter
- type ModelUsage
- type OSDirWalker
- type OSFileWriter
- type UsageSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatUsage ¶ added in v0.11.0
FormatUsage writes the usage summary to w.
func Install ¶
func Install(w io.Writer, fw FileWriter, personal bool) error
Install writes the Claude Code skill and agent files to disk. When personal is true, files are written under ~/.claude/ instead of .claude/.
Types ¶
type FileWriter ¶
type FileWriter interface {
MkdirAll(path string, perm os.FileMode) error
WriteFile(name string, data []byte, perm os.FileMode) error
ReadFile(name string) ([]byte, error)
}
FileWriter abstracts filesystem operations for testability.
type ModelUsage ¶ added in v0.11.0
ModelUsage holds aggregated token counts for one model class.
type OSDirWalker ¶ added in v0.11.0
type OSDirWalker struct{}
OSDirWalker implements DirWalker using the real filesystem.
type OSFileWriter ¶
type OSFileWriter struct{}
OSFileWriter implements FileWriter using the os package.
type UsageSummary ¶ added in v0.11.0
type UsageSummary struct {
Models map[string]*ModelUsage
}
UsageSummary holds the full usage breakdown for the current window.
func CalculateUsage ¶ added in v0.11.0
CalculateUsage scans JSONL files under root and returns usage broken down by model.
Click to show internal directories.
Click to hide internal directories.