[{"data":1,"prerenderedAt":1444,"buildId":1445},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fstudio":3},{"id":4,"title":5,"body":6,"description":1427,"extension":1428,"frontmatter":1429,"heading":15,"meta":1435,"navigation":1437,"order":1432,"path":1438,"seo":1439,"sitemap":1440,"source":1441,"stem":1442,"__hash__":1443},"docs\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fstudio.md","kubb studio - Connect a project to Kubb Studio",{"type":7,"value":8,"toc":1393},"minimark",[9,32,54,59,62,66,90,94,101,130,178,191,252,258,262,268,362,366,382,385,420,433,438,454,458,477,481,596,599,609,612,631,741,760,788,792,802,806,816,820,839,850,858,862,895,899,902,909,940,945,974,1006,1057,1061,1102,1123,1127,1172,1178,1181,1186,1193,1232,1236,1263,1267,1303,1310,1322,1325,1341,1385,1389],[10,11,12,16,17,22,23,27,28,31],"p",{},[13,14,15],"code",{},"kubb studio"," connects your project to ",[18,19,21],"a",{"href":20},"https:\u002F\u002Fkubb.studio","Kubb Studio",". The CLI generates on your machine and sends progress and file paths to Studio. To share more, grant ",[18,24,26],{"href":25},"#permissions","permissions",", such as ",[13,29,30],{},"--allow-read"," for file contents.",[33,34,38],"pre",{"language":35,"filename":36,"code":15,"class":37},"shell","Terminal","highlights",[13,39,41],{"class":40},"language-shell",[42,43,46,50],"span",{"class":44,"style":45},"line","display: inline",[42,47,49],{"style":48},"color:#6f42c1;--hls-dark:#b392f0","kubb ",[42,51,53],{"style":52},"color:#24292e;--hls-dark:#e1e4e8","studio",[55,56,58],"h2",{"id":57},"pair-the-machine","Pair the machine",[10,60,61],{},"On the first run, the CLI pairs your machine:",[63,64],"mermaid",{"svg":65},"\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" class=\"pele pele-sequence\" viewBox=\"0 0 483 352\" width=\"483\" height=\"352\" style=\"--_bg:var(--pele-bg,#fff);--_fg:var(--pele-fg,#1f1f1f);--_m:var(--pele-muted,#6e6e6e);--_l:var(--pele-line,#1f1f1f);--_s:var(--pele-surface,#f3f3f3);--_a:var(--pele-surface-alt,#e6e6e6);--_b:var(--pele-border,#8a8a8a);--_c:var(--pele-accent,#5b7bd5);color:var(--_fg);--_r:var(--pele-radius,4px);--_fm:var(--pele-font-mono,monospace);font:16px sans-serif;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;font-family:var(--pele-font,sans-serif)\" fill=\"var(--_fg)\" role=\"graphics-document document\" aria-roledescription=\"sequence\">\u003Cg transform=\"translate(64.91,8)\">\u003Cg class=\"pele-lifelines\" fill=\"none\" stroke=\"var(--_b)\">\u003Cpath class=\"pele-lifeline\" data-id=\"CLI\" d=\"M0,44V292\"\u002F>\u003Cpath class=\"pele-lifeline\" data-id=\"You\" d=\"M226.95,44V292\"\u002F>\u003Cpath class=\"pele-lifeline\" data-id=\"Studio\" d=\"M370.68,44V292\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edges\" fill=\"none\" stroke=\"var(--_l)\" stroke-linecap=\"round\">\u003Cg class=\"pele-edge pele-message\" data-id=\"i0\">\u003Cpath d=\"M0,87H219.95\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M226.95,87L218.95,90.36L218.95,83.64Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge pele-message\" data-id=\"i1\">\u003Cpath d=\"M226.95,124H363.68\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M370.68,124L362.68,127.36L362.68,120.64Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge pele-message\" data-id=\"i2\">\u003Cpath d=\"M370.68,161H7\" stroke-dasharray=\"4 4\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M0,161L8,157.64L8,164.36Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge pele-message\" data-id=\"i3\">\u003Cpath d=\"M0,198H219.95\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M226.95,198L218.95,201.36L218.95,194.64Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge pele-message\" data-id=\"i4\">\u003Cpath d=\"M0,235H363.68\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M370.68,235L362.68,238.36L362.68,231.64Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge pele-message\" data-id=\"i5\">\u003Cpath d=\"M370.68,272H7\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M0,272L8,268.64L8,275.36Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003C\u002Fg>\u003Cg class=\"pele-edge-labels\" font-size=\"14\">\u003Cg class=\"pele-edge-label\" data-id=\"i0\">\u003Ctext x=\"113.47\" y=\"77.4\" text-anchor=\"middle\">Show pairing code and page\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-edge-label\" data-id=\"i1\">\u003Ctext x=\"298.81\" y=\"114.4\" text-anchor=\"middle\">Approve the code\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-edge-label\" data-id=\"i2\">\u003Ctext x=\"185.34\" y=\"151.4\" text-anchor=\"middle\">Token\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-edge-label\" data-id=\"i3\">\u003Ctext x=\"113.47\" y=\"188.4\" text-anchor=\"middle\">Ask which permissions to grant\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-edge-label\" data-id=\"i4\">\u003Ctext x=\"185.34\" y=\"225.4\" text-anchor=\"middle\">Connect\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-edge-label\" data-id=\"i5\">\u003Crect x=\"132.93\" y=\"249\" width=\"104.83\" height=\"17\" rx=\"3\" fill=\"var(--_bg)\" stroke=\"none\"\u002F>\u003Ctext x=\"185.34\" y=\"262.4\" text-anchor=\"middle\">Generation jobs\u003C\u002Ftext>\u003C\u002Fg>\u003C\u002Fg>\u003Cg class=\"pele-nodes\">\u003Cg class=\"pele-node pele-actor pele-actor-participant pele-actor-footer\" data-id=\"CLI\">\u003Crect x=\"-56.91\" y=\"292\" width=\"113.82\" height=\"44\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"319.6\" text-anchor=\"middle\">kubb studio\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-actor pele-actor-participant pele-actor-footer\" data-id=\"You\">\u003Crect x=\"194.95\" y=\"292\" width=\"64\" height=\"44\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"226.95\" y=\"319.6\" text-anchor=\"middle\">You\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-actor pele-actor-participant pele-actor-footer\" data-id=\"Studio\">\u003Crect x=\"332\" y=\"292\" width=\"77.36\" height=\"44\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"370.68\" y=\"319.6\" text-anchor=\"middle\">Studio\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-actor pele-actor-participant\" data-id=\"CLI\">\u003Crect x=\"-56.91\" y=\"0\" width=\"113.82\" height=\"44\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"27.6\" text-anchor=\"middle\">kubb studio\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-actor pele-actor-participant\" data-id=\"You\">\u003Crect x=\"194.95\" y=\"0\" width=\"64\" height=\"44\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"226.95\" y=\"27.6\" text-anchor=\"middle\">You\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-actor pele-actor-participant\" data-id=\"Studio\">\u003Crect x=\"332\" y=\"0\" width=\"77.36\" height=\"44\" fill=\"var(--_s)\" stroke=\"var(--_b)\" style=\"rx:var(--_r)\"\u002F>\u003Ctext class=\"pele-label\" x=\"370.68\" y=\"27.6\" text-anchor=\"middle\">Studio\u003C\u002Ftext>\u003C\u002Fg>\u003C\u002Fg>\u003C\u002Fg>\u003C\u002Fsvg>",[67,68,69,73,76,79],"ul",{},[70,71,72],"li",{},"Approve the code before it expires. The CLI copies it to the clipboard when it can.",[70,74,75],{},"The permission list starts unchecked. The CLI remembers your answers per project folder.",[70,77,78],{},"Each job logs one line: time, command, requester, and result. Steps and diagnostics stay in Studio.",[70,80,81,82,85,86,89],{},"Press ",[13,83,84],{},"b"," to move the session to the background worker, like ",[13,87,88],{},"kubb studio start",".",[55,91,93],{"id":92},"pair-with-a-code","Pair with a code",[10,95,96,97,100],{},"An agent that an MCP client starts pairs itself, with no person approving it. The ",[13,98,99],{},"kubb_studio_connect"," MCP tool hands out a one-time code and the command to run:",[33,102,104],{"language":35,"filename":36,"code":103,"class":37},"KUBB_STUDIO_PAIRING_CODE=kubb_pair_... npx kubb studio connect --allow-write --no-open --url https:\u002F\u002Fkubb.studio",[13,105,106],{"class":40},[42,107,108,111,115,118,121,124,127],{"class":44,"style":45},[42,109,110],{"style":52},"KUBB_STUDIO_PAIRING_CODE",[42,112,114],{"style":113},"color:#d73a49;--hls-dark:#f97583","=",[42,116,117],{"style":52},"kubb_pair_... ",[42,119,120],{"style":48},"npx ",[42,122,123],{"style":52},"kubb studio connect --allow-write --no-open --url https",[42,125,126],{"style":52},":",[42,128,129],{"style":52},"\u002F\u002Fkubb.studio",[67,131,132,150,153,160,166,169,172],{},[70,133,134,135,137,138,141,142,145,146,149],{},"When ",[13,136,110],{}," is set, ",[13,139,140],{},"connect",", ",[13,143,144],{},"start",", and ",[13,147,148],{},"login"," redeem the code instead of showing a pairing code. The CLI reads the code from the environment, so it never shows in the process list, and never logs it.",[70,151,152],{},"A code works once and lasts 5 minutes. The CLI sends it once and never again, even when Studio refuses it.",[70,154,155,156,159],{},"Only the flags grant permissions, and the CLI asks no questions. ",[13,157,158],{},"--allow-write"," alone is enough for a factory.",[70,161,162,163,89],{},"No browser opens, with or without ",[13,164,165],{},"--no-open",[70,167,168],{},"The token lasts an hour. A connected CLI refreshes it at 70 to 85 percent of its lifetime, picked at random so many agents do not refresh at once.",[70,170,171],{},"The same person, MCP client, and project folder pairing again gets the same agent and a new token.",[70,173,174,175,89],{},"Once connected, the CLI prints the agent ID. The MCP client passes that ID to ",[13,176,177],{},"kubb_studio_generate",[10,179,180,181,187,188,126],{},"When Studio refuses the code, the CLI prints why as ",[18,182,184],{"href":183},"\u002Fdocs\u002F5.x\u002Freference\u002Fdiagnostics#kubb-studio-refused",[13,185,186],{},"KUBB_STUDIO_REFUSED"," and exits with code ",[13,189,190],{},"1",[192,193,194,210],"table",{},[195,196,197],"thead",{},[198,199,200,204,207],"tr",{},[201,202,203],"th",{},"Studio answers",[201,205,206],{},"Why",[201,208,209],{},"What to do",[211,212,213,227,239],"tbody",{},[198,214,215,221,224],{},[216,217,218],"td",{},[13,219,220],{},"invalid_grant",[216,222,223],{},"The code is unknown or used, or its connection was revoked",[216,225,226],{},"Ask the MCP client for a new code",[198,228,229,234,237],{},[216,230,231],{},[13,232,233],{},"expired_token",[216,235,236],{},"The code is older than 5 minutes",[216,238,226],{},[198,240,241,246,249],{},[216,242,243],{},[13,244,245],{},"access_denied",[216,247,248],{},"The plan reached its MCP agent limit",[216,250,251],{},"Remove an MCP agent in Studio, or upgrade the plan",[10,253,254,255,257],{},"When Studio later rejects the token of an agent paired with a code, the CLI forgets the token and exits with ",[13,256,186],{},". Ask the MCP client for a new code.",[55,259,261],{"id":260},"actions","Actions",[10,263,264,265,267],{},"The first argument picks the action, ",[13,266,140],{}," by default.",[192,269,270,280],{},[195,271,272],{},[198,273,274,277],{},[201,275,276],{},"Action",[201,278,279],{},"What it does",[211,281,282,291,300,310,319,329,339,348],{},[198,283,284,288],{},[216,285,286],{},[13,287,140],{},[216,289,290],{},"Holds a foreground session open and generates on request",[198,292,293,297],{},[216,294,295],{},[13,296,144],{},[216,298,299],{},"Resolves pairing and permissions, then connects in the background",[198,301,302,307],{},[216,303,304],{},[13,305,306],{},"stop",[216,308,309],{},"Stops the background worker and keeps its pairing",[198,311,312,316],{},[216,313,314],{},[13,315,148],{},[216,317,318],{},"Pairs this machine again without a session. Saved permissions reset.",[198,320,321,326],{},[216,322,323],{},[13,324,325],{},"logout",[216,327,328],{},"Stops the worker and forgets this project's token",[198,330,331,336],{},[216,332,333],{},[13,334,335],{},"status",[216,337,338],{},"Shows pairing, worker state, permissions, and the log path, each with the command that changes it",[198,340,341,345],{},[216,342,343],{},[13,344,26],{},[216,346,347],{},"Changes saved permissions without pairing again. Needs an interactive terminal.",[198,349,350,355],{},[216,351,352],{},[13,353,354],{},"snapshot",[216,356,357,358,89],{},"Generates, packs, and uploads a snapshot, then exits. See ",[18,359,361],{"href":360},"\u002Fdocs\u002F5.x\u002Fintegrations\u002Fci","Publish snapshots from CI",[55,363,365],{"id":364},"background-connection","Background connection",[10,367,368,369,141,371,145,373,375,376,378,379,381],{},"Run ",[13,370,144],{},[13,372,335],{},[13,374,306],{}," from the project folder or any folder inside it. ",[13,377,144],{}," asks its questions, then returns while the worker connects. ",[13,380,335],{}," reports its state:",[63,383],{"svg":384},"\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" class=\"pele pele-state\" viewBox=\"0 0 317 519\" width=\"317\" height=\"519\" style=\"--_bg:var(--pele-bg,#fff);--_fg:var(--pele-fg,#1f1f1f);--_m:var(--pele-muted,#6e6e6e);--_l:var(--pele-line,#1f1f1f);--_s:var(--pele-surface,#f3f3f3);--_a:var(--pele-surface-alt,#e6e6e6);--_b:var(--pele-border,#8a8a8a);--_c:var(--pele-accent,#5b7bd5);color:var(--_fg);--_fm:var(--pele-font-mono,monospace);font:16px sans-serif;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;font-family:var(--pele-font,sans-serif)\" fill=\"var(--_fg)\" role=\"graphics-document document\" aria-roledescription=\"state\">\u003Cg class=\"pele-edges\" fill=\"none\" stroke=\"var(--_l)\" stroke-linecap=\"round\">\u003Cg class=\"pele-edge pele-transition\" data-id=\"edge0\">\u003Cpath d=\"M146.02,22L146.02,84\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M146.02,91L142.66,83L149.38,83Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge pele-transition\" data-id=\"edge1\">\u003Cpath d=\"M146.02,135L146.02,172\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M146.02,179L142.66,171L149.38,171Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge pele-transition\" data-id=\"edge2\">\u003Cpath d=\"M130.02,223L130.02,231.09C130.02,236.3 85.33,236.3 85.33,241.5L85.33,285\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M85.33,292L81.97,284L88.69,284Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge pele-transition\" data-id=\"edge3\">\u003Cpath d=\"M146.02,292L146.02,230\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M146.02,223L149.38,231L142.66,231Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge pele-transition\" data-id=\"edge4\">\u003Cpath d=\"M105.38,336L105.38,398\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M105.38,405L102.02,397L108.74,397Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge pele-transition\" data-id=\"edge5\">\u003Cpath d=\"M162.02,223L162.02,231.09C162.02,235.93 251.64,236.67 251.64,241.5L251.64,285\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M251.64,292L248.28,284L255,284Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge pele-transition\" data-id=\"edge6\">\u003Cpath d=\"M105.38,449C105.38,464.5 178.51,464.5 178.51,480L178.51,486\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M178.51,493L175.15,485L181.87,485Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-edge pele-transition\" data-id=\"edge7\">\u003Cpath d=\"M251.64,336L251.64,449C251.64,464.5 178.51,464.5 178.51,480L178.51,486\"\u002F>\u003Cpath class=\"pele-marker\" d=\"M178.51,493L175.15,485L181.87,485Z\" fill=\"var(--_l)\" stroke=\"none\"\u002F>\u003C\u002Fg>\u003C\u002Fg>\u003Cg class=\"pele-edge-labels\" font-size=\"14\">\u003Cg class=\"pele-edge-label\" data-id=\"edge0\">\u003Crect x=\"90.66\" y=\"42.5\" width=\"110.72\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"146.02\" y=\"57.9\" text-anchor=\"middle\">kubb studio start\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-edge-label\" data-id=\"edge2\">\u003Crect x=\"34.64\" y=\"243.5\" width=\"101.38\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"85.33\" y=\"258.9\" text-anchor=\"middle\">connection lost\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-edge-label\" data-id=\"edge4\">\u003Crect x=\"57.41\" y=\"356.5\" width=\"95.93\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"105.38\" y=\"371.9\" text-anchor=\"middle\">token rejected\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-edge-label\" data-id=\"edge5\">\u003Crect x=\"196.67\" y=\"243.5\" width=\"109.95\" height=\"21\" rx=\"3\" fill=\"var(--_bg)\"\u002F>\u003Ctext x=\"251.64\" y=\"258.9\" text-anchor=\"middle\">kubb studio stop\u003C\u002Ftext>\u003C\u002Fg>\u003C\u002Fg>\u003Cg class=\"pele-nodes\">\u003Cg class=\"pele-node pele-state\" data-id=\"auth\" transform=\"translate(105.38,427)\">\u003Crect x=\"-97.38\" y=\"-22\" width=\"194.75\" height=\"44\" rx=\"10\" fill=\"var(--_s)\" stroke=\"var(--_b)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">authentication required\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-state-start\" data-id=\"root_start\" transform=\"translate(146.02,15)\">\u003Ccircle r=\"7\" fill=\"var(--_l)\"\u002F>\u003C\u002Fg>\u003Cg class=\"pele-node pele-state\" data-id=\"starting\" transform=\"translate(146.02,113)\">\u003Crect x=\"-42.23\" y=\"-22\" width=\"84.46\" height=\"44\" rx=\"10\" fill=\"var(--_s)\" stroke=\"var(--_b)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">starting\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-state\" data-id=\"connected\" transform=\"translate(146.02,201)\">\u003Crect x=\"-52.91\" y=\"-22\" width=\"105.82\" height=\"44\" rx=\"10\" fill=\"var(--_s)\" stroke=\"var(--_b)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">connected\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-state\" data-id=\"reconnecting\" transform=\"translate(105.38,314)\">\u003Crect x=\"-61.8\" y=\"-22\" width=\"123.6\" height=\"44\" rx=\"10\" fill=\"var(--_s)\" stroke=\"var(--_b)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">reconnecting\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-state\" data-id=\"stopped\" transform=\"translate(251.64,314)\">\u003Crect x=\"-44.46\" y=\"-22\" width=\"88.93\" height=\"44\" rx=\"10\" fill=\"var(--_s)\" stroke=\"var(--_b)\"\u002F>\u003Ctext class=\"pele-label\" x=\"0\" y=\"5.6\" text-anchor=\"middle\">stopped\u003C\u002Ftext>\u003C\u002Fg>\u003Cg class=\"pele-node pele-state-end\" data-id=\"root_end\" transform=\"translate(178.51,502)\">\u003Ccircle r=\"8.5\" fill=\"var(--_bg)\" stroke=\"var(--_l)\"\u002F>\u003Ccircle r=\"5\" fill=\"var(--_l)\"\u002F>\u003C\u002Fg>\u003C\u002Fg>\u003C\u002Fsvg>",[67,386,387,392,395,404,407],{},[70,388,389,390,89],{},"One worker owns a project. Stop it before a foreground ",[13,391,140],{},[70,393,394],{},"The worker survives a closed terminal and retries temporary failures. Start it again after a crash or reboot.",[70,396,397,398,401,402,89],{},"When its token is rejected, run ",[13,399,400],{},"kubb studio login",", then ",[13,403,88],{},[70,405,406],{},"To change the URL or config, stop the worker and start it with the new flags.",[70,408,409,410,412,413,419],{},"The worker listens on a loopback port derived from the project folder. When ",[13,411,144],{}," reports the port is occupied by another program, set ",[18,414,416],{"href":415},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands#environment-variables",[13,417,418],{},"KUBB_STUDIO_CONTROL_PORT"," to a free port.",[421,422,424,425,428,429,432],"blockquote",{"as":423},"warning","Flags only add permissions. To turn one off, run ",[13,426,427],{},"kubb studio permissions",", then restart without that ",[13,430,431],{},"--allow-*"," flag. A running connection keeps the old permissions until it restarts.",[434,435,437],"h3",{"id":436},"credentials","Credentials",[10,439,440,441,141,446,449,450,89],{},"Credentials, worker state, and the worker log live in ",[18,442,443],{"href":415},[13,444,445],{},"KUBB_HOME",[13,447,448],{},"~\u002F.kubb"," by default. See ",[18,451,453],{"href":452},"#studio-credentials","Studio credentials",[55,455,457],{"id":456},"options","Options",[10,459,460,141,462,145,464,466,467,469,470,473,474,476],{},[13,461,140],{},[13,463,144],{},[13,465,148],{}," take the connection and permission flags. ",[13,468,335],{}," takes ",[13,471,472],{},"--url"," only, and ",[13,475,354],{}," has its own set.",[434,478,480],{"id":479},"connection","Connection",[192,482,483,498],{},[195,484,485],{},[198,486,487,490,493,496],{},[201,488,489],{},"Flag",[201,491,492],{},"Alias",[201,494,495],{},"Default",[201,497,279],{},[211,499,500,520,551,569],{},[198,501,502,507,512,514],{},[216,503,504],{},[13,505,506],{},"--config \u003Cpath>",[216,508,509],{},[13,510,511],{},"-c",[216,513],{},[216,515,516,517],{},"Config file path, such as ",[13,518,519],{},".\u002Fkubb.staging.ts",[198,521,522,527,529,534],{},[216,523,524],{},[13,525,526],{},"--url \u003Curl>",[216,528],{},[216,530,531,532],{},"The Studio the project paired with, else ",[13,533,20],{},[216,535,536,537,540,541,141,544,547,548,89],{},"Studio URL. Plain ",[13,538,539],{},"http:\u002F\u002F"," works only for ",[13,542,543],{},"localhost",[13,545,546],{},"127.0.0.1",", or ",[13,549,550],{},"[::1]",[198,552,553,557,559,561],{},[216,554,555],{},[13,556,165],{},[216,558],{},[216,560],{},[216,562,563,564,568],{},"Skips opening the approval page. A ",[18,565,567],{"href":566},"#pair-with-a-code","pairing code"," never opens one.",[198,570,571,576,581,586],{},[216,572,573],{},[13,574,575],{},"--log-level \u003Clevel>",[216,577,578],{},[13,579,580],{},"-l",[216,582,583],{},[13,584,585],{},"info",[216,587,588,141,591,547,593],{},[13,589,590],{},"silent",[13,592,585],{},[13,594,595],{},"verbose",[434,597,598],{"id":26},"Permissions",[10,600,601,602,604,605,608],{},"Each ",[13,603,431],{}," flag grants one permission, and each is off by default. ",[18,606,598],{"href":607},"\u002Fdocs\u002F5.x\u002Freference\u002Fpermissions"," lists the flags and what each one lets Studio do.",[434,610,611],{"id":354},"Snapshot",[10,613,614,469,616,141,619,141,621,624,625,627,628,89],{},[13,615,354],{},[13,617,618],{},"--config",[13,620,472],{},[13,622,623],{},"--log-level",", and these flags, but no ",[13,626,431],{}," flag. It reads the organization CI API key from ",[13,629,630],{},"KUBB_TOKEN",[192,632,633,643],{},[195,634,635],{},[198,636,637,639,641],{},[201,638,489],{},[201,640,495],{},[201,642,279],{},[211,644,645,662,675,691,710,726],{},[198,646,647,652,656],{},[216,648,649],{},[13,650,651],{},"--token \u003Ckey>",[216,653,654],{},[13,655,630],{},[216,657,658,659,661],{},"Deprecated. Organization CI API key. A flag shows the key in the process list and the shell history, so set ",[13,660,630],{}," instead",[198,663,664,669,672],{},[216,665,666],{},[13,667,668],{},"--id \u003Cid>",[216,670,671],{},"Detected",[216,673,674],{},"Stable CI agent identity",[198,676,677,682,684],{},[216,678,679],{},[13,680,681],{},"--base-id \u003Cid>",[216,683,671],{},[216,685,686,687,690],{},"Another CI agent's ",[13,688,689],{},"--id"," to also compare with, such as the base branch's",[198,692,693,698,704],{},[216,694,695],{},[13,696,697],{},"--name \u003Cname>",[216,699,700,701],{},"From ",[13,702,703],{},"package.json",[216,705,706,707,709],{},"Tarball package name, from the nearest ",[13,708,703],{}," with a name and version",[198,711,712,717,721],{},[216,713,714],{},[13,715,716],{},"--package-version \u003Cversion>",[216,718,700,719],{},[13,720,703],{},[216,722,723,724],{},"Tarball package version, from the same ",[13,725,703],{},[198,727,728,733,738],{},[216,729,730],{},[13,731,732],{},"--json",[216,734,735],{},[13,736,737],{},"false",[216,739,740],{},"Prints the result as one JSON object",[10,742,743,745,746,749,750,753,754,756,757,759],{},[13,744,354],{}," generates like ",[13,747,748],{},"kubb generate",", then runs the formatter, the linter, and ",[13,751,752],{},"output.postGenerate",". It refuses a tarball over 50 MB. In CI, the CLI refuses a browser pairing and needs stored credentials or a ",[18,755,567],{"href":566},", so use ",[13,758,354],{}," there.",[421,761,763,764,766,767,770,771,774,775,778,779,782,783,787],{"as":762},"important","",[13,765,354],{}," builds the package's ",[13,768,769],{},"dist"," files with tsdown: the project's own, or the one on ",[13,772,773],{},"PATH",". Install it with ",[13,776,777],{},"npm i -D tsdown",", or globally in CI with ",[13,780,781],{},"npm i -g tsdown",". ",[18,784,786],{"href":785},"\u002Fdocs\u002F5.x\u002Freference\u002Fgithub-actions#kubb-version","kubb-labs\u002Faction"," installs it for you.",[55,789,791],{"id":790},"snapshot-output","Snapshot output",[10,793,794,796,797,801],{},[13,795,732],{}," prints one object with the snapshot's id, version, URLs, and comparisons. See ",[18,798,800],{"href":799},"#studio-ci-snapshots","CI snapshots"," for its fields.",[55,803,805],{"id":804},"ci-agent-identity","CI agent identity",[10,807,808,810,811,813,814,89],{},[13,809,354],{}," detects GitHub Actions, GitLab CI, Bitbucket Pipelines, and CircleCI. Other providers need a stable ",[13,812,689],{},". See ",[18,815,800],{"href":799},[55,817,819],{"id":818},"plugins-in-studio","Plugins in Studio",[10,821,822,823,827,828,831,832,838],{},"Studio builds its plugin list and option forms from ",[18,824,826],{"href":825},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit\u002Fmanifest","extension manifests",". A third-party plugin works once it is installed and ships a manifest with ",[13,829,830],{},"kind: \"plugin\"",", without a registry entry. Install it with your package manager or ",[18,833,835],{"href":834},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fadd",[13,836,837],{},"kubb add",", then reconnect.",[421,840,842,843,846,847,849],{"as":841},"note","The agent imports only ",[13,844,845],{},"@kubb\u002Fplugin-*"," packages and installed packages whose manifest has ",[13,848,830],{},". It refuses any other package name before importing anything.",[10,851,852,853,857],{},"See ",[18,854,856],{"href":855},"#studio-agent","Studio agent"," for where the agent finds extensions.",[55,859,861],{"id":860},"exit-codes","Exit codes",[192,863,864,874],{},[195,865,866],{},[198,867,868,871],{},[201,869,870],{},"Code",[201,872,873],{},"When",[211,875,876,886],{},[198,877,878,883],{},[216,879,880],{},[13,881,882],{},"0",[216,884,885],{},"The action succeeds.",[198,887,888,892],{},[216,889,890],{},[13,891,190],{},[216,893,894],{},"The action fails.",[55,896,898],{"id":897},"less-common-cases","Less common cases",[434,900,800],{"id":901},"studio-ci-snapshots",[10,903,904,905,908],{},"In CI, ",[13,906,907],{},"kubb studio snapshot"," identifies the CI agent and compares the new snapshot with earlier ones.",[10,910,911,912,915,916,918,919,922,923,926,927,929,930,926,933,936,937,939],{},"It uploads to the Studio's public API: ",[13,913,914],{},"POST \u002Fv1\u002Fsnapshots"," on the ",[13,917,472],{}," host with ",[13,920,921],{},"api."," in front, such as ",[13,924,925],{},"https:\u002F\u002Fapi.kubb.studio"," for ",[13,928,20],{}," and ",[13,931,932],{},"https:\u002F\u002Fapi.dev.kubb.studio",[13,934,935],{},"https:\u002F\u002Fdev.kubb.studio",". A Studio on ",[13,938,543],{}," takes it on its own origin.",[941,942,944],"h4",{"id":943},"json-output","JSON output",[10,946,947,949,950,141,953,141,956,141,959,141,962,141,965,141,968,145,971,89],{},[13,948,732],{}," prints one object with ",[13,951,952],{},"id",[13,954,955],{},"name",[13,957,958],{},"version",[13,960,961],{},"integrity",[13,963,964],{},"url",[13,966,967],{},"snapshotIdUrl",[13,969,970],{},"expiresAt",[13,972,973],{},"agentUrl",[67,975,976,990,999],{},[70,977,978,979,929,982,985,986,989],{},"It adds ",[13,980,981],{},"number",[13,983,984],{},"webUrl"," when Studio sends them, and the summary shows the number and a ",[13,987,988],{},"View"," link.",[70,991,978,992,929,995,998],{},[13,993,994],{},"changes",[13,996,997],{},"branchChanges"," when a comparison exists.",[70,1000,1001,1002,1005],{},"Installing a snapshot needs a separate ",[13,1003,1004],{},"registry"," API key.",[192,1007,1008,1018],{},[195,1009,1010],{},[198,1011,1012,1015],{},[201,1013,1014],{},"Field",[201,1016,1017],{},"Compared with",[211,1019,1020,1029],{},[198,1021,1022,1026],{},[216,1023,1024],{},[13,1025,994],{},[216,1027,1028],{},"The previous snapshot on the same pull request or branch.",[198,1030,1031,1035],{},[216,1032,1033],{},[13,1034,997],{},[216,1036,1037,1038,1041,1042,1045,1046,1049,1050,1052,1053,1056],{},"The latest snapshot of the ",[13,1039,1040],{},"--base-id"," agent, or of the base branch of a GitHub pull request or GitLab merge request. ",[13,1043,1044],{},"branch"," names that agent. ",[13,1047,1048],{},"baseFound"," is ",[13,1051,737],{}," when that agent does not exist yet, and ",[13,1054,1055],{},"true"," when it has no snapshot of this package.",[941,1058,1060],{"id":1059},"ci-agent-identity-details","CI agent identity details",[192,1062,1063,1075],{},[195,1064,1065],{},[198,1066,1067,1070,1072],{},[201,1068,1069],{},"Option",[201,1071,495],{},[201,1073,1074],{},"Description",[211,1076,1077,1088],{},[198,1078,1079,1083,1085],{},[216,1080,1081],{},[13,1082,668],{},[216,1084,671],{},[216,1086,1087],{},"Stable CI agent identity. Detected on GitHub Actions, GitLab CI, Bitbucket Pipelines, and CircleCI.",[198,1089,1090,1094,1096],{},[216,1091,1092],{},[13,1093,681],{},[216,1095,671],{},[216,1097,1098,1099,1101],{},"The ",[13,1100,689],{}," of another CI agent to also compare with, such as the base branch's. Detected on GitHub pull requests and GitLab merge requests.",[67,1103,1104,1113],{},[70,1105,1106,1107,1109,1110,1112],{},"Other providers need a stable ",[13,1108,689],{},". Use one on the base branch and pass it as ",[13,1111,1040],{}," on pull request runs.",[70,1114,1115,1117,1118,1120,1121,89],{},[13,1116,689],{}," turns off base detection, so also pass ",[13,1119,1040],{}," to get ",[13,1122,997],{},[941,1124,1126],{"id":1125},"gitlab-ci","GitLab CI",[192,1128,1129,1141],{},[195,1130,1131],{},[198,1132,1133,1136,1139],{},[201,1134,1135],{},"Pipeline",[201,1137,1138],{},"CI agent",[201,1140,1017],{},[211,1142,1143,1159],{},[198,1144,1145,1148,1151],{},[216,1146,1147],{},"Merge request",[216,1149,1150],{},"One agent per merge request",[216,1152,1153,1155,1156,1158],{},[13,1154,997],{},": the target branch's latest snapshot. ",[13,1157,994],{},": the merge request's previous pipeline.",[198,1160,1161,1164,1167],{},[216,1162,1163],{},"Branch",[216,1165,1166],{},"One agent per branch, the default branch included",[216,1168,1169,1171],{},[13,1170,994],{},": the branch's previous pipeline.",[10,1173,1174,1175,1177],{},"A merge request snapshot records the head commit of the source branch. Pass ",[13,1176,689],{}," to group runs your own way.",[434,1179,856],{"id":1180},"studio-agent",[10,1182,1183,1184,89],{},"When Studio lists a plugin as not installed, check where the agent looks. Studio builds its plugin list and option forms from ",[18,1185,826],{"href":825},[10,1187,1188,1189,1192],{},"On connect, the agent reports each extension with a valid ",[13,1190,1191],{},"kubb-extension.json"," from:",[67,1194,1195,1206,1213],{},[70,1196,1098,1197,929,1200,1203,1204,89],{},[13,1198,1199],{},"dependencies",[13,1201,1202],{},"devDependencies"," in ",[13,1205,703],{},[70,1207,1208,1209,1212],{},"The packages ",[13,1210,1211],{},"kubb.config.ts"," imports.",[70,1214,1215,1216,1219,1220,141,1223,141,1226,145,1229,89],{},"The extensions bundled with ",[13,1217,1218],{},"kubb",": ",[13,1221,1222],{},"@kubb\u002Fadapter-oas",[13,1224,1225],{},"@kubb\u002Fparser-ts",[13,1227,1228],{},"@kubb\u002Fparser-md",[13,1230,1231],{},"@kubb\u002Fplugin-barrel",[941,1233,1235],{"id":1234},"settings-forms","Settings forms",[67,1237,1238,1244,1249,1256],{},[70,1239,1240,1241,1243],{},"The config's adapter and parsers get a settings form from the ",[13,1242,456],{}," in their manifest.",[70,1245,1246,1247,89],{},"The agent sends a JSON copy of their options on connect. On generate, Studio's edits merge over the options in ",[13,1248,1211],{},[70,1250,1251,1252,1255],{},"A ",[13,1253,1254],{},"null"," value unsets an option for that run, so its default applies.",[70,1257,1258,1259,1262],{},"An extension without a manifest, such as ",[13,1260,1261],{},"parserTsx",", is listed without fields.",[941,1264,1266],{"id":1265},"plugins-the-agent-runs","Plugins the agent runs",[192,1268,1269,1279],{},[195,1270,1271],{},[198,1272,1273,1276],{},[201,1274,1275],{},"Agent",[201,1277,1278],{},"Plugins it can run",[211,1280,1281,1295],{},[198,1282,1283,1288],{},[216,1284,1285,1287],{},[13,1286,15],{}," on your machine",[216,1289,1290,1292,1293],{},[13,1291,845],{}," packages, and installed packages whose manifest has ",[13,1294,830],{},[198,1296,1297,1300],{},[216,1298,1299],{},"Docker agent and hosted sandbox",[216,1301,1302],{},"Only the packages in their image, with no runtime installs",[10,1304,1305,1306,1309],{},"The agent calls the factory the manifest names in ",[13,1307,1308],{},"export",". It refuses any other package name before importing anything, and config edits follow the same rule.",[10,1311,1312,1313,1317,1318,1321],{},"Studio also lists ",[18,1314,1316],{"href":1315},"\u002Fextensions","extension registry"," plugins. A plugin the agent cannot run shows as not installed, with a ",[13,1319,1320],{},"kubb add \u003Cid>"," hint.",[434,1323,453],{"id":1324},"studio-credentials",[10,1326,1327,1328,141,1332,1334,1335,1337,1338,89],{},"When you pair a machine, the CLI stores the credentials, worker state, and worker log in ",[18,1329,1330],{"href":415},[13,1331,445],{},[13,1333,448],{}," by default. ",[13,1336,335],{}," prints the log path. A worker log that reaches 1 MiB moves to ",[13,1339,1340],{},"worker.log.1",[67,1342,1343,1349,1365,1371,1374,1380],{},[70,1344,1345,1346,1348],{},"The CLI keeps one pairing per project. The project is the folder of the Kubb config it finds from the current folder, walking up like ",[13,1347,748],{},", or the current folder when there is no config.",[70,1350,1351,1352,141,1355,141,1358,547,1361,1364],{},"Approve the pairing code before it expires. The CLI copies it with ",[13,1353,1354],{},"pbcopy",[13,1356,1357],{},"clip.exe",[13,1359,1360],{},"xclip",[13,1362,1363],{},"wl-copy"," when one is available.",[70,1366,1367,1368,1370],{},"A connected CLI renews its token daily, so it does not pair again. A token from a ",[18,1369,567],{"href":566}," lasts an hour and renews before it expires.",[70,1372,1373],{},"Pairing also creates a key that never leaves your machine. It goes in the system keychain (macOS Keychain, Windows Credential Manager, or Secret Service on Linux), or next to the token when no keychain allows access, such as in CI or a container.",[70,1375,1376,1377,1379],{},"A project paired with an earlier release has no key and keeps working. ",[13,1378,400],{}," adds one.",[70,1381,1382,1384],{},[13,1383,306],{}," waits for a running generation to clean up. An interrupted job does not run again.",[434,1386,1388],{"id":1387},"studio-permissions","Studio permissions",[10,1390,852,1391,89],{},[18,1392,598],{"href":607},{"title":763,"searchDepth":1394,"depth":1394,"links":1395},5,[1396,1398,1399,1400,1404,1409,1410,1411,1412,1413],{"id":57,"depth":1397,"text":58},2,{"id":92,"depth":1397,"text":93},{"id":260,"depth":1397,"text":261},{"id":364,"depth":1397,"text":365,"children":1401},[1402],{"id":436,"depth":1403,"text":437},3,{"id":456,"depth":1397,"text":457,"children":1405},[1406,1407,1408],{"id":479,"depth":1403,"text":480},{"id":26,"depth":1403,"text":598},{"id":354,"depth":1403,"text":611},{"id":790,"depth":1397,"text":791},{"id":804,"depth":1397,"text":805},{"id":818,"depth":1397,"text":819},{"id":860,"depth":1397,"text":861},{"id":897,"depth":1397,"text":898,"children":1414},[1415,1421,1425,1426],{"id":901,"depth":1403,"text":800,"children":1416},[1417,1419,1420],{"id":943,"depth":1418,"text":944},4,{"id":1059,"depth":1418,"text":1060},{"id":1125,"depth":1418,"text":1126},{"id":1180,"depth":1403,"text":856,"children":1422},[1423,1424],{"id":1234,"depth":1418,"text":1235},{"id":1265,"depth":1418,"text":1266},{"id":1324,"depth":1403,"text":453},{"id":1387,"depth":1403,"text":1388},"Command reference for kubb studio. Connect a project to Kubb Studio, run it in the background, manage pairing and permissions, and publish CI snapshots.","md",{"layout":1430,"title":5,"description":1427,"outline":1431,"order":1432,"navigation":1433},"doc",[1397,1403],8,{"title":15,"icon":1434},"i-iconoir-cube",{"layout":1430,"outline":1436},[1397,1403],{"title":15,"icon":1434},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fstudio",{"title":5,"description":1427},{"loc":1438},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fstudio.md","docs\u002F5.x\u002Freference\u002Fcommands\u002Fstudio","HORWSNOLjhSAJxeeRPiRp1R6W6jIcHFDPiwY1m5bCC0",1795989036890,"2e8b4c62-5b8c-4587-97c0-530d08a9bd53"]