[{"data":1,"prerenderedAt":344,"buildId":345},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Freference\u002Fpermissions":3},{"id":4,"title":5,"body":6,"description":325,"extension":326,"frontmatter":327,"heading":333,"meta":335,"navigation":337,"order":331,"path":338,"seo":339,"sitemap":340,"source":341,"stem":342,"__hash__":343},"docs\u002Fdocs\u002F5.x\u002Freference\u002Fpermissions.md","Permissions - What Kubb Studio may do on your machine",{"type":7,"value":8,"toc":316},"minimark",[9,27,39,44,47,183,205,209,280,284,309,313],[10,11,12,13,18,19,26],"p",{},"A permission lets ",[14,15,17],"a",{"href":16},"https:\u002F\u002Fkubb.studio","Kubb Studio"," do one thing on the machine that runs ",[14,20,22],{"href":21},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fstudio",[23,24,25],"code",{},"kubb studio",". You grant each one with a flag, per machine. The agent reports its permissions when it connects and enforces them itself, so Studio cannot turn one on.",[10,28,29,30,33,34,38],{},"Which files and hosts a spec may read is a separate topic, set in ",[23,31,32],{},"kubb.config.ts",". See ",[14,35,37],{"href":36},"\u002Fdocs\u002F5.x\u002Freference\u002Fsecurity","Security",".",[40,41,43],"h2",{"id":42},"flags","Flags",[10,45,46],{},"Each permission is off by default. The CLI asks once per project for each one you do not pass. Outside an interactive terminal, it skips the questions, so pass the flags the run needs.",[48,49,50,63],"table",{},[51,52,53],"thead",{},[54,55,56,60],"tr",{},[57,58,59],"th",{},"Flag",[57,61,62],{},"Lets Studio",[64,65,66,77,87,97,109,125,139,154,170],"tbody",{},[54,67,68,74],{},[69,70,71],"td",{},[23,72,73],{},"--allow-read",[69,75,76],{},"Read generated file contents",[54,78,79,84],{},[69,80,81],{},[23,82,83],{},"--allow-read-ast",[69,85,86],{},"Read the parsed spec (the Kubb AST)",[54,88,89,94],{},[69,90,91],{},[23,92,93],{},"--allow-write",[69,95,96],{},"Write generated files to disk",[54,98,99,104],{},[69,100,101],{},[23,102,103],{},"--allow-config-edit",[69,105,106,107],{},"Change plugin options in ",[23,108,32],{},[54,110,111,116],{},[69,112,113],{},[23,114,115],{},"--allow-install",[69,117,118,119,122,123,38],{},"Install extensions with ",[23,120,121],{},"kubb add",". Needs ",[23,124,103],{},[54,126,127,132],{},[69,128,129],{},[23,130,131],{},"--allow-update",[69,133,134,135,138],{},"Update extensions with ",[23,136,137],{},"kubb update",", leaving the config as is",[54,140,141,146],{},[69,142,143],{},[23,144,145],{},"--allow-remove",[69,147,148,149,122,152,38],{},"Remove extensions with ",[23,150,151],{},"kubb remove",[23,153,103],{},[54,155,156,161],{},[69,157,158],{},[23,159,160],{},"--allow-save-input",[69,162,163,164,167,168,38],{},"Save the spec it sends and point ",[23,165,166],{},"input"," at it. Needs ",[23,169,103],{},[54,171,172,177],{},[69,173,174],{},[23,175,176],{},"--allow-exec",[69,178,179,180],{},"Run the formatter, the linter, and ",[23,181,182],{},"output.postGenerate",[184,185,189],"pre",{"language":186,"code":187,"class":188},"shell","npx kubb studio connect --allow-read --allow-write","highlights",[23,190,192],{"class":191},"language-shell",[193,194,197,201],"span",{"class":195,"style":196},"line","display: inline",[193,198,200],{"style":199},"color:#6f42c1;--hls-dark:#b392f0","npx ",[193,202,204],{"style":203},"color:#24292e;--hls-dark:#e1e4e8","kubb studio connect --allow-read --allow-write",[40,206,208],{"id":207},"details","What each one changes",[210,211,212,219,233,244,270],"ul",{},[213,214,215,216,218],"li",{},"Without ",[23,217,73],{},", a session still generates and reports file paths, but Studio cannot show their contents.",[213,220,221,222,224,225,228,229,38],{},"With ",[23,223,73],{},", Studio loads the files already in ",[23,226,227],{},"output.path"," on connect, so you can browse them before you select ",[230,231,232],"strong",{},"Generate",[213,234,235,237,238,243],{},[23,236,103],{}," covers plugin options. Studio cannot change the ",[14,239,240],{"href":36},[23,241,242],{},"security"," option with any permission.",[213,245,246,248,249,251,252,255,256,259,260,263,264,266,267,38],{},[23,247,160],{}," saves the spec Studio sends and points ",[23,250,166],{}," at it. A pasted document goes to ",[23,253,254],{},"openapi.yaml",", or ",[23,257,258],{},"openapi.json"," for JSON (",[23,261,262],{},"openapi-\u003Centry>"," for a later config entry). A URL or git file goes into ",[23,265,166],{}," as is, unless its host is not public, such as ",[23,268,269],{},"localhost",[213,271,272,273,279],{},"The agent keeps recent generations up to the ",[14,274,276],{"href":275},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands#environment-variables",[23,277,278],{},"KUBB_AGENT_MAX_GENERATIONS"," caps, with a separate budget for the initial output. Unchanged output keeps its ID across reconnects.",[40,281,283],{"id":282},"turn-off","Turn a permission off",[285,286,288,289,292,293,296,297,300,301,304,305,308],"blockquote",{"as":287},"warning","Flags only add permissions, and ",[23,290,291],{},"login"," resets the saved ones. To turn one off, run ",[23,294,295],{},"kubb studio permissions",", then restart a running connection, since it keeps the old permissions. Restart with the same ",[23,298,299],{},"--url"," and ",[23,302,303],{},"--config",", but without that permission's ",[23,306,307],{},"--allow-*"," flag, which would grant it again.",[40,310,312],{"id":311},"sandbox","Sandbox and managed agents",[10,314,315],{},"A shared (sandbox) agent has no project, so it never writes files, edits the config, or installs, updates, or removes extensions, whatever its flags say. A hosted (managed) agent keeps the permissions it was started with.",{"title":317,"searchDepth":318,"depth":318,"links":319},"",5,[320,322,323,324],{"id":42,"depth":321,"text":43},2,{"id":207,"depth":321,"text":208},{"id":282,"depth":321,"text":283},{"id":311,"depth":321,"text":312},"Reference for the permissions a Kubb Studio agent grants. Each --allow flag of kubb studio, what it lets Studio do, how to turn one off, and what a sandbox removes.","md",{"layout":328,"title":5,"description":325,"outline":329,"order":331,"navigation":332},"doc",[321,330],3,10,{"title":333,"icon":334},"Permissions","i-iconoir-key",{"layout":328,"outline":336},[321,330],{"title":333,"icon":334},"\u002Fdocs\u002F5.x\u002Freference\u002Fpermissions",{"title":5,"description":325},{"loc":338},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Freference\u002Fpermissions.md","docs\u002F5.x\u002Freference\u002Fpermissions","KEwRXCTAu9d9iNsid38bDG7vG262GHfDMVWDp-GV6BA",1795989034285,"2e8b4c62-5b8c-4587-97c0-530d08a9bd53"]