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