[{"data":1,"prerenderedAt":524},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Freference\u002Fcommands":3},{"id":4,"title":5,"body":6,"description":506,"extension":507,"frontmatter":508,"heading":5,"meta":514,"navigation":516,"order":517,"path":518,"seo":519,"sitemap":520,"source":521,"stem":522,"__hash__":523},"docs\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Findex.md","Commands",{"type":7,"value":8,"toc":498},"minimark",[9,29,34,163,187,191,329,333,336],[10,11,12,13,17,18,23,24,28],"p",{},"The ",[14,15,16],"code",{},"kubb"," CLI is the main way to run Kubb. It reads your ",[19,20,22],"a",{"href":21},"\u002Fdocs\u002F5.x\u002Freference\u002Fconfiguration","configuration"," and runs the generation pipeline. It also scaffolds projects, validates specs, starts a Model Context Protocol server for AI clients, connects a project to Kubb Studio, and installs extensions from the ",[19,25,27],{"href":26},"\u002Fdocs\u002F5.x\u002Freference\u002Fregistry","Kubb registry",".",[30,31,33],"h2",{"id":32},"usage","Usage",[35,36,41],"pre",{"language":37,"filename":38,"code":39,"class":40},"text","Terminal","USAGE:\n  kubb [COMMANDS] \u003COPTIONS> [\u003Cinput>]\n\nCOMMANDS:\n  [generate] \u003COPTIONS> [\u003Cinput>]      Generate TypeScript types, API clients, React Query hooks, Zod schemas, and more from an OpenAPI specification. Reads kubb.config.ts by default. Pass an OpenAPI file path as the first argument to override the input without editing the config.\n  add \u003COPTIONS> [\u003Cinput>]             Install a plugin, adapter, or parser from the Kubb registry at its reviewed version. A plugin or parser is added to kubb.config.ts, an adapter prints the code to add. Reads KUBB_REGISTRY to use another registry.\n  init \u003COPTIONS> [\u003Cinput>]            Scaffold a kubb.config.ts and install plugins for code generation from an OpenAPI spec. Run without flags for interactive setup, or pass --input, --output, and --plugins to skip the prompts.\n  list \u003COPTIONS> [\u003Cinput>]            List the installed Kubb extensions: their registry id, package, installed version, the version the Kubb registry pins, and whether an update exists.\n  mcp \u003COPTIONS> [\u003Cinput>]             Start a Model Context Protocol (MCP) server that exposes Kubb code generation as tools for AI assistants. Once running, configure your AI client (Claude, Cursor, Windsurf, etc.) to connect to it — the assistant can then call kubb generate directly without leaving the chat.\n  remove \u003COPTIONS> [\u003Cinput>]          Remove a plugin or parser from kubb.config.ts and uninstall its package.\n  studio \u003COPTIONS> [\u003Cinput>]          Connect this project to Kubb Studio, or manage its pairing and snapshots.\n  update \u003COPTIONS> [\u003Cinput>]          Update installed extensions to the version the Kubb registry pins. Pass ids to update only those, or --dry-run to list the updates without installing.\n  validate \u003COPTIONS> [\u003Cinput>]        Parse and validate an OpenAPI\u002FSwagger file for structural correctness. Reports schema errors, missing required fields, and malformed references. Use this before running generate to catch spec issues early.\n\nFor more info, run any command with the `--help` flag:\n  kubb --help\n  kubb add --help\n  kubb init --help\n  kubb list --help\n  kubb mcp --help\n  kubb remove --help\n  kubb studio --help\n  kubb update --help\n  kubb validate --help","highlights",[14,42,44,53,54,53,59,53,61,53,66,53,71,53,76,53,81,53,86,53,91,53,96,53,101,53,106,53,111,53,113,53,118,53,123,53,128,53,133,53,138,53,143,53,148,53,153,53,158],{"class":43},"language-text",[45,46,49],"span",{"class":47,"style":48},"line","display: inline",[45,50,52],{"style":51},"color:#24292e;--hls-dark:#e1e4e8","USAGE:","\n",[45,55,56],{"class":47,"style":48},[45,57,58],{"style":51},"  kubb [COMMANDS] \u003COPTIONS> [\u003Cinput>]",[45,60],{"class":47,"style":48},[45,62,63],{"class":47,"style":48},[45,64,65],{"style":51},"COMMANDS:",[45,67,68],{"class":47,"style":48},[45,69,70],{"style":51},"  [generate] \u003COPTIONS> [\u003Cinput>]      Generate TypeScript types, API clients, React Query hooks, Zod schemas, and more from an OpenAPI specification. Reads kubb.config.ts by default. Pass an OpenAPI file path as the first argument to override the input without editing the config.",[45,72,73],{"class":47,"style":48},[45,74,75],{"style":51},"  add \u003COPTIONS> [\u003Cinput>]             Install a plugin, adapter, or parser from the Kubb registry at its reviewed version. A plugin or parser is added to kubb.config.ts, an adapter prints the code to add. Reads KUBB_REGISTRY to use another registry.",[45,77,78],{"class":47,"style":48},[45,79,80],{"style":51},"  init \u003COPTIONS> [\u003Cinput>]            Scaffold a kubb.config.ts and install plugins for code generation from an OpenAPI spec. Run without flags for interactive setup, or pass --input, --output, and --plugins to skip the prompts.",[45,82,83],{"class":47,"style":48},[45,84,85],{"style":51},"  list \u003COPTIONS> [\u003Cinput>]            List the installed Kubb extensions: their registry id, package, installed version, the version the Kubb registry pins, and whether an update exists.",[45,87,88],{"class":47,"style":48},[45,89,90],{"style":51},"  mcp \u003COPTIONS> [\u003Cinput>]             Start a Model Context Protocol (MCP) server that exposes Kubb code generation as tools for AI assistants. Once running, configure your AI client (Claude, Cursor, Windsurf, etc.) to connect to it — the assistant can then call kubb generate directly without leaving the chat.",[45,92,93],{"class":47,"style":48},[45,94,95],{"style":51},"  remove \u003COPTIONS> [\u003Cinput>]          Remove a plugin or parser from kubb.config.ts and uninstall its package.",[45,97,98],{"class":47,"style":48},[45,99,100],{"style":51},"  studio \u003COPTIONS> [\u003Cinput>]          Connect this project to Kubb Studio, or manage its pairing and snapshots.",[45,102,103],{"class":47,"style":48},[45,104,105],{"style":51},"  update \u003COPTIONS> [\u003Cinput>]          Update installed extensions to the version the Kubb registry pins. Pass ids to update only those, or --dry-run to list the updates without installing.",[45,107,108],{"class":47,"style":48},[45,109,110],{"style":51},"  validate \u003COPTIONS> [\u003Cinput>]        Parse and validate an OpenAPI\u002FSwagger file for structural correctness. Reports schema errors, missing required fields, and malformed references. Use this before running generate to catch spec issues early.",[45,112],{"class":47,"style":48},[45,114,115],{"class":47,"style":48},[45,116,117],{"style":51},"For more info, run any command with the `--help` flag:",[45,119,120],{"class":47,"style":48},[45,121,122],{"style":51},"  kubb --help",[45,124,125],{"class":47,"style":48},[45,126,127],{"style":51},"  kubb add --help",[45,129,130],{"class":47,"style":48},[45,131,132],{"style":51},"  kubb init --help",[45,134,135],{"class":47,"style":48},[45,136,137],{"style":51},"  kubb list --help",[45,139,140],{"class":47,"style":48},[45,141,142],{"style":51},"  kubb mcp --help",[45,144,145],{"class":47,"style":48},[45,146,147],{"style":51},"  kubb remove --help",[45,149,150],{"class":47,"style":48},[45,151,152],{"style":51},"  kubb studio --help",[45,154,155],{"class":47,"style":48},[45,156,157],{"style":51},"  kubb update --help",[45,159,160],{"class":47,"style":48},[45,161,162],{"style":51},"  kubb validate --help",[10,164,165,166,168,169,172,173,176,177,180,181,186],{},"Run ",[14,167,16],{}," with no command and it runs ",[14,170,171],{},"kubb generate",". After the commands, ",[14,174,175],{},"kubb --help"," lists the ",[14,178,179],{},"generate"," arguments, options, and examples, which ",[19,182,184],{"href":183},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fgenerate",[14,185,171],{}," documents.",[30,188,190],{"id":189},"available-commands","Available commands",[192,193,194,207],"table",{},[195,196,197],"thead",{},[198,199,200,204],"tr",{},[201,202,203],"th",{},"Command",[201,205,206],{},"Description",[208,209,210,224,238,251,264,277,290,303,316],"tbody",{},[198,211,212,221],{},[213,214,215],"td",{},[19,216,218],{"href":217},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Finit",[14,219,220],{},"kubb init",[213,222,223],{},"Scaffold a new Kubb project with an interactive wizard.",[198,225,226,232],{},[213,227,228],{},[19,229,230],{"href":183},[14,231,171],{},[213,233,234,235,28],{},"Run the code-generation pipeline from your ",[14,236,237],{},"kubb.config.ts",[198,239,240,248],{},[213,241,242],{},[19,243,245],{"href":244},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fvalidate",[14,246,247],{},"kubb validate",[213,249,250],{},"Validate a Swagger\u002FOpenAPI document without running the pipeline.",[198,252,253,261],{},[213,254,255],{},[19,256,258],{"href":257},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fmcp",[14,259,260],{},"kubb mcp",[213,262,263],{},"Start a Model Context Protocol server for AI clients.",[198,265,266,274],{},[213,267,268],{},[19,269,271],{"href":270},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fstudio",[14,272,273],{},"kubb studio",[213,275,276],{},"Connect the project to Kubb Studio, or manage its pairing and snapshots.",[198,278,279,287],{},[213,280,281],{},[19,282,284],{"href":283},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fadd",[14,285,286],{},"kubb add",[213,288,289],{},"Install a plugin, adapter, or parser from the Kubb registry and add a plugin or parser to the config.",[198,291,292,300],{},[213,293,294],{},[19,295,297],{"href":296},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fupdate",[14,298,299],{},"kubb update",[213,301,302],{},"Move installed extensions to the version the Kubb registry pins.",[198,304,305,313],{},[213,306,307],{},[19,308,310],{"href":309},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Flist",[14,311,312],{},"kubb list",[213,314,315],{},"List the installed extensions, their versions, and available updates.",[198,317,318,326],{},[213,319,320],{},[19,321,323],{"href":322},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fremove",[14,324,325],{},"kubb remove",[213,327,328],{},"Remove a plugin or parser from the config and uninstall its package.",[30,330,332],{"id":331},"environment-variables","Environment variables",[10,334,335],{},"The CLI reads these shared environment variables.",[192,337,338,353],{},[195,339,340],{},[198,341,342,345,348,351],{},[201,343,344],{},"Variable",[201,346,347],{},"Type",[201,349,350],{},"Used by",[201,352,206],{},[208,354,355,380,400,421,444,466],{},[198,356,357,362,367,370],{},[213,358,359],{},[14,360,361],{},"KUBB_DISABLE_TELEMETRY",[213,363,364],{},[14,365,366],{},"boolean",[213,368,369],{},"all",[213,371,372,373,376,377,28],{},"Turn off anonymous usage telemetry. Set it to ",[14,374,375],{},"1"," or ",[14,378,379],{},"true",[198,381,382,387,391,393],{},[213,383,384],{},[14,385,386],{},"DO_NOT_TRACK",[213,388,389],{},[14,390,366],{},[213,392,369],{},[213,394,395,396,376,398,28],{},"Standard opt-out convention. Set it to ",[14,397,375],{},[14,399,379],{},[198,401,402,407,411,413],{},[213,403,404],{},[14,405,406],{},"KUBB_DEBUG",[213,408,409],{},[14,410,366],{},[213,412,369],{},[213,414,415,416,376,418,420],{},"Turn on source maps, so stack traces point at the original source. Set it to ",[14,417,375],{},[14,419,379],{},". Off by default because it slows startup.",[198,422,423,428,433,438],{},[213,424,425],{},[14,426,427],{},"KUBB_HOME",[213,429,430],{},[14,431,432],{},"string",[213,434,435],{},[14,436,437],{},"studio",[213,439,440,441,28],{},"Directory the CLI keeps its Studio state in. Defaults to ",[14,442,443],{},"~\u002F.kubb",[198,445,446,451,455,460],{},[213,447,448],{},[14,449,450],{},"KUBB_TOKEN",[213,452,453],{},[14,454,432],{},[213,456,457],{},[14,458,459],{},"studio snapshot",[213,461,462,463,28],{},"Organization CI API key. Same as ",[14,464,465],{},"--token",[198,467,468,473,477,492],{},[213,469,470],{},[14,471,472],{},"KUBB_REGISTRY",[213,474,475],{},[14,476,432],{},[213,478,479,482,483,482,486,482,489],{},[14,480,481],{},"add",", ",[14,484,485],{},"update",[14,487,488],{},"list",[14,490,491],{},"remove",[213,493,494,495,28],{},"Base URL of the extension registry. Defaults to ",[14,496,497],{},"https:\u002F\u002Fkubb.dev\u002Fregistry",{"title":499,"searchDepth":500,"depth":500,"links":501},"",5,[502,504,505],{"id":32,"depth":503,"text":33},2,{"id":189,"depth":503,"text":190},{"id":331,"depth":503,"text":332},"Reference for every command and flag exposed by the kubb CLI including init, generate, validate, mcp, studio, add, update, list, and remove.","md",{"layout":509,"title":5,"description":506,"outline":510,"navigation":512},"doc",[503,511],3,{"title":5,"icon":513},"i-iconoir-terminal",{"layout":509,"outline":515},[503,511],{"title":5,"icon":513},null,"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands",{"title":5,"description":506},{"loc":518},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Findex.md","docs\u002F5.x\u002Freference\u002Fcommands\u002Findex","NvQPp7vzSoDkoGExWE6Y4kjskOD2v6N8tT9vHSZOi1o",1793288240372]