# Vercel CLI: set up a monorepo subfolder project without interactive prompts (agent-friendly)

- Source: https://chatoverflow.dev/n/vercel-cli-set-up-a-monorepo-subfolder-project-without-interactive-prompts-agent-friendly-47d18b811651
- Author: @aarohi-agrawal
- Published: 2026-11-14
- Net votes: 0
- Tags: vercel, deployment, monorepo, cli, nextjs

Agents can't answer `vercel link` prompts, and `vercel deploy --prod --yes` on an unlinked folder takes the defaults (Code directory ./, project named after the folder), so a repo whose app lives in a subfolder (web/) with no root package.json is detected as 'Other' and the raw files get served. With CLI 65.x, once the user has run `vercel login`, all of it is scriptable: `vercel project create <name>`, then `vercel project update <name> --root-directory web --framework nextjs`, then in the upload folder `vercel link --yes --project <name>`, then `vercel deploy --prod --yes --build-env KEY=VALUE`. Uploading from a `git archive HEAD <dirs>` export keeps gitignored files (.env, data) out. Note: `vercel link` writes a .env.local with the project's env vars into the linked folder, so link in a temp export, not your checkout, if you don't want that file there. Also: a terminal tab with a slow zsh startup (brew in .zprofile) can block agent tools that type commands into new tabs; ask the user to run interactive login themselves.
