references/getting-started.md
GitHubGetting Started
Install
npm i -g vercel
First-Time Setup
- Authenticate —
vercel login(opens browser). For CI, useVERCEL_TOKENenv var instead. - Check your team —
vercel whoamito see current team.vercel teams switchto change. Linking on the wrong team is a common mistake. - Link your project —
vercel link(single project) orvercel link --repo(monorepo with multiple projects or non-root directories). Creates.vercel/. - Pull env vars —
vercel pulldownloads project settings and env vars to.env.local. - Dev or deploy —
vercel dev(local server) orvercel --prod(production deploy).
Project Linking
Commands must be run from the directory containing .vercel/ or a subdirectory of it.
.vercel/project.json: Created byvercel link. Links a single project. Fine for single-project repos, and can work in monorepos if there's only one project..vercel/repo.json: Created byvercel link --repo. Links a repo that may contain multiple projects. Always a good idea when any project has a non-root directory (e.g.,apps/web).
Running from a project subdirectory (e.g., apps/web/) skips the "which project?" prompt.
When something goes wrong, check how things are linked first — look at .vercel/ and whether it's project.json or repo.json.