Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CLI ¶
type CLI struct {
Generate struct {
Root string `arg:"" help:"Root directory of the repository."`
Filter []string `name:"filter" short:"f" env:"JOTBOT_FILTER" help:"Glob pattern(s) to filter files."`
Commit bool `name:"commit" default:"true" env:"JOTBOT_COMMIT" help:"Commit changes to Git."`
Branch string `default:"jotbot-patch" env:"JOTBOT_BRANCH" help:"Branch name to commit changes to."`
Limit int `default:"0" env:"JOTBOT_LIMIT" help:"Limit the number of documentations to generate."`
FileLimit int `default:"0" env:"JOTBOT_FILE_LIMIT" help:"Limit the number of files to generate documentations for."`
DryRun bool `name:"dry" default:"false" env:"JOTBOT_DRY_RUN" help:"Print the changes without applying them."`
Model string `default:"gpt-3.5-turbo" env:"JOTBOT_MODEL" help:"OpenAI model to use."`
Override bool `name:"override" short:"o" env:"JOTBOT_OVERRIDE" help:"Override existing documentation."`
Clear bool `name:"clear" short:"c" env:"JOTBOT_CLEAR" help:"Clear existing documentation."`
} `cmd:"" default:"withargs" help:"Generate missing documentation."`
APIKey string `name:"key" env:"OPENAI_API_KEY" help:"OpenAI API key."`
Verbose bool `name:"verbose" short:"v" env:"JOTBOT_VERBOSE" help:"Enable verbose logging."`
}
CLI represents a command-line interface for generating missing documentation. It has options to configure the generation process, such as file filtering, committing changes to Git, and limiting the number of documentations generated. It also allows overriding or clearing existing documentation. The API key for OpenAI is provided as an option. Use New() to create a new CLI instance and Run() to execute it.
Click to show internal directories.
Click to hide internal directories.