Documentation
¶
Overview ¶
Package generate produces static discovery files from structcli command trees.
All generators consume structcli.JSONSchema with jsonschema.WithFullTree and produce []byte output. The caller decides where to write the files.
The generators produce mechanically correct scaffolds — every flag name, type, default, env var, and required marker comes from the same struct definition that powers --jsonschema. Humans should add on top:
- Trigger phrases for skill discovery ("use when user asks to deploy")
- Workflow guidance and step-by-step instructions
- Realistic examples with domain-specific values
- Error handling advice and troubleshooting sections
- Negative triggers ("do NOT use for general file management")
Supported formats:
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Agents ¶
func Agents(rootCmd *cobra.Command, opts AgentsOptions) ([]byte, error)
Agents generates an AGENTS.md file from a cobra command tree. Returns the file content as bytes.
Types ¶
type AgentsOptions ¶
type AgentsOptions struct {
ModulePath string // Go module path for install instructions (eg. "github.com/myorg/mycli")
IncludeMCP bool // Mention --mcp in Machine Interface section
}
AgentsOptions configures the AGENTS.md generator.
type LLMsTxtOptions ¶
type LLMsTxtOptions struct {
ModulePath string // Go module path (eg. "github.com/myorg/mycli") — used to derive project URL
IncludeMCP bool // Mention --mcp in the output
}
LLMsTxtOptions configures the llms.txt generator.
type SkillOptions ¶
type SkillOptions struct {
Name string // Override skill name (default: root command name, kebab-case)
Author string // metadata.author (optional)
Version string // metadata.version (optional)
MCPServer string // metadata.mcp-server (optional)
}
SkillOptions configures the SKILL.md generator.