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