Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Arg ¶
type Arg struct {
Type string `json:"type"` // "string", "number", "boolean"
Enum []string `json:"enum,omitempty"` // Allowed values
Default any `json:"default,omitempty"` // Default value
Description string `json:"description,omitempty"` // Help text
Required bool `json:"required,omitempty"` // Is this arg required?
}
Arg represents a command argument definition
type Command ¶
type Command struct {
Name string `json:"name"`
Description string `json:"description"`
Prompt string `json:"prompt"`
ArgumentHint string `json:"argumentHint,omitempty"` // Hint for expected arguments (e.g., "[file.md or feature]")
Model string `json:"model,omitempty"` // Preferred model (opus, sonnet, haiku, gpt-4, etc.)
Args map[string]Arg `json:"args,omitempty"` // Structured argument definitions
AllowedTools []string `json:"allowedTools,omitempty"` // Tools this command can use
DisallowedTools []string `json:"disallowedTools,omitempty"` // Tools this command cannot use
Overrides map[string]ToolOverride `json:"overrides,omitempty"` // Per-tool overrides
PromptRef string `json:"promptRef,omitempty"` // Reference to a prompt template
// Runtime fields (not serialized)
Scope string `json:"-"` // "local" or "global" - where this command came from
Tool string `json:"-"` // Which tool owns this (e.g., "claude", "gemini", "agentctl")
Path string `json:"-"` // Path to the source file
}
Command represents a slash command configuration
func LoadAll ¶
LoadAll loads all commands from a directory (recursively includes subdirectories) Supports both JSON format (.json) and markdown format (.md)
func LoadMarkdown ¶ added in v0.3.0
LoadMarkdown loads a command from a markdown file with YAML frontmatter This is the Claude Code command format
func (*Command) InspectContent ¶ added in v0.3.0
InspectContent returns the formatted content for the inspector viewport
func (*Command) InspectTitle ¶ added in v0.3.0
InspectTitle returns the display name for the inspector modal header
type MarkdownFrontmatter ¶ added in v0.3.0
type MarkdownFrontmatter struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
ArgumentHint string `yaml:"argument-hint"` // Codex-style argument hint
}
MarkdownFrontmatter represents the YAML frontmatter in a markdown command file
type ToolOverride ¶
type ToolOverride struct {
AllowedTools []string `json:"allowedTools,omitempty"`
DisallowedTools []string `json:"disallowedTools,omitempty"`
AlwaysApply bool `json:"alwaysApply,omitempty"`
}
ToolOverride represents tool-specific command overrides
Click to show internal directories.
Click to hide internal directories.