[{"data":1,"prerenderedAt":601},["ShallowReactive",2],{"navigation_en":3,"-docs-uxd-guides-run-dev-servers-in-parallel":150,"-docs-uxd-guides-run-dev-servers-in-parallel-surround":596},{"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":52,"body":152,"description":588,"extension":589,"links":590,"meta":591,"navigation":592,"path":53,"seo":593,"stem":54,"__hash__":595},"docs_docs\u002Fdocs\u002Fuxd\u002Fguides\u002F02.run-dev-servers-in-parallel.md",{"type":153,"value":154,"toc":580},"minimark",[155,164,169,180,248,254,297,307,311,314,372,397,410,414,420,440,447,451,475,481,485,499,507,514,533,537,540,560,570,576],[156,157,158,159,163],"p",{},"Two branches, two dev servers, one machine. ",[160,161,162],"code",{},"uxd"," allocates a port block per\nworkspace; your job is to hand those ports to your app.",[165,166,168],"h2",{"id":167},"single-port","Single port",[156,170,171,172,175,176,179],{},"Most apps need one. Interpolate ",[160,173,174],{},"{port}"," into ",[160,177,178],{},"[env]",":",[181,182,188],"pre",{"className":183,"code":184,"filename":185,"language":186,"meta":187,"style":187},"language-toml shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","[env]\nPORT = \"{port}\"\n\n[commands.dev]\nrun = \"pnpm dev\"\n","~\u002F.uxd\u002Fmy-project.toml","toml","",[160,189,190,206,216,223,239],{"__ignoreMap":187},[191,192,195,199,203],"span",{"class":193,"line":194},"line",1,[191,196,198],{"class":197},"s7iLA","[",[191,200,202],{"class":201},"szw1H","env",[191,204,205],{"class":197},"]\n",[191,207,209,212],{"class":193,"line":208},2,[191,210,211],{"class":197},"PORT = ",[191,213,215],{"class":214},"semJd","\"{port}\"\n",[191,217,219],{"class":193,"line":218},3,[191,220,222],{"emptyLinePlaceholder":221},true,"\n",[191,224,226,228,231,234,237],{"class":193,"line":225},4,[191,227,198],{"class":197},[191,229,230],{"class":201},"commands",[191,232,233],{"class":197},".",[191,235,236],{"class":201},"dev",[191,238,205],{"class":197},[191,240,242,245],{"class":193,"line":241},5,[191,243,244],{"class":197},"run = ",[191,246,247],{"class":214},"\"pnpm dev\"\n",[156,249,250,251,179],{},"Now every workspace gets its own ",[160,252,253],{},"PORT",[181,255,259],{"className":256,"code":257,"language":258,"meta":187,"style":187},"language-bash shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","uxd my-project feat\u002Flogin run dev    # PORT=3053\nuxd my-project feat\u002Fsearch run dev   # PORT=3011\n","bash",[160,260,261,281],{"__ignoreMap":187},[191,262,263,265,268,271,274,277],{"class":193,"line":194},[191,264,162],{"class":201},[191,266,267],{"class":214}," my-project",[191,269,270],{"class":214}," feat\u002Flogin",[191,272,273],{"class":214}," run",[191,275,276],{"class":214}," dev",[191,278,280],{"class":279},"sq92B","    # PORT=3053\n",[191,282,283,285,287,290,292,294],{"class":193,"line":208},[191,284,162],{"class":201},[191,286,267],{"class":214},[191,288,289],{"class":214}," feat\u002Fsearch",[191,291,273],{"class":214},[191,293,276],{"class":214},[191,295,296],{"class":279},"   # PORT=3011\n",[298,299,300,303,304,306],"note",{},[160,301,302],{},"$UXD_PORT"," is exported to every child process whether or not your config\nreferences it. ",[160,305,178],{}," is how you map it onto the variable name your app\nactually reads.",[165,308,310],{"id":309},"several-ports-per-workspace","Several ports per workspace",[156,312,313],{},"An app that needs a web port, an API port, and a database port asks for a\nblock:",[181,315,317],{"className":183,"code":316,"filename":185,"language":186,"meta":187,"style":187},"ports = 3\n\n[env]\nPORT = \"{port}\"\nAPI_PORT = \"{port+1}\"\nDB_PORT = \"{port+2}\"\nVITE_API_URL = \"http:\u002F\u002Flocalhost:{port+1}\"\n",[160,318,319,328,332,340,346,354,363],{"__ignoreMap":187},[191,320,321,324],{"class":193,"line":194},[191,322,323],{"class":197},"ports = ",[191,325,327],{"class":326},"ssYy9","3\n",[191,329,330],{"class":193,"line":208},[191,331,222],{"emptyLinePlaceholder":221},[191,333,334,336,338],{"class":193,"line":218},[191,335,198],{"class":197},[191,337,202],{"class":201},[191,339,205],{"class":197},[191,341,342,344],{"class":193,"line":225},[191,343,211],{"class":197},[191,345,215],{"class":214},[191,347,348,351],{"class":193,"line":241},[191,349,350],{"class":197},"API_PORT = ",[191,352,353],{"class":214},"\"{port+1}\"\n",[191,355,357,360],{"class":193,"line":356},6,[191,358,359],{"class":197},"DB_PORT = ",[191,361,362],{"class":214},"\"{port+2}\"\n",[191,364,366,369],{"class":193,"line":365},7,[191,367,368],{"class":197},"VITE_API_URL = ",[191,370,371],{"class":214},"\"http:\u002F\u002Flocalhost:{port+1}\"\n",[156,373,374,377,378,381,382,385,386,389,390,393,394,233],{},[160,375,376],{},"ports"," accepts 1–10. ",[160,379,380],{},"{port+N}"," is valid for ",[160,383,384],{},"N \u003C ports","; asking for\n",[160,387,388],{},"{port+3}"," with ",[160,391,392],{},"ports = 3"," is a config error, caught by ",[160,395,396],{},"uxd config validate",[156,398,399,400,402,403,406,407,233],{},"The same values reach child processes as ",[160,401,302],{},", ",[160,404,405],{},"$UXD_PORT_1",",\n",[160,408,409],{},"$UXD_PORT_2",[165,411,413],{"id":412},"pinning-the-window","Pinning the window",[156,415,416,417,419],{},"By default ",[160,418,162],{}," derives a per-project base port. Pin it when you want\npredictable ranges across a team, or to keep two projects out of each other's\nway:",[181,421,423],{"className":183,"code":422,"filename":185,"language":186,"meta":187,"style":187},"base_port = 5700\nports = 2\n",[160,424,425,433],{"__ignoreMap":187},[191,426,427,430],{"class":193,"line":194},[191,428,429],{"class":197},"base_port = ",[191,431,432],{"class":326},"5700\n",[191,434,435,437],{"class":193,"line":208},[191,436,323],{"class":197},[191,438,439],{"class":326},"2\n",[156,441,442,443,446],{},"Allocation starts at a deterministic candidate derived from the workspace slug\nwithin a 100-stride window above ",[160,444,445],{},"base_port",", and only scans upward if that\nblock is claimed or already listening. So a given branch keeps the same port\nacross sessions — bookmarks and OAuth callback URLs keep working.",[165,448,450],{"id":449},"overriding-for-one-run","Overriding for one run",[181,452,454],{"className":256,"code":453,"language":258,"meta":187,"style":187},"uxd my-project 42 run dev --port 6000\n",[160,455,456],{"__ignoreMap":187},[191,457,458,460,462,465,467,469,472],{"class":193,"line":194},[191,459,162],{"class":201},[191,461,267],{"class":214},[191,463,464],{"class":326}," 42",[191,466,273],{"class":214},[191,468,276],{"class":214},[191,470,471],{"class":326}," --port",[191,473,474],{"class":326}," 6000\n",[156,476,477,480],{},[160,478,479],{},"--port"," changes the environment for that invocation only. Nothing is\npersisted, and the workspace keeps its allocated block.",[165,482,484],{"id":483},"checking-what-a-workspace-holds","Checking what a workspace holds",[181,486,488],{"className":256,"code":487,"language":258,"meta":187,"style":187},"uxd my-project list\n",[160,489,490],{"__ignoreMap":187},[191,491,492,494,496],{"class":193,"line":194},[191,493,162],{"class":201},[191,495,267],{"class":214},[191,497,498],{"class":214}," list\n",[181,500,505],{"className":501,"code":503,"language":504},[502],"language-text","SLUG        KIND    BRANCH      STATUS  PORT  AGE  LAST USED\nfeat-login  branch  feat\u002Flogin  clean   3053  0m   0m\n","text",[160,506,503],{"__ignoreMap":187},[156,508,509,510,513],{},"Or for one workspace, with ",[160,511,512],{},"--json"," if you are scripting:",[181,515,517],{"className":256,"code":516,"language":258,"meta":187,"style":187},"uxd my-project feat\u002Flogin info --json\n",[160,518,519],{"__ignoreMap":187},[191,520,521,523,525,527,530],{"class":193,"line":194},[191,522,162],{"class":201},[191,524,267],{"class":214},[191,526,270],{"class":214},[191,528,529],{"class":214}," info",[191,531,532],{"class":326}," --json\n",[165,534,536],{"id":535},"seeing-the-computed-environment","Seeing the computed environment",[156,538,539],{},"Not sure what your app will receive? Ask, without running anything:",[181,541,543],{"className":256,"code":542,"language":258,"meta":187,"style":187},"uxd my-project feat\u002Flogin run dev --dry-run\n",[160,544,545],{"__ignoreMap":187},[191,546,547,549,551,553,555,557],{"class":193,"line":194},[191,548,162],{"class":201},[191,550,267],{"class":214},[191,552,270],{"class":214},[191,554,273],{"class":214},[191,556,276],{"class":214},[191,558,559],{"class":326}," --dry-run\n",[156,561,562,565,566,569],{},[160,563,564],{},"--dry-run"," prints the environment as ",[160,567,568],{},"export"," lines followed by the\nshell-quoted command:",[181,571,574],{"className":572,"code":573,"language":504},[502],"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 'pnpm dev \"$@\"' uxd\n",[160,575,573],{"__ignoreMap":187},[577,578,579],"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 .sq92B, html code.shiki .sq92B{--shiki-light:#66707B;--shiki-default:#66707B;--shiki-dark:#BDC4CC}html pre.shiki code .ssYy9, html code.shiki .ssYy9{--shiki-light:#023B95;--shiki-default:#023B95;--shiki-dark:#91CBFF}",{"title":187,"searchDepth":208,"depth":208,"links":581},[582,583,584,585,586,587],{"id":167,"depth":208,"text":168},{"id":309,"depth":208,"text":310},{"id":412,"depth":208,"text":413},{"id":449,"depth":208,"text":450},{"id":483,"depth":208,"text":484},{"id":535,"depth":208,"text":536},"Configure ports so several workspaces can run at the same time without colliding.","md",null,{},{"icon":55},{"title":52,"description":594},"Configure uxd's port allocation so multiple workspaces run dev servers simultaneously — single ports, multi-port blocks, and per-run overrides.","fne92mISKIvCyYIi2N6vRENrs_Uz1s0tIpvEqwKktYQ",[597,599],{"title":47,"path":48,"stem":49,"description":598,"icon":50,"children":-1},"Take a PR from a link to a running app you can click through, then dispose of it when it merges.",{"title":57,"path":58,"stem":59,"description":600,"icon":60,"children":-1},"Get .env.local and other untracked files into every new workspace automatically.",1789131074687]