{
  "id": "qwen-code",
  "name": "Qwen Code",
  "homepage": "https://github.com/QwenLM/qwen-code",
  "description": "Qwen Code is an open-source terminal agent for coding workflows.",
  "executables": [
    "qwen"
  ],
  "dotfiles": {
    "paths": [
      "~/.qwen/settings.json"
    ],
    "secret": [
      "~/.qwen/.env",
      "~/.qwen/oauth_creds.json"
    ],
    "side_effect": false,
    "secret_paths": [
      {
        "file": "~/.qwen/settings.json",
        "format": "json",
        "match": {
          "key_path": [
            "env.*",
            "security.auth.apiKey"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Run Qwen Code",
    "description": "Start an interactive session or run a one-shot prompt. Telemetry, ACP, extension and logging flags are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "docs",
        "kind": "manual",
        "url": "https://github.com/QwenLM/qwen-code/blob/main/docs/users/configuration/settings.md",
        "revision": "2026-10-27",
        "evidence": "| `--model`                    | `-m`  | Specifies the Qwen model to use for this session.\n| `--prompt`                   | `-p`  | Used to pass a prompt directly to the command. This invokes Qwen Code in a non-interactive mode.\n| `--prompt-interactive`       | `-i`  | Starts an interactive session with the provided prompt as the initial input.\n| `--output-format`            | `-o`  | Specifies the format of the CLI output for non-interactive mode. | `text`, `json`, `stream-json`\n| `--sandbox`                  | `-s`  | Enables sandbox mode for this session.\n| `--debug`                    | `-d`  | Enables debug mode for this session, providing more verbose output.\n| `--yolo`                     |       | Enables YOLO mode, which automatically approves all tool calls.\n| `--approval-mode`            |       | Sets the approval mode for tool calls. | `plan`, `default`, `auto-edit`, `auto`, `yolo`\n| `--allowed-tools`            |       | A comma-separated list of tool names that will bypass the confirmation dialog.\n| `--include-directories`      |       | Includes additional directories in the workspace for multi-directory support.\n"
      }
    ],
    "field": [
      {
        "id": "prompt",
        "label": "Prompt (non-interactive)",
        "description": "Runs once and prints the answer.",
        "type": "string",
        "option": [
          "--prompt",
          "-p"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "prompt_interactive",
        "label": "Initial prompt (interactive)",
        "type": "string",
        "option": [
          "--prompt-interactive",
          "-i"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "model",
        "label": "Model",
        "type": "string",
        "option": [
          "--model",
          "-m"
        ],
        "suggestions": [
          {
            "value": "qwen3-coder-plus",
            "label": "qwen3-coder-plus"
          }
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "approval_mode",
        "label": "Approval mode",
        "type": "enum",
        "option": [
          "--approval-mode"
        ],
        "choices": [
          {
            "value": "plan",
            "label": "Plan (analyze only)"
          },
          {
            "value": "default",
            "label": "Default"
          },
          {
            "value": "auto-edit",
            "label": "Auto-edit"
          },
          {
            "value": "auto",
            "label": "Auto"
          },
          {
            "value": "yolo",
            "label": "YOLO"
          }
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "yolo",
        "label": "YOLO (approve all tool calls)",
        "type": "boolean",
        "option": [
          "--yolo"
        ],
        "effect": "exec",
        "sources": [
          "docs"
        ]
      },
      {
        "id": "sandbox",
        "label": "Sandbox",
        "type": "boolean",
        "option": [
          "--sandbox",
          "-s"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "output_format",
        "label": "Output format",
        "type": "enum",
        "option": [
          "--output-format",
          "-o"
        ],
        "choices": [
          {
            "value": "text",
            "label": "Text"
          },
          {
            "value": "json",
            "label": "JSON"
          },
          {
            "value": "stream-json",
            "label": "Streaming JSON"
          }
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "allowed_tools",
        "label": "Allowed tools",
        "description": "Comma-separated tool names that skip confirmation.",
        "type": "string",
        "option": [
          "--allowed-tools"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "include_directories",
        "label": "Extra workspace directories",
        "type": "path",
        "option": [
          "--include-directories"
        ],
        "multiple": true,
        "path": {
          "kind": "directory",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "docs"
        ]
      },
      {
        "id": "debug",
        "label": "Debug",
        "type": "boolean",
        "option": [
          "--debug",
          "-d"
        ],
        "sources": [
          "docs"
        ]
      }
    ],
    "task": [
      {
        "id": "interactive",
        "label": "Interactive session",
        "fields": [
          "prompt_interactive",
          "model",
          "approval_mode",
          "sandbox"
        ],
        "required": []
      },
      {
        "id": "one-shot",
        "label": "One-shot prompt",
        "fields": [
          "prompt",
          "model",
          "output_format",
          "approval_mode"
        ],
        "required": [
          "prompt"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "prompt",
          "prompt_interactive",
          "model",
          "approval_mode",
          "output_format"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "yolo",
          "sandbox",
          "allowed_tools",
          "include_directories",
          "debug"
        ]
      }
    ]
  }
}
