{
  "id": "west",
  "name": "west",
  "homepage": "https://docs.zephyrproject.org/latest/develop/west/",
  "description": "Zephyr Project meta-tool.",
  "executables": [
    "west"
  ],
  "dotfiles": {
    "paths": [
      "~/.westconfig",
      "[configHome]/west/config"
    ],
    "exclude": [],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "West",
    "description": "Common west jobs: create a workspace, update projects, build a Zephyr application. Flash, debug, sysbuild and CMake pass-through arguments are not covered.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "init"
        ],
        "label": "Create a workspace",
        "description": "Clone a manifest repository into a new west workspace.",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://docs.zephyrproject.org/latest/develop/west/built-in.html",
            "revision": "2026-10-27",
            "evidence": "west init [-m URL] [--mr REVISION] [--mf FILE] [directory]\nwest init -l [--mf FILE] directory\nwest init -m https://github.com/zephyrproject-rtos/zephyr --mr v1.14.0 zp\n"
          }
        ],
        "field": [
          {
            "id": "manifest_url",
            "label": "Manifest repository URL",
            "type": "url",
            "option": [
              "-m"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "manifest_rev",
            "label": "Manifest revision",
            "type": "string",
            "option": [
              "--mr"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "manifest_file",
            "label": "Manifest file",
            "type": "string",
            "option": [
              "--mf"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "local",
            "label": "Use an existing local manifest repository",
            "type": "boolean",
            "option": [
              "-l"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "directory",
            "label": "Directory",
            "type": "path",
            "path": {
              "kind": "directory",
              "role": "output"
            },
            "position": 0,
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "clone",
            "label": "Clone a manifest",
            "fields": [
              "manifest_url",
              "manifest_rev",
              "directory"
            ],
            "required": [
              "directory"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "manifest_url",
              "manifest_rev",
              "manifest_file",
              "local",
              "directory"
            ]
          }
        ]
      },
      {
        "path": [
          "update"
        ],
        "label": "Update projects",
        "description": "Update the projects listed in the manifest.",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://docs.zephyrproject.org/latest/develop/west/built-in.html",
            "revision": "2026-10-27",
            "evidence": "west update [-f {always,smart}] [-k] [-r]\n            [--group-filter FILTER] [--stats] [PROJECT ...]\n"
          }
        ],
        "field": [
          {
            "id": "fetch",
            "label": "Fetch policy",
            "type": "enum",
            "option": [
              "-f"
            ],
            "choices": [
              {
                "value": "always",
                "label": "Always"
              },
              {
                "value": "smart",
                "label": "Smart"
              }
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "keep_descendants",
            "label": "Keep descendant branches",
            "type": "boolean",
            "option": [
              "-k"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "rebase",
            "label": "Rebase instead of detaching",
            "type": "boolean",
            "option": [
              "-r"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "stats",
            "label": "Print statistics",
            "type": "boolean",
            "option": [
              "--stats"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "projects",
            "label": "Projects",
            "type": "string",
            "position": 0,
            "multiple": true,
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "update",
            "label": "Update all projects",
            "fields": [],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "fetch",
              "keep_descendants",
              "rebase",
              "stats",
              "projects"
            ]
          }
        ]
      },
      {
        "path": [
          "build"
        ],
        "label": "Build an application",
        "description": "Build a Zephyr application for a board.",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://docs.zephyrproject.org/latest/develop/west/build-flash-debug.html",
            "revision": "2026-10-27",
            "evidence": "west build -b <BOARD> path/to/source/directory\nwest build -b <BOARD> --build-dir path/to/build/directory\nwest build -b qemu_x86 -t run samples/hello_world\nwest build -p -b reel_board samples/hello_world\nwest build -p=always -b reel_board samples/hello_world\nwest build -c\n"
          }
        ],
        "field": [
          {
            "id": "board",
            "label": "Board",
            "type": "string",
            "option": [
              "-b"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "build_dir",
            "label": "Build directory",
            "type": "path",
            "path": {
              "kind": "directory",
              "role": "output"
            },
            "option": [
              "--build-dir",
              "-d"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "target",
            "label": "Build target",
            "type": "string",
            "option": [
              "-t"
            ],
            "suggestions": [
              {
                "value": "run",
                "label": "run"
              },
              {
                "value": "pristine",
                "label": "pristine"
              },
              {
                "value": "help",
                "label": "help"
              }
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "pristine",
            "label": "Pristine build",
            "type": "boolean",
            "option": [
              "-p"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "cmake",
            "label": "Force CMake re-run",
            "type": "boolean",
            "option": [
              "-c"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "source_dir",
            "label": "Source directory",
            "type": "path",
            "path": {
              "kind": "directory",
              "role": "input"
            },
            "position": 0,
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "build",
            "label": "Build for a board",
            "fields": [
              "board",
              "source_dir"
            ],
            "required": [
              "board"
            ]
          },
          {
            "id": "clean_build",
            "label": "Pristine build",
            "fields": [
              "board",
              "pristine",
              "source_dir"
            ],
            "required": [
              "board"
            ],
            "set": {
              "pristine": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "board",
              "source_dir",
              "pristine"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "build_dir",
              "target",
              "cmake"
            ]
          }
        ]
      }
    ]
  }
}
