[{"data":1,"prerenderedAt":761},["ShallowReactive",2],{"navigation_en":3,"-docs-configuration-commands-and-hooks":153,"-docs-configuration-commands-and-hooks-surround":756},{"gettingStarted":4,"guides":41,"cli":87,"configuration":123},[5],{"title":6,"icon":7,"path":8,"stem":9,"children":10,"page":7},"Getting Started",false,"\u002Fdocs\u002Fgetting-started","docs\u002Fgetting-started",[11,16,21,26,31,36],{"title":12,"path":13,"stem":14,"icon":15},"Introduction","\u002Fdocs\u002Fgetting-started\u002Fintroduction","docs\u002Fgetting-started\u002F01.introduction","i-lucide-house",{"title":17,"path":18,"stem":19,"icon":20},"Installation","\u002Fdocs\u002Fgetting-started\u002Finstallation","docs\u002Fgetting-started\u002F02.installation","i-lucide-download",{"title":22,"path":23,"stem":24,"icon":25},"Quick Start","\u002Fdocs\u002Fgetting-started\u002Fquick-start","docs\u002Fgetting-started\u002F03.quick-start","i-lucide-zap",{"title":27,"path":28,"stem":29,"icon":30},"How It Works","\u002Fdocs\u002Fgetting-started\u002Fhow-it-works","docs\u002Fgetting-started\u002F04.how-it-works","i-lucide-workflow",{"title":32,"path":33,"stem":34,"icon":35},"Refs","\u002Fdocs\u002Fgetting-started\u002Frefs","docs\u002Fgetting-started\u002F05.refs","i-lucide-git-branch",{"title":37,"path":38,"stem":39,"icon":40},"Workspaces & Worktrees","\u002Fdocs\u002Fgetting-started\u002Fworkspaces","docs\u002Fgetting-started\u002F06.workspaces","i-lucide-folder-tree",[42],{"title":43,"icon":7,"path":44,"stem":45,"children":46,"page":7},"Guides","\u002Fdocs\u002Fguides","docs\u002Fguides",[47,52,57,62,67,72,77,82],{"title":48,"path":49,"stem":50,"icon":51},"Review a Pull Request","\u002Fdocs\u002Fguides\u002Freview-a-pull-request","docs\u002Fguides\u002F01.review-a-pull-request","i-lucide-git-pull-request",{"title":53,"path":54,"stem":55,"icon":56},"Run Dev Servers in Parallel","\u002Fdocs\u002Fguides\u002Frun-dev-servers-in-parallel","docs\u002Fguides\u002F02.run-dev-servers-in-parallel","i-lucide-plug",{"title":58,"path":59,"stem":60,"icon":61},"Seed Local Files","\u002Fdocs\u002Fguides\u002Fseed-local-files","docs\u002Fguides\u002F03.seed-local-files","i-lucide-sprout",{"title":63,"path":64,"stem":65,"icon":66},"Refresh a Workspace","\u002Fdocs\u002Fguides\u002Frefresh-a-workspace","docs\u002Fguides\u002F04.refresh-a-workspace","i-lucide-refresh-cw",{"title":68,"path":69,"stem":70,"icon":71},"Clean Up Workspaces","\u002Fdocs\u002Fguides\u002Fclean-up-workspaces","docs\u002Fguides\u002F05.clean-up-workspaces","i-lucide-trash-2",{"title":73,"path":74,"stem":75,"icon":76},"Script with uxd","\u002Fdocs\u002Fguides\u002Fscript-with-uxd","docs\u002Fguides\u002F06.script-with-uxd","i-lucide-braces",{"title":78,"path":79,"stem":80,"icon":81},"Install Shell Completions","\u002Fdocs\u002Fguides\u002Fshell-completions","docs\u002Fguides\u002F07.shell-completions","i-lucide-keyboard",{"title":83,"path":84,"stem":85,"icon":86},"Troubleshooting","\u002Fdocs\u002Fguides\u002Ftroubleshooting","docs\u002Fguides\u002F08.troubleshooting","i-lucide-stethoscope",[88],{"title":89,"icon":7,"path":90,"stem":91,"children":92,"page":7},"CLI Reference","\u002Fdocs\u002Fcli","docs\u002Fcli",[93,98,103,108,113,118],{"title":94,"path":95,"stem":96,"icon":97},"Command Grammar","\u002Fdocs\u002Fcli\u002Foverview","docs\u002Fcli\u002F01.overview","i-lucide-terminal",{"title":99,"path":100,"stem":101,"icon":102},"Workspace Verbs","\u002Fdocs\u002Fcli\u002Fworkspace-verbs","docs\u002Fcli\u002F02.workspace-verbs","i-lucide-folder-git-2",{"title":104,"path":105,"stem":106,"icon":107},"Project Verbs","\u002Fdocs\u002Fcli\u002Fproject-verbs","docs\u002Fcli\u002F03.project-verbs","i-lucide-boxes",{"title":109,"path":110,"stem":111,"icon":112},"Top-Level Verbs","\u002Fdocs\u002Fcli\u002Ftop-level-verbs","docs\u002Fcli\u002F04.top-level-verbs","i-lucide-wrench",{"title":114,"path":115,"stem":116,"icon":117},"Global Flags","\u002Fdocs\u002Fcli\u002Fglobal-flags","docs\u002Fcli\u002F05.global-flags","i-lucide-flag",{"title":119,"path":120,"stem":121,"icon":122},"Exit Codes","\u002Fdocs\u002Fcli\u002Fexit-codes","docs\u002Fcli\u002F06.exit-codes","i-lucide-circle-alert",[124],{"title":125,"icon":7,"path":126,"stem":127,"children":128,"page":7},"Configuration","\u002Fdocs\u002Fconfiguration","docs\u002Fconfiguration",[129,134,139,144,148],{"title":130,"path":131,"stem":132,"icon":133},"Overview","\u002Fdocs\u002Fconfiguration\u002Foverview","docs\u002Fconfiguration\u002F01.overview","i-lucide-settings",{"title":135,"path":136,"stem":137,"icon":138},"Project File","\u002Fdocs\u002Fconfiguration\u002Fproject-file","docs\u002Fconfiguration\u002F02.project-file","i-lucide-file-code",{"title":140,"path":141,"stem":142,"icon":143},"Commands & Hooks","\u002Fdocs\u002Fconfiguration\u002Fcommands-and-hooks","docs\u002Fconfiguration\u002F03.commands-and-hooks","i-lucide-play",{"title":145,"path":146,"stem":147,"icon":76},"Environment & Templates","\u002Fdocs\u002Fconfiguration\u002Fenvironment-and-templates","docs\u002Fconfiguration\u002F04.environment-and-templates",{"title":149,"path":150,"stem":151,"icon":152},"Editors","\u002Fdocs\u002Fconfiguration\u002Feditors","docs\u002Fconfiguration\u002F05.editors","i-lucide-app-window",{"id":154,"title":140,"body":155,"description":747,"extension":748,"links":749,"meta":750,"navigation":751,"path":141,"seo":752,"stem":142,"__hash__":755},"docs_configuration\u002Fdocs\u002Fconfiguration\u002F03.commands-and-hooks.md",{"type":156,"value":157,"toc":740},"minimark",[158,163,176,288,332,398,415,435,441,454,465,469,480,525,621,638,650,658,669,673,679,712,715,736],[159,160,162],"h2",{"id":161},"named-commands","Named commands",[164,165,166,167,171,172,175],"p",{},"Anything under ",[168,169,170],"code",{},"[commands]"," becomes a ",[168,173,174],{},"run"," target.",[177,178,184],"pre",{"className":179,"code":180,"filename":181,"language":182,"meta":183,"style":183},"language-toml shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","[commands.dev]\nrun = \"pnpm dev\"\ncwd = \"packages\u002Fapp\"\n\n[commands.dev.env]\nNODE_OPTIONS = \"--max-old-space-size=8192\"\n\n[commands.test]\nrun = \"pnpm test\"\n","~\u002F.uxd\u002Fmy-project.toml","toml","",[168,185,186,208,218,227,234,252,261,266,280],{"__ignoreMap":183},[187,188,191,195,199,202,205],"span",{"class":189,"line":190},"line",1,[187,192,194],{"class":193},"s7iLA","[",[187,196,198],{"class":197},"szw1H","commands",[187,200,201],{"class":193},".",[187,203,204],{"class":197},"dev",[187,206,207],{"class":193},"]\n",[187,209,211,214],{"class":189,"line":210},2,[187,212,213],{"class":193},"run = ",[187,215,217],{"class":216},"semJd","\"pnpm dev\"\n",[187,219,221,224],{"class":189,"line":220},3,[187,222,223],{"class":193},"cwd = ",[187,225,226],{"class":216},"\"packages\u002Fapp\"\n",[187,228,230],{"class":189,"line":229},4,[187,231,233],{"emptyLinePlaceholder":232},true,"\n",[187,235,237,239,241,243,245,247,250],{"class":189,"line":236},5,[187,238,194],{"class":193},[187,240,198],{"class":197},[187,242,201],{"class":193},[187,244,204],{"class":197},[187,246,201],{"class":193},[187,248,249],{"class":197},"env",[187,251,207],{"class":193},[187,253,255,258],{"class":189,"line":254},6,[187,256,257],{"class":193},"NODE_OPTIONS = ",[187,259,260],{"class":216},"\"--max-old-space-size=8192\"\n",[187,262,264],{"class":189,"line":263},7,[187,265,233],{"emptyLinePlaceholder":232},[187,267,269,271,273,275,278],{"class":189,"line":268},8,[187,270,194],{"class":193},[187,272,198],{"class":197},[187,274,201],{"class":193},[187,276,277],{"class":197},"test",[187,279,207],{"class":193},[187,281,283,285],{"class":189,"line":282},9,[187,284,213],{"class":193},[187,286,287],{"class":216},"\"pnpm test\"\n",[177,289,293],{"className":290,"code":291,"language":292,"meta":183,"style":183},"language-bash shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","uxd my-project 42 run dev\nuxd my-project 42 run test -- --watch\n","bash",[168,294,295,313],{"__ignoreMap":183},[187,296,297,300,303,307,310],{"class":189,"line":190},[187,298,299],{"class":197},"uxd",[187,301,302],{"class":216}," my-project",[187,304,306],{"class":305},"ssYy9"," 42",[187,308,309],{"class":216}," run",[187,311,312],{"class":216}," dev\n",[187,314,315,317,319,321,323,326,329],{"class":189,"line":210},[187,316,299],{"class":197},[187,318,302],{"class":216},[187,320,306],{"class":305},[187,322,309],{"class":216},[187,324,325],{"class":216}," test",[187,327,328],{"class":305}," --",[187,330,331],{"class":305}," --watch\n",[333,334,335,351],"table",{},[336,337,338],"thead",{},[339,340,341,345,348],"tr",{},[342,343,344],"th",{},"Key",[342,346,347],{},"Type",[342,349,350],{},"Meaning",[352,353,354,371,383],"tbody",{},[339,355,356,361,364],{},[357,358,359],"td",{},[168,360,174],{},[357,362,363],{},"string",[357,365,366,370],{},[367,368,369],"strong",{},"required"," — the command, templated, executed through a shell",[339,372,373,378,380],{},[357,374,375],{},[168,376,377],{},"cwd",[357,379,363],{},[357,381,382],{},"Optional, relative to the worktree root",[339,384,385,389,391],{},[357,386,387],{},[168,388,249],{},[357,390,333],{},[357,392,393,394,397],{},"Optional, merged over the project's ",[168,395,396],{},"[env]"," for this command only",[164,399,400,401,404,405,407,408,411,412,201],{},"Arguments after ",[168,402,403],{},"--"," are appended to ",[168,406,174],{},", so ",[168,409,410],{},"run test -- --watch"," executes\n",[168,413,414],{},"pnpm test --watch",[416,417,419,420,423,424,423,427,430,431,434],"note",{"title":418},"Built-in verbs win","If you name a command after a built-in verb — ",[168,421,422],{},"list",", ",[168,425,426],{},"sync",[168,428,429],{},"info"," — the\nbuilt-in takes precedence and your command becomes unreachable. ",[168,432,433],{},"uxd doctor","\nwarns about the shadowing.",[436,437,439],"h3",{"id":438},"default_command",[168,440,438],{},[177,442,444],{"className":179,"code":443,"language":182,"meta":183,"style":183},"default_command = \"dev\"\n",[168,445,446],{"__ignoreMap":183},[187,447,448,451],{"class":189,"line":190},[187,449,450],{"class":193},"default_command = ",[187,452,453],{"class":216},"\"dev\"\n",[164,455,456,457,460,461,464],{},"makes ",[168,458,459],{},"uxd my-project 42"," behave like ",[168,462,463],{},"uxd my-project 42 run dev",". It accepts\neither a verb or a configured command name.",[159,466,468],{"id":467},"hooks","Hooks",[164,470,471,472,475,476,479],{},"Four lifecycle hooks, all optional, all templated, each executed as\n",[168,473,474],{},"bash -c \"\u003Cscript>\""," with the worktree as the working directory and the full\n",[168,477,478],{},"UXD_*"," environment.",[177,481,483],{"className":179,"code":482,"filename":181,"language":182,"meta":183,"style":183},"[hooks]\npost_checkout = \"echo 'workspace ready: {path}'\"\npre_run = \"docker compose up -d\"\npost_sync = \"pnpm install --frozen-lockfile\"\npre_clean = \"docker compose down\"\n",[168,484,485,493,501,509,517],{"__ignoreMap":183},[187,486,487,489,491],{"class":189,"line":190},[187,488,194],{"class":193},[187,490,467],{"class":197},[187,492,207],{"class":193},[187,494,495,498],{"class":189,"line":210},[187,496,497],{"class":193},"post_checkout = ",[187,499,500],{"class":216},"\"echo 'workspace ready: {path}'\"\n",[187,502,503,506],{"class":189,"line":220},[187,504,505],{"class":193},"pre_run = ",[187,507,508],{"class":216},"\"docker compose up -d\"\n",[187,510,511,514],{"class":189,"line":229},[187,512,513],{"class":193},"post_sync = ",[187,515,516],{"class":216},"\"pnpm install --frozen-lockfile\"\n",[187,518,519,522],{"class":189,"line":236},[187,520,521],{"class":193},"pre_clean = ",[187,523,524],{"class":216},"\"docker compose down\"\n",[333,526,527,540],{},[336,528,529],{},[339,530,531,534,537],{},[342,532,533],{},"Hook",[342,535,536],{},"Fires",[342,538,539],{},"If it exits non-zero",[352,541,542,562,588,604],{},[339,543,544,549,552],{},[357,545,546],{},[168,547,548],{},"post_checkout",[357,550,551],{},"After a workspace is materialized",[357,553,554,555,558,559],{},"Fails the command — ",[168,556,557],{},"E_SETUP",", exit ",[168,560,561],{},"6",[339,563,564,569,582],{},[357,565,566],{},[168,567,568],{},"pre_run",[357,570,571,572,423,574,577,578,581],{},"Before ",[168,573,174],{},[168,575,576],{},"exec"," or ",[168,579,580],{},"shell"," executes",[357,583,554,584,558,586],{},[168,585,557],{},[168,587,561],{},[339,589,590,595,601],{},[357,591,592],{},[168,593,594],{},"post_sync",[357,596,597,598,600],{},"After ",[168,599,426],{}," resets the worktree",[357,602,603],{},"Warns and continues",[339,605,606,611,614],{},[357,607,608],{},[168,609,610],{},"pre_clean",[357,612,613],{},"Before a workspace is removed",[357,615,616,617,620],{},"Warns and ",[367,618,619],{},"skips"," that removal",[622,623,624,625,627,628,630,631,423,633,635,636,201],"warning",{},"Keep hooks fast and idempotent. ",[168,626,548],{}," runs on every fresh workspace\nand ",[168,629,568],{}," runs on every single ",[168,632,174],{},[168,634,576],{}," and ",[168,637,580],{},[164,639,640,642,643,646,647,649],{},[168,641,610],{}," is the place to release resources a workspace acquired — stop a\ncontainer, drop a scratch database — since after ",[168,644,645],{},"clean"," the directory is gone.\nBecause a failing ",[168,648,610],{}," skips the removal, it also works as a veto:",[177,651,656],{"className":652,"code":654,"language":655},[653],"language-text","warning: pre_clean hook failed for feat-login — skipping\n","text",[168,657,654],{"__ignoreMap":183},[164,659,660,661,664,665,668],{},"Under ",[168,662,663],{},"--dry-run",", hooks are printed as the ",[168,666,667],{},"bash -c"," line that would run, and\nnothing executes.",[159,670,672],{"id":671},"ordering","Ordering",[164,674,675,676,678],{},"For a ",[168,677,463],{}," on a fresh ref:",[680,681,682,686,690,703,707],"ol",{},[683,684,685],"li",{},"Resolve the ref, create the worktree.",[683,687,688],{},[168,689,548],{},[683,691,692,695,696,698,699,702],{},[168,693,694],{},"[setup]"," — seed files, then ",[168,697,174],{}," if the ",[168,700,701],{},"cache_key"," hash changed.",[683,704,705],{},[168,706,568],{},[683,708,709],{},[168,710,711],{},"commands.dev.run",[164,713,714],{},"Preview steps 3–5 without executing them:",[177,716,718],{"className":290,"code":717,"language":292,"meta":183,"style":183},"uxd my-project 42 run dev --dry-run\n",[168,719,720],{"__ignoreMap":183},[187,721,722,724,726,728,730,733],{"class":189,"line":190},[187,723,299],{"class":197},[187,725,302],{"class":216},[187,727,306],{"class":305},[187,729,309],{"class":216},[187,731,732],{"class":216}," dev",[187,734,735],{"class":305}," --dry-run\n",[737,738,739],"style",{},"html pre.shiki code .s7iLA, html code.shiki .s7iLA{--shiki-light:#0E1116;--shiki-default:#0E1116;--shiki-dark:#F0F3F6}html pre.shiki code .szw1H, html code.shiki .szw1H{--shiki-light:#702C00;--shiki-default:#702C00;--shiki-dark:#FFB757}html pre.shiki code .semJd, html code.shiki .semJd{--shiki-light:#032563;--shiki-default:#032563;--shiki-dark:#ADDCFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .ssYy9, html code.shiki .ssYy9{--shiki-light:#023B95;--shiki-default:#023B95;--shiki-dark:#91CBFF}",{"title":183,"searchDepth":210,"depth":210,"links":741},[742,745,746],{"id":161,"depth":210,"text":162,"children":743},[744],{"id":438,"depth":220,"text":438},{"id":467,"depth":210,"text":468},{"id":671,"depth":210,"text":672},"Define named commands for uxd run, give them their own cwd and env, and attach the four lifecycle hooks.","md",null,{},{"icon":143},{"title":753,"description":754},"uxd Commands & Hooks","Configure [commands.*] for uxd run — run, cwd, per-command env — and the post_checkout, pre_run, post_sync and pre_clean hooks.","I1d9Rpj28G9qJ8-JbiluAS8wHJfZy7BBGXacGIerRFM",[757,759],{"title":135,"path":136,"stem":137,"description":758,"icon":138,"children":-1},"Every key a uxd project TOML accepts — repository, behavior, setup — with types, defaults, and what happens when you omit them.",{"title":145,"path":146,"stem":147,"description":760,"icon":76,"children":-1},"The {port} family of template variables, where they can be used, and the UXD_* variables every child process receives.",1784975262678]