system

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package system provides system utility commands (ls, grep, find, tree, wc, watch, read, search, log, deps, clean, ccusage, discover, tee, profile).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CcusagePeriod

type CcusagePeriod struct {
	Key                 string  `json:"key"`
	InputTokens         uint64  `json:"inputTokens"`
	OutputTokens        uint64  `json:"outputTokens"`
	CacheCreationTokens uint64  `json:"cacheCreationTokens"`
	CacheReadTokens     uint64  `json:"cacheReadTokens"`
	TotalTokens         uint64  `json:"totalTokens"`
	TotalCost           float64 `json:"totalCost"`
}

CcusagePeriod represents usage data for a time period.

type DirNode

type DirNode struct {
	Name    string
	Path    string
	Files   []FileInfo
	SubDirs []*DirNode
	Depth   int
}

DirNode represents a directory in the project map.

type DiscoverResult

type DiscoverResult struct {
	Project         string              `json:"project,omitempty"`
	TotalCommands   int                 `json:"total_commands"`
	MissedSavings   int                 `json:"missed_savings"`
	Opportunities   []DiscoveredCommand `json:"opportunities"`
	UnsupportedCmds []DiscoveredCommand `json:"unsupported_commands,omitempty"`
}

DiscoverResult represents the discovery results

type DiscoveredCommand

type DiscoveredCommand struct {
	Command     string  `json:"command"`
	Count       int     `json:"count"`
	Category    string  `json:"category"`
	CouldSave   bool    `json:"could_save"`
	SavingsPct  float64 `json:"savings_percent,omitempty"`
	TokensSaved int     `json:"tokens_saved,omitempty"`
	Example     string  `json:"example,omitempty"`
}

DiscoveredCommand represents a discovered command pattern

type FileInfo

type FileInfo struct {
	Name        string `json:"name"`
	Ext         string `json:"ext"`
	Size        int64  `json:"size"`
	Lines       int    `json:"lines"`
	Tokens      int    `json:"tokens,omitempty"`
	Signatures  int    `json:"signatures,omitempty"`
	IsGenerated bool   `json:"-"`
}

FileInfo represents a single file's metadata.

type WcMode

type WcMode int

WcMode represents which columns the user requested

const (
	WcModeFull  WcMode = iota // Default: lines, words, bytes (3 columns)
	WcModeLines               // Lines only (-l)
	WcModeWords               // Words only (-w)
	WcModeBytes               // Bytes only (-c)
	WcModeChars               // Chars only (-m)
	WcModeMixed               // Multiple flags combined
)

Jump to

Keyboard shortcuts

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