{
  "id": "kimi-code",
  "name": "Kimi Code",
  "homepage": "https://github.com/MoonshotAI/kimi-code",
  "description": "Moonshot AI's coding agent for the terminal.",
  "icon": "theSVG:kimi",
  "executables": [
    "kimi"
  ],
  "dotfiles": {
    "paths": [
      "~/.kimi-code/config.toml",
      "~/.kimi-code/tui.toml"
    ],
    "exclude": [
      "~/.kimi-code/bin/",
      "~/.kimi-code/cache/",
      "~/.kimi-code/logs/",
      "~/.kimi-code/server/",
      "~/.kimi-code/sessions/",
      "~/.kimi-code/search-index/",
      "~/.kimi-code/telemetry/",
      "~/.kimi-code/session_index.jsonl",
      "~/.kimi-code/device_id",
      "~/.kimi-code/region",
      "~/.kimi-code/migrations-effort.json"
    ],
    "secret": [
      "~/.kimi-code/server.token"
    ],
    "secret_paths": [
      {
        "file": "~/.kimi-code/config.toml",
        "match": {
          "prefix": [
            "api_key"
          ]
        }
      }
    ],
    "machine_lines": [
      {
        "file": "~/.kimi-code/config.toml",
        "match": {
          "key_path": [
            "hooks.*.command"
          ]
        },
        "scope": "backup"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Start Kimi Code",
    "description": "Start an interactive session or run one prompt non-interactively, with model, mode and resume options. Subcommands (provider, session, web, acp, ...) are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "help",
        "revision": "kimi --help (local)",
        "evidence": "  -S, --session [id]            Resume a session. With ID: resume that session. Without ID:\n                                interactively pick.\n  -c, --continue                Continue the previous session for the working directory. (default:\n  -y, --yolo                    Start in Ask When Needed mode: routine edits and commands run\n  --auto                        Start in Never Ask mode: never interrupts you; everything runs and\n  -m, --model <model>           LLM model alias to use for this invocation. Defaults to\n  -p, --prompt <prompt>         Run one prompt non-interactively and print the response.\n  --output-format <format>      Output format for prompt mode. Defaults to text. (choices: \"text\",\n                                \"stream-json\")\n  --add-dir <dir>               Add an additional workspace directory for this session. Can be\n  --plan                        Start in plan mode. (default: false)\n"
      }
    ],
    "field": [
      {
        "id": "prompt",
        "label": "Prompt (non-interactive)",
        "description": "Run one prompt and print the response instead of opening the TUI.",
        "type": "string",
        "option": [
          "--prompt",
          "-p"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "model",
        "label": "Model alias",
        "type": "string",
        "option": [
          "--model",
          "-m"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "continue",
        "label": "Continue previous session",
        "type": "boolean",
        "option": [
          "--continue",
          "-c"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "plan",
        "label": "Plan mode",
        "type": "boolean",
        "option": [
          "--plan"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "yolo",
        "label": "Ask When Needed mode",
        "description": "Routine edits and commands run automatically; risky actions still ask.",
        "type": "boolean",
        "option": [
          "--yolo",
          "-y"
        ],
        "effect": "exec",
        "sources": [
          "help"
        ]
      },
      {
        "id": "auto",
        "label": "Never Ask mode",
        "description": "Everything runs and is decided automatically.",
        "type": "boolean",
        "option": [
          "--auto"
        ],
        "effect": "exec",
        "sources": [
          "help"
        ]
      },
      {
        "id": "output_format",
        "label": "Output format (prompt mode)",
        "type": "enum",
        "option": [
          "--output-format"
        ],
        "choices": [
          {
            "value": "text",
            "label": "Text"
          },
          {
            "value": "stream-json",
            "label": "Stream JSON"
          }
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "add_dir",
        "label": "Additional workspace directories",
        "type": "path",
        "path": {
          "kind": "directory",
          "role": "input"
        },
        "option": [
          "--add-dir"
        ],
        "multiple": true,
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "interactive",
        "label": "Interactive session",
        "fields": [
          "model",
          "plan"
        ],
        "required": []
      },
      {
        "id": "one_shot",
        "label": "Run one prompt",
        "fields": [
          "prompt",
          "model",
          "output_format"
        ],
        "required": [
          "prompt"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "prompt",
          "model",
          "continue",
          "plan"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "yolo",
          "auto",
          "output_format",
          "add_dir"
        ]
      }
    ]
  }
}
