id = "mods" name = "Mods" homepage = "https://github.com/charmbracelet/mods" description = "AI for the command line, built for pipelines." executables = ["mods"] [dotfiles] # Source: https://github.com/charmbracelet/mods/blob/main/config.go#L1244-L1250 — # ensureConfig calls adrg/xdg.ConfigFile("mods/mods.yml"), # so this is the XDG config home on every platform supported by that library. paths = ["[configHome]/mods/mods.yml"] secret = [] # Source: https://github.com/charmbracelet/mods/blob/main/config.go#L1035-L1052 — # config.go models provider credentials as APIs..api-key. API-key-env # and API-key-cmd are references, not credentials stored in this file. [[dotfiles.secret_paths]] file = "[configHome]/mods/mods.yml" format = "yaml" match = { key_path = ["apis.*.api-key"] } [commands] format = 1 label = "Ask an LLM" description = "Send a prompt (and optionally piped input) to a model, or continue and list saved conversations. MCP, sampling and proxy options are left out." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "readme" kind = "help" url = "https://raw.githubusercontent.com/charmbracelet/mods/HEAD/README.md" evidence = """ - `-m`, `--model`: Specify Large Language Model to use - `-f`, `--format`: Ask the LLM to format the response in a given format - `--format-as`: Specify the format for the output (used with `--format`) - `-q`, `--quiet`: Only output errors to standard err - `-r`, `--raw`: Print raw response without syntax highlighting - `--role`: Specify the role to use (See [custom roles](#custom-roles)) - `--word-wrap`: Wrap output at width (defaults to 80) - `-t`, `--title`: Set the title for the conversation. - `-l`, `--list`: List saved conversations. - `-c`, `--continue`: Continue from last response or specific title or SHA-1. - `-C`, `--continue-last`: Continue the last conversation. - `-S`, `--show-last`: Show previous conversation - `--no-cache`: Do not save conversations """ [[commands.field]] id = "model" label = "Model" type = "string" option = ["--model", "-m"] sources = ["readme"] [[commands.field]] id = "format" label = "Ask for formatted response" type = "boolean" option = ["--format", "-f"] sources = ["readme"] [[commands.field]] id = "format_as" label = "Format" type = "string" option = ["--format-as"] suggestions = [{ value = "markdown", label = "Markdown" }, { value = "json", label = "JSON" }] sources = ["readme"] [[commands.field]] id = "role" label = "Role" type = "string" option = ["--role"] sources = ["readme"] [[commands.field]] id = "raw" label = "Raw output" type = "boolean" option = ["--raw", "-r"] sources = ["readme"] [[commands.field]] id = "quiet" label = "Only output errors to stderr" type = "boolean" option = ["--quiet", "-q"] sources = ["readme"] [[commands.field]] id = "title" label = "Conversation title" type = "string" option = ["--title", "-t"] sources = ["readme"] [[commands.field]] id = "continue_last" label = "Continue last conversation" type = "boolean" option = ["--continue-last", "-C"] sources = ["readme"] [[commands.field]] id = "list" label = "List saved conversations" type = "boolean" option = ["--list", "-l"] sources = ["readme"] [[commands.field]] id = "show_last" label = "Show previous conversation" type = "boolean" option = ["--show-last", "-S"] sources = ["readme"] [[commands.field]] id = "no_cache" label = "Do not save conversation" type = "boolean" option = ["--no-cache"] sources = ["readme"] [[commands.field]] id = "word_wrap" label = "Word wrap width" type = "integer" option = ["--word-wrap"] sources = ["readme"] [[commands.field]] id = "prompt" label = "Prompt" type = "string" position = 0 multiple = true sources = ["readme"] [[commands.task]] id = "ask" label = "Ask a question" fields = ["prompt", "model", "role", "format", "format_as", "raw", "no_cache"] required = ["prompt"] [[commands.task]] id = "continue" label = "Continue last conversation" fields = ["continue_last", "prompt", "model"] required = ["prompt"] set = { continue_last = [true] } lock = ["continue_last"] [[commands.task]] id = "history" label = "List saved conversations" fields = ["list"] set = { list = [true] } lock = ["list"] [[commands.group]] id = "basic" label = "Basic" fields = ["prompt", "model", "role", "format", "format_as", "continue_last", "list"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["raw", "quiet", "title", "show_last", "no_cache", "word_wrap"]