{
  "id": "mods",
  "name": "Mods",
  "homepage": "https://github.com/charmbracelet/mods",
  "description": "AI for the command line, built for pipelines.",
  "executables": [
    "mods"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/mods/mods.yml"
    ],
    "secret": [],
    "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
    },
    "source": [
      {
        "id": "readme",
        "kind": "help",
        "url": "https://raw.githubusercontent.com/charmbracelet/mods/HEAD/README.md",
        "evidence": "- `-m`, `--model`: Specify Large Language Model to use\n- `-f`, `--format`: Ask the LLM to format the response in a given format\n- `--format-as`: Specify the format for the output (used with `--format`)\n- `-q`, `--quiet`: Only output errors to standard err\n- `-r`, `--raw`: Print raw response without syntax highlighting\n- `--role`: Specify the role to use (See [custom roles](#custom-roles))\n- `--word-wrap`: Wrap output at width (defaults to 80)\n- `-t`, `--title`: Set the title for the conversation.\n- `-l`, `--list`: List saved conversations.\n- `-c`, `--continue`: Continue from last response or specific title or SHA-1.\n- `-C`, `--continue-last`: Continue the last conversation.\n- `-S`, `--show-last`: Show previous conversation\n- `--no-cache`: Do not save conversations\n"
      }
    ],
    "field": [
      {
        "id": "model",
        "label": "Model",
        "type": "string",
        "option": [
          "--model",
          "-m"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "format",
        "label": "Ask for formatted response",
        "type": "boolean",
        "option": [
          "--format",
          "-f"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "format_as",
        "label": "Format",
        "type": "string",
        "option": [
          "--format-as"
        ],
        "suggestions": [
          {
            "value": "markdown",
            "label": "Markdown"
          },
          {
            "value": "json",
            "label": "JSON"
          }
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "role",
        "label": "Role",
        "type": "string",
        "option": [
          "--role"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "raw",
        "label": "Raw output",
        "type": "boolean",
        "option": [
          "--raw",
          "-r"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "quiet",
        "label": "Only output errors to stderr",
        "type": "boolean",
        "option": [
          "--quiet",
          "-q"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "title",
        "label": "Conversation title",
        "type": "string",
        "option": [
          "--title",
          "-t"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "continue_last",
        "label": "Continue last conversation",
        "type": "boolean",
        "option": [
          "--continue-last",
          "-C"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "list",
        "label": "List saved conversations",
        "type": "boolean",
        "option": [
          "--list",
          "-l"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "show_last",
        "label": "Show previous conversation",
        "type": "boolean",
        "option": [
          "--show-last",
          "-S"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "no_cache",
        "label": "Do not save conversation",
        "type": "boolean",
        "option": [
          "--no-cache"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "word_wrap",
        "label": "Word wrap width",
        "type": "integer",
        "option": [
          "--word-wrap"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "prompt",
        "label": "Prompt",
        "type": "string",
        "position": 0,
        "multiple": true,
        "sources": [
          "readme"
        ]
      }
    ],
    "task": [
      {
        "id": "ask",
        "label": "Ask a question",
        "fields": [
          "prompt",
          "model",
          "role",
          "format",
          "format_as",
          "raw",
          "no_cache"
        ],
        "required": [
          "prompt"
        ]
      },
      {
        "id": "continue",
        "label": "Continue last conversation",
        "fields": [
          "continue_last",
          "prompt",
          "model"
        ],
        "required": [
          "prompt"
        ],
        "set": {
          "continue_last": [
            true
          ]
        },
        "lock": [
          "continue_last"
        ]
      },
      {
        "id": "history",
        "label": "List saved conversations",
        "fields": [
          "list"
        ],
        "set": {
          "list": [
            true
          ]
        },
        "lock": [
          "list"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "prompt",
          "model",
          "role",
          "format",
          "format_as",
          "continue_last",
          "list"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "raw",
          "quiet",
          "title",
          "show_last",
          "no_cache",
          "word_wrap"
        ]
      }
    ]
  }
}
