[{"data":1,"prerenderedAt":669},["ShallowReactive",2],{"navigation_en":3,"-docs-configuration-environment-and-templates":153,"-docs-configuration-environment-and-templates-surround":664},{"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":145,"body":155,"description":655,"extension":656,"links":657,"meta":658,"navigation":659,"path":146,"seo":660,"stem":147,"__hash__":663},"docs_configuration\u002Fdocs\u002Fconfiguration\u002F04.environment-and-templates.md",{"type":156,"value":157,"toc":649},"minimark",[158,163,180,296,299,326,406,423,427,444,544,558,562,580,607,615,618,622,637,645],[159,160,162],"h2",{"id":161},"template-variables","Template variables",[164,165,166,167,171,172,175,176,179],"p",{},"Interpolated in a single pass with ",[168,169,170],"code",{},"{name}"," syntax. ",[168,173,174],{},"{{"," escapes a literal ",[168,177,178],{},"{",".",[181,182,183,196],"table",{},[184,185,186],"thead",{},[187,188,189,193],"tr",{},[190,191,192],"th",{},"Variable",[190,194,195],{},"Value",[197,198,199,210,220,230,240,250,260,270,280],"tbody",{},[187,200,201,207],{},[202,203,204],"td",{},[168,205,206],{},"{path}",[202,208,209],{},"Absolute worktree path",[187,211,212,217],{},[202,213,214],{},[168,215,216],{},"{repo_path}",[202,218,219],{},"Absolute primary-repo path",[187,221,222,227],{},[202,223,224],{},[168,225,226],{},"{data_dir}",[202,228,229],{},"Per-workspace data directory",[187,231,232,237],{},[202,233,234],{},[168,235,236],{},"{project}",[202,238,239],{},"Project name",[187,241,242,247],{},[202,243,244],{},[168,245,246],{},"{ref}",[202,248,249],{},"The ref string as you typed it",[187,251,252,257],{},[202,253,254],{},[168,255,256],{},"{branch}",[202,258,259],{},"Resolved branch name, or short SHA when detached",[187,261,262,267],{},[202,263,264],{},[168,265,266],{},"{slug}",[202,268,269],{},"Workspace slug",[187,271,272,277],{},[202,273,274],{},[168,275,276],{},"{port}",[202,278,279],{},"First allocated port",[187,281,282,287],{},[202,283,284],{},[168,285,286],{},"{port+N}",[202,288,289,292,293],{},[168,290,291],{},"port + N",", valid for ",[168,294,295],{},"N \u003C ports",[164,297,298],{},"They work in:",[300,301,302,309,318,323],"ul",{},[303,304,305,308],"li",{},[168,306,307],{},"[env]"," values",[303,310,311,314,315],{},[168,312,313],{},"commands.*.run"," and ",[168,316,317],{},"commands.*.cwd",[303,319,320],{},[168,321,322],{},"hooks.*",[303,324,325],{},"editor templates",[327,328,334],"pre",{"className":329,"code":330,"filename":331,"language":332,"meta":333,"style":333},"language-toml shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","ports = 2\n\n[env]\nPORT = \"{port}\"\nAPI_PORT = \"{port+1}\"\nDATABASE_URL = \"file:{data_dir}\u002Fdev.db\"\nVITE_BASE_URL = \"http:\u002F\u002Flocalhost:{port}\"\n","~\u002F.uxd\u002Fmy-project.toml","toml","",[168,335,336,349,356,369,379,388,397],{"__ignoreMap":333},[337,338,341,345],"span",{"class":339,"line":340},"line",1,[337,342,344],{"class":343},"s7iLA","ports = ",[337,346,348],{"class":347},"ssYy9","2\n",[337,350,352],{"class":339,"line":351},2,[337,353,355],{"emptyLinePlaceholder":354},true,"\n",[337,357,359,362,366],{"class":339,"line":358},3,[337,360,361],{"class":343},"[",[337,363,365],{"class":364},"szw1H","env",[337,367,368],{"class":343},"]\n",[337,370,372,375],{"class":339,"line":371},4,[337,373,374],{"class":343},"PORT = ",[337,376,378],{"class":377},"semJd","\"{port}\"\n",[337,380,382,385],{"class":339,"line":381},5,[337,383,384],{"class":343},"API_PORT = ",[337,386,387],{"class":377},"\"{port+1}\"\n",[337,389,391,394],{"class":339,"line":390},6,[337,392,393],{"class":343},"DATABASE_URL = ",[337,395,396],{"class":377},"\"file:{data_dir}\u002Fdev.db\"\n",[337,398,400,403],{"class":339,"line":399},7,[337,401,402],{"class":343},"VITE_BASE_URL = ",[337,404,405],{"class":377},"\"http:\u002F\u002Flocalhost:{port}\"\n",[407,408,409,411,412,414,415,418,419,422],"warning",{},[168,410,286],{}," is only valid while ",[168,413,295],{},". ",[168,416,417],{},"{port+1}"," with the default\n",[168,420,421],{},"ports = 1"," is a configuration error.",[159,424,426],{"id":425},"the-exported-environment","The exported environment",[164,428,429,430,433,434,433,437,433,440,443],{},"Every child process — ",[168,431,432],{},"run",", ",[168,435,436],{},"exec",[168,438,439],{},"shell",[168,441,442],{},"[setup]",", and hooks — receives\nthese, whether or not your config mentions them:",[181,445,446,454],{},[184,447,448],{},[187,449,450,452],{},[190,451,192],{},[190,453,195],{},[197,455,456,465,474,483,492,502,512,521,530],{},[187,457,458,463],{},[202,459,460],{},[168,461,462],{},"UXD_PATH",[202,464,209],{},[187,466,467,472],{},[202,468,469],{},[168,470,471],{},"UXD_REPO_PATH",[202,473,219],{},[187,475,476,481],{},[202,477,478],{},[168,479,480],{},"UXD_DATA_DIR",[202,482,229],{},[187,484,485,490],{},[202,486,487],{},[168,488,489],{},"UXD_PROJECT",[202,491,239],{},[187,493,494,499],{},[202,495,496],{},[168,497,498],{},"UXD_REF",[202,500,501],{},"The ref as typed",[187,503,504,509],{},[202,505,506],{},[168,507,508],{},"UXD_BRANCH",[202,510,511],{},"Resolved branch name",[187,513,514,519],{},[202,515,516],{},[168,517,518],{},"UXD_SLUG",[202,520,269],{},[187,522,523,528],{},[202,524,525],{},[168,526,527],{},"UXD_PORT",[202,529,279],{},[187,531,532,541],{},[202,533,534,537,538],{},[168,535,536],{},"UXD_PORT_1"," … ",[168,539,540],{},"UXD_PORT_{ports-1}",[202,542,543],{},"The rest of the block",[164,545,546,547,549,550,553,554,557],{},"Your ",[168,548,307],{}," values are layered on top, then a command's own ",[168,551,552],{},"[commands.x.env]",",\nthen any ",[168,555,556],{},"--env K=V"," passed on the command line.",[159,559,561],{"id":560},"seeing-the-result","Seeing the result",[164,563,564,567,568,433,570,572,573,575,576,579],{},[168,565,566],{},"--dry-run"," on ",[168,569,432],{},[168,571,436],{}," or ",[168,574,439],{}," prints the resolved environment as\n",[168,577,578],{},"export"," lines followed by the shell-quoted command:",[327,581,585],{"className":582,"code":583,"language":584,"meta":333,"style":333},"language-bash shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","uxd my-project feat\u002Flogin run dev --dry-run\n","bash",[168,586,587],{"__ignoreMap":333},[337,588,589,592,595,598,601,604],{"class":339,"line":340},[337,590,591],{"class":364},"uxd",[337,593,594],{"class":377}," my-project",[337,596,597],{"class":377}," feat\u002Flogin",[337,599,600],{"class":377}," run",[337,602,603],{"class":377}," dev",[337,605,606],{"class":347}," --dry-run\n",[327,608,613],{"className":609,"code":611,"language":612},[610],"language-text","export UXD_PATH=~\u002Fdev\u002Fuxd\u002Fmy-project\u002Ftrees\u002Ffeat-login\nexport UXD_REPO_PATH=~\u002Fdev\u002Fuxd\u002Fmy-project\u002Frepo\nexport UXD_DATA_DIR=~\u002Fdev\u002Fuxd\u002Fmy-project\u002Ftrees\u002F.data\u002Ffeat-login\nexport UXD_PROJECT=my-project\nexport UXD_REF=feat\u002Flogin\nexport UXD_BRANCH=feat\u002Flogin\nexport UXD_SLUG=feat-login\nexport UXD_PORT=3053\nexport PORT=3053\nbash -c 'npm run dev \"$@\"' uxd\n","text",[168,614,611],{"__ignoreMap":333},[164,616,617],{},"That is the fastest way to check an interpolation without starting anything.",[159,619,621],{"id":620},"the-data-directory","The data directory",[164,623,624,627,628,632,633,636],{},[168,625,626],{},"$UXD_DATA_DIR"," is a private directory ",[629,630,631],"strong",{},"outside"," the worktree, at\n",[168,634,635],{},"{worktrees_path}\u002F.data\u002F\u003Cslug>",". Use it for anything that must not land in the\ngit tree — SQLite files, uploads, caches. It is created before setup runs and\nremoved with the workspace.",[164,638,639,640,644],{},"See ",[641,642,643],"a",{"href":38},"Workspaces & worktrees"," for how ports and\nthe data directory fit into the workspace model.",[646,647,648],"style",{},"html pre.shiki code .s7iLA, html code.shiki .s7iLA{--shiki-light:#0E1116;--shiki-default:#0E1116;--shiki-dark:#F0F3F6}html pre.shiki code .ssYy9, html code.shiki .ssYy9{--shiki-light:#023B95;--shiki-default:#023B95;--shiki-dark:#91CBFF}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);}",{"title":333,"searchDepth":351,"depth":351,"links":650},[651,652,653,654],{"id":161,"depth":351,"text":162},{"id":425,"depth":351,"text":426},{"id":560,"depth":351,"text":561},{"id":620,"depth":351,"text":621},"The {port} family of template variables, where they can be used, and the UXD_* variables every child process receives.","md",null,{},{"icon":76},{"title":661,"description":662},"uxd Environment & Templates","Reference for uxd template variables — path, data_dir, port, port+N — and the UXD_PATH, UXD_PORT, UXD_DATA_DIR environment exported to every command.","mTNf3Mcf-LOVn33KmjjSsxR_SqfL-fYRUMJr53IvzU0",[665,667],{"title":140,"path":141,"stem":142,"description":666,"icon":143,"children":-1},"Define named commands for uxd run, give them their own cwd and env, and attach the four lifecycle hooks.",{"title":149,"path":150,"stem":151,"description":668,"icon":152,"children":-1},"Configure which editor uxd code opens, using a preset name or a custom template.",1784975262710]