{
  "id": "aichat",
  "name": "AIChat",
  "homepage": "https://github.com/sigoden/aichat",
  "description": "All-in-one LLM CLI tool featuring Shell Assistant, Chat-REPL, RAG, AI Tools & Agents, and more.",
  "executables": [
    "aichat"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/aichat/config.yaml",
      "[appData]/aichat/config.yaml",
      "%APPDATA%/aichat/config.yaml"
    ],
    "secret": [
      "[configHome]/aichat/.env",
      "[appData]/aichat/.env",
      "%APPDATA%/aichat/.env"
    ],
    "secret_paths": [
      {
        "file": [
          "[configHome]/aichat/config.yaml",
          "[appData]/aichat/config.yaml",
          "%APPDATA%/aichat/config.yaml"
        ],
        "format": "yaml",
        "match": {
          "key_path": [
            "clients.*.api_key"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Ask AIChat",
    "description": "Send a prompt to an LLM with an optional model, role, session and input files. RAG, agents, macros and the server mode are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "cli",
        "kind": "help",
        "url": "https://github.com/sigoden/aichat/blob/main/src/cli.rs",
        "revision": "main 2026-10",
        "evidence": "    /// Select a LLM model\n    pub model: Option<String>,\n    /// Select a role\n    pub role: Option<String>,\n    /// Start or join a session\n    pub session: Option<Option<String>>,\n    /// Execute commands in natural language\n    pub execute: bool,\n    /// Output code only\n    pub code: bool,\n    /// Include files, directories, or URLs\n    #[clap(short = 'f', long, value_name = \"FILE\")]\n    pub file: Vec<String>,\n    /// Turn off stream mode\n    pub no_stream: bool,\n    /// Display the message without sending it\n    pub dry_run: bool,\n    /// List all available chat models\n    pub list_models: bool,\n    /// List all roles\n    pub list_roles: bool\n    /// Input text\n    text: Vec<String>\nLong options: --model --role --session --execute --code --file --no-stream --dry-run --list-models --list-roles\n"
      }
    ],
    "field": [
      {
        "id": "text",
        "label": "Prompt",
        "type": "string",
        "position": 0,
        "multiple": true,
        "sources": [
          "cli"
        ]
      },
      {
        "id": "model",
        "label": "Model",
        "description": "Model id such as openai:gpt-4o.",
        "type": "string",
        "option": [
          "--model"
        ],
        "sources": [
          "cli"
        ]
      },
      {
        "id": "role",
        "label": "Role",
        "type": "string",
        "option": [
          "--role"
        ],
        "sources": [
          "cli"
        ]
      },
      {
        "id": "session",
        "label": "Session",
        "type": "string",
        "option": [
          "--session"
        ],
        "sources": [
          "cli"
        ]
      },
      {
        "id": "file",
        "label": "Include files or URLs",
        "type": "string",
        "option": [
          "--file"
        ],
        "multiple": true,
        "sources": [
          "cli"
        ]
      },
      {
        "id": "execute",
        "label": "Natural-language shell command",
        "type": "boolean",
        "option": [
          "--execute"
        ],
        "sources": [
          "cli"
        ]
      },
      {
        "id": "code",
        "label": "Output code only",
        "type": "boolean",
        "option": [
          "--code"
        ],
        "sources": [
          "cli"
        ]
      },
      {
        "id": "no_stream",
        "label": "Disable streaming",
        "type": "boolean",
        "option": [
          "--no-stream"
        ],
        "sources": [
          "cli"
        ]
      },
      {
        "id": "dry_run",
        "label": "Dry run",
        "type": "boolean",
        "option": [
          "--dry-run"
        ],
        "sources": [
          "cli"
        ]
      }
    ],
    "task": [
      {
        "id": "ask",
        "label": "Ask a question",
        "fields": [
          "text",
          "model",
          "file"
        ],
        "required": [
          "text"
        ]
      },
      {
        "id": "shell",
        "label": "Suggest a shell command",
        "fields": [
          "text",
          "execute"
        ],
        "required": [
          "text",
          "execute"
        ],
        "set": {
          "execute": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "text",
          "model",
          "role",
          "file",
          "execute",
          "code"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "session",
          "no_stream",
          "dry_run"
        ]
      }
    ]
  }
}
