Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLI ¶
type CLI struct {
Review ReviewCmd `cmd:"" default:"withargs" help:"Review a Markdown file in TUI (default command: commd file.md)"`
PR PRCmd `cmd:"" help:"Review Markdown files in a GitHub PR"`
Cclocate LocateCmd `cmd:"cclocate" hidden:"" help:"(Deprecated) Locate file path from Claude Code transcript"`
Cchook HookCmd `cmd:"cchook" hidden:"" help:"(Deprecated) Run as Claude Code hook (PreToolUse ExitPlanMode or PostToolUse Write|Edit)"`
Version VersionCmd `cmd:"" help:"Show version"`
}
CLI is the top-level command structure for commd.
type ExitCodeError ¶ added in v0.11.0
type ExitCodeError struct {
Code int
}
ExitCodeError carries a non-zero process exit code out of a command so that main can exit with it once Kong has returned, instead of the command calling os.Exit itself (which would skip deferred cleanup and bypass Kong's own error handling).
func (ExitCodeError) Error ¶ added in v0.11.0
func (e ExitCodeError) Error() string
type HookCmd ¶
type HookCmd struct {
Spawner string `enum:"wezterm,tmux,auto" default:"auto" help:"Force specific multiplexer (wezterm|tmux|auto)"`
Theme string `enum:"dark,light" default:"dark" help:"Color theme (dark|light)"`
}
HookCmd is the hook subcommand.
type LocateCmd ¶
type LocateCmd struct {
Transcript string `help:"Path to transcript JSONL file" type:"existingfile"`
CWD string `help:"Working directory for resolving relative plansDirectory" default:"." type:"existingdir"`
Stdin bool `help:"Read hook JSON input from stdin"`
All bool `help:"Output all plan files found in transcript"`
}
LocateCmd is the locate subcommand.
type PRCmd ¶ added in v0.7.0
type PRCmd struct {
URL string `arg:"" help:"GitHub PR URL (e.g. https://github.com/owner/repo/pull/123)"`
File string `help:"Review a specific file instead of showing file picker"`
Theme string `enum:"dark,light" default:"dark" help:"Color theme (dark|light)"`
// contains filtered or unexported fields
}
PRCmd is the pr subcommand for reviewing Markdown files in a GitHub PR.
type ReviewCmd ¶
type ReviewCmd struct {
Files []string `arg:"" optional:"" name:"file" help:"Path to the Markdown file (with --diff: zero or more changed files)"`
Output string `enum:"clipboard,stdout,file" default:"clipboard" help:"Output method (clipboard|stdout|file)"`
OutputPath string `help:"File path for file output" type:"path"`
Theme string `enum:"dark,light" default:"dark" help:"Color theme (dark|light)"`
TrackViewed bool `help:"Persist viewed state to sidecar file for change detection across sessions"`
Diff bool `help:"Review local git changes in diff view; with no file, pick from changed .md files"`
Base string `help:"Git ref to diff against (default: HEAD; requires --diff)"`
Web bool `help:"Review in a web browser instead of the TUI (served on 127.0.0.1)"`
Port int `help:"Port for --web (default: a free port)"`
NoOpen bool `help:"With --web, print the URL instead of opening a browser"`
// contains filtered or unexported fields
}
ReviewCmd is the review subcommand.
func (*ReviewCmd) Validate ¶ added in v0.8.0
Validate requires --output-path when --output=file, exactly one <file> unless --diff is set, --web for --port and --no-open, and a port number in 0-65535 (0, the default, picks a free port), and rejects --base and --track-viewed combinations that only make sense in one of the two modes.
type VersionCmd ¶
type VersionCmd struct{}
VersionCmd is the version subcommand. The version string comes from the kong.Vars bound in main, not from a flag.