Documentation
¶
Index ¶
- func ClearLine()
- func ClearScreen()
- func FileExists(path string) bool
- func GetCommandVariants(command string) []string
- func HandleCheckCommand(r *CommandRunner) error
- func HandleFixCommand(r *CommandRunner) error
- func HandleTypecheckCommand(r *CommandRunner) error
- func MoveCursorUp(n int)
- func NormalizeCommand(cmd string) string
- func RunInteractive() error
- type BunSource
- type CargoSource
- type CommandInfo
- type CommandRunner
- func (r *CommandRunner) ExecuteCommand(cmd *exec.Cmd) error
- func (r *CommandRunner) FindProjectRoot(dir string) string
- func (r *CommandRunner) Init() error
- func (r *CommandRunner) ListCommands()
- func (r *CommandRunner) ListCommandsWithOptions(showAll bool, verbose bool)
- func (r *CommandRunner) Run() error
- type CommandSource
- func NewBunSource(dir string) CommandSource
- func NewCargoSource(dir string) CommandSource
- func NewDenoSource(dir string) CommandSource
- func NewGoSource(dir string) CommandSource
- func NewGradleSource(dir string) CommandSource
- func NewJustSource(dir string) CommandSource
- func NewMakeSource(dir string) CommandSource
- func NewMavenSource(dir string) CommandSource
- func NewMiseSource(dir string) CommandSource
- func NewNpmSource(dir string) CommandSource
- func NewPnpmSource(dir string) CommandSource
- func NewPoetrySource(dir string) CommandSource
- func NewUvSource(dir string) CommandSource
- func NewYarnSource(dir string) CommandSource
- type DenoSource
- type GoSource
- type GradleSource
- type InteractiveSession
- type JustSource
- type MakeSource
- type MavenSource
- type MiseSource
- type NpmSource
- type PnpmSource
- type PoetrySource
- type Project
- type TerminalManager
- type UvSource
- type YarnSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
func GetCommandVariants ¶
func HandleCheckCommand ¶
func HandleCheckCommand(r *CommandRunner) error
HandleCheckCommand handles the special 'check' command that runs lint, typecheck, and test
func HandleFixCommand ¶
func HandleFixCommand(r *CommandRunner) error
HandleFixCommand handles the special 'fix' command that runs format/lint fixes
func HandleTypecheckCommand ¶
func HandleTypecheckCommand(r *CommandRunner) error
HandleTypecheckCommand handles the special 'typecheck' command
func NormalizeCommand ¶
func RunInteractive ¶
func RunInteractive() error
RunInteractive starts the interactive command runner mode
Types ¶
type BunSource ¶
type BunSource struct {
// contains filtered or unexported fields
}
BunSource for bun projects
func (*BunSource) FindCommand ¶
func (*BunSource) ListCommands ¶
func (n *BunSource) ListCommands() map[string]CommandInfo
type CargoSource ¶
type CargoSource struct {
// contains filtered or unexported fields
}
CargoSource for Rust projects
func (*CargoSource) FindCommand ¶
func (c *CargoSource) FindCommand(command string, args []string) *exec.Cmd
func (*CargoSource) ListCommands ¶
func (c *CargoSource) ListCommands() map[string]CommandInfo
type CommandInfo ¶
type CommandInfo struct {
Description string // Human-readable description
Execution string // What will actually be executed
}
CommandInfo holds information about a command
type CommandRunner ¶
func New ¶
func New(command string, args []string) *CommandRunner
func (*CommandRunner) ExecuteCommand ¶
func (r *CommandRunner) ExecuteCommand(cmd *exec.Cmd) error
func (*CommandRunner) FindProjectRoot ¶
func (r *CommandRunner) FindProjectRoot(dir string) string
func (*CommandRunner) Init ¶
func (r *CommandRunner) Init() error
func (*CommandRunner) ListCommands ¶
func (r *CommandRunner) ListCommands()
ListCommands is the original method for backward compatibility
func (*CommandRunner) ListCommandsWithOptions ¶
func (r *CommandRunner) ListCommandsWithOptions(showAll bool, verbose bool)
ListCommandsWithOptions shows available commands with configurable options
func (*CommandRunner) Run ¶
func (r *CommandRunner) Run() error
type CommandSource ¶
type CommandSource interface {
// Name returns the display name for this source (e.g., "mise", "npm", "Poetry")
Name() string
// ListCommands returns all available commands with description and execution command
// Returns a map of command name to CommandInfo
ListCommands() map[string]CommandInfo
// FindCommand looks for a specific command in this source
// Returns nil if the command is not found
FindCommand(command string, args []string) *exec.Cmd
// Priority returns the priority of this source (lower numbers = higher priority)
// This determines the order in which sources are checked
Priority() int
}
CommandSource represents a source of commands (mise, just, make, package.json, etc.)
func NewBunSource ¶
func NewBunSource(dir string) CommandSource
func NewCargoSource ¶
func NewCargoSource(dir string) CommandSource
func NewDenoSource ¶
func NewDenoSource(dir string) CommandSource
func NewGoSource ¶
func NewGoSource(dir string) CommandSource
func NewGradleSource ¶
func NewGradleSource(dir string) CommandSource
func NewJustSource ¶
func NewJustSource(dir string) CommandSource
func NewMakeSource ¶
func NewMakeSource(dir string) CommandSource
func NewMavenSource ¶
func NewMavenSource(dir string) CommandSource
func NewMiseSource ¶
func NewMiseSource(dir string) CommandSource
func NewNpmSource ¶
func NewNpmSource(dir string) CommandSource
func NewPnpmSource ¶
func NewPnpmSource(dir string) CommandSource
func NewPoetrySource ¶
func NewPoetrySource(dir string) CommandSource
func NewUvSource ¶
func NewUvSource(dir string) CommandSource
func NewYarnSource ¶
func NewYarnSource(dir string) CommandSource
type DenoSource ¶
type DenoSource struct {
// contains filtered or unexported fields
}
DenoSource for Deno projects
func (*DenoSource) FindCommand ¶
func (d *DenoSource) FindCommand(command string, args []string) *exec.Cmd
func (*DenoSource) ListCommands ¶
func (d *DenoSource) ListCommands() map[string]CommandInfo
type GoSource ¶
type GoSource struct {
// contains filtered or unexported fields
}
GoSource for Go projects
func (*GoSource) FindCommand ¶
func (*GoSource) ListCommands ¶
func (g *GoSource) ListCommands() map[string]CommandInfo
type GradleSource ¶
type GradleSource struct {
// contains filtered or unexported fields
}
GradleSource for Gradle projects
func (*GradleSource) FindCommand ¶
func (g *GradleSource) FindCommand(command string, args []string) *exec.Cmd
func (*GradleSource) ListCommands ¶
func (g *GradleSource) ListCommands() map[string]CommandInfo
type InteractiveSession ¶
type InteractiveSession struct {
// contains filtered or unexported fields
}
InteractiveSession manages the interactive mode state
type JustSource ¶
type JustSource struct {
// contains filtered or unexported fields
}
JustSource represents commands from justfile
func (*JustSource) FindCommand ¶
func (j *JustSource) FindCommand(command string, args []string) *exec.Cmd
func (*JustSource) ListCommands ¶
func (j *JustSource) ListCommands() map[string]CommandInfo
type MakeSource ¶
type MakeSource struct {
// contains filtered or unexported fields
}
MakeSource represents commands from Makefile
func (*MakeSource) FindCommand ¶
func (m *MakeSource) FindCommand(command string, args []string) *exec.Cmd
func (*MakeSource) ListCommands ¶
func (m *MakeSource) ListCommands() map[string]CommandInfo
type MavenSource ¶
type MavenSource struct {
// contains filtered or unexported fields
}
MavenSource for Maven projects
func (*MavenSource) FindCommand ¶
func (m *MavenSource) FindCommand(command string, args []string) *exec.Cmd
func (*MavenSource) ListCommands ¶
func (m *MavenSource) ListCommands() map[string]CommandInfo
type MiseSource ¶
type MiseSource struct {
// contains filtered or unexported fields
}
MiseSource represents commands from .mise.toml
func (*MiseSource) FindCommand ¶
func (m *MiseSource) FindCommand(command string, args []string) *exec.Cmd
func (*MiseSource) ListCommands ¶
func (m *MiseSource) ListCommands() map[string]CommandInfo
type NpmSource ¶
type NpmSource struct {
// contains filtered or unexported fields
}
NpmSource for npm projects
func (*NpmSource) FindCommand ¶
func (*NpmSource) ListCommands ¶
func (n *NpmSource) ListCommands() map[string]CommandInfo
type PnpmSource ¶
type PnpmSource struct {
// contains filtered or unexported fields
}
PnpmSource for pnpm projects
func (*PnpmSource) FindCommand ¶
func (*PnpmSource) ListCommands ¶
func (n *PnpmSource) ListCommands() map[string]CommandInfo
type PoetrySource ¶
type PoetrySource struct {
// contains filtered or unexported fields
}
PoetrySource for Poetry projects
func (*PoetrySource) FindCommand ¶
func (p *PoetrySource) FindCommand(command string, args []string) *exec.Cmd
func (*PoetrySource) ListCommands ¶
func (p *PoetrySource) ListCommands() map[string]CommandInfo
type Project ¶
type Project struct {
Dir string
CommandSources []CommandSource
}
Project represents a directory with multiple command sources
func ResolveProject ¶
ResolveProject analyzes a directory and returns a Project with all applicable CommandSources
type TerminalManager ¶
type TerminalManager struct {
// contains filtered or unexported fields
}
TerminalManager handles terminal mode switching and input
func NewTerminalManager ¶
func NewTerminalManager() *TerminalManager
NewTerminalManager creates a new terminal manager
func (*TerminalManager) ReadKey ¶
func (tm *TerminalManager) ReadKey() (rune, error)
ReadKey reads a single key from the terminal
func (*TerminalManager) RestoreMode ¶
func (tm *TerminalManager) RestoreMode() error
RestoreMode restores the terminal to its original mode
func (*TerminalManager) SetRawMode ¶
func (tm *TerminalManager) SetRawMode() error
SetRawMode puts the terminal in raw mode for single-key input
func (*TerminalManager) SetupSignalHandling ¶
func (tm *TerminalManager) SetupSignalHandling(cleanup func())
SetupSignalHandling sets up signal handlers for clean exit
type UvSource ¶
type UvSource struct {
// contains filtered or unexported fields
}
UvSource for uv projects
func (*UvSource) FindCommand ¶
func (*UvSource) ListCommands ¶
func (u *UvSource) ListCommands() map[string]CommandInfo
type YarnSource ¶
type YarnSource struct {
// contains filtered or unexported fields
}
YarnSource for yarn projects
func (*YarnSource) FindCommand ¶
func (*YarnSource) ListCommands ¶
func (n *YarnSource) ListCommands() map[string]CommandInfo