Documentation
¶
Overview ¶
Package cli implements command-line interface tools for the file manager. It provides commands for search, info, analyze, and configuration management that can be used in scripts and non-interactive environments.
Index ¶
- func PrintHelp(styles theme.Stylesheet, themeName string)
- func RunAnalyze(args *Args) error
- func RunConfig(args *Args) error
- func RunInfo(opts InfoOptions) error
- func RunSearch(args *Args) error
- type Args
- type ConfigInitModel
- type GitStats
- type HighlightStyles
- type InfoOptions
- type InfoResult
- type TreeNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintHelp ¶
func PrintHelp(styles theme.Stylesheet, themeName string)
PrintHelp displays the help information to the console
func RunAnalyze ¶ added in v1.1.1
RunAnalyze executes the disk usage analysis from CLI
func RunInfo ¶ added in v1.0.7
func RunInfo(opts InfoOptions) error
RunInfo executes the info command
Types ¶
type Args ¶
type Args struct {
// ... (omitting fields for brevity in instruction, but keeping them in new_string)
Remote string
ShowVersion bool
IsSearch bool
SearchQuery string
IsRegex bool
IsInfo bool
InfoJSON bool
InfoTree bool
InfoDepth int
IsAnalyze bool
IsConfig bool
ConfigReset bool
ConfigInit bool
Args []string
}
Args contains the parsed command line arguments
type ConfigInitModel ¶ added in v1.1.3
type ConfigInitModel struct {
// contains filtered or unexported fields
}
ConfigInitModel handles the interactive config initialization
func (ConfigInitModel) Init ¶ added in v1.1.3
func (m ConfigInitModel) Init() tea.Cmd
func (ConfigInitModel) View ¶ added in v1.1.3
func (m ConfigInitModel) View() string
type GitStats ¶ added in v1.0.7
type GitStats struct {
Modified int `json:"modified"`
Added int `json:"added"`
Deleted int `json:"deleted"`
Untracked int `json:"untracked"`
Staged int `json:"staged"`
}
GitStats contains git statistics for a directory
type HighlightStyles ¶ added in v1.0.1
HighlightStyles defines styles for search result highlighting
type InfoOptions ¶ added in v1.0.7
InfoOptions contains options for the info command
type InfoResult ¶ added in v1.0.7
type InfoResult struct {
Path string `json:"path"`
Type string `json:"type"` // "file" or "directory"
Size int64 `json:"size"`
SizeFormatted string `json:"size_formatted"`
Permissions string `json:"permissions"`
Mode string `json:"mode"`
Modified time.Time `json:"modified"`
CanRead bool `json:"can_read"`
CanWrite bool `json:"can_write"`
// Directory-specific
FileCount int `json:"file_count,omitempty"`
DirectoryCount int `json:"directory_count,omitempty"`
TotalSize int64 `json:"total_size,omitempty"`
TotalSizeFormatted string `json:"total_size_formatted,omitempty"`
// Git-specific
InGitRepo bool `json:"in_git_repo"`
GitRoot string `json:"git_root,omitempty"`
GitBranch string `json:"git_branch,omitempty"`
GitStatus string `json:"git_status,omitempty"`
GitStats *GitStats `json:"git_stats,omitempty"`
// Tree view (only when --tree is used)
Tree *TreeNode `json:"tree,omitempty"`
}
InfoResult contains the information about a path