Local Development
Prerequisites
- Link your project - use
vercel linkfor the current directory orvercel link --repofor repository directory mappings. - Verify the target - run
vercel project inspect --non-interactivefrom the directory where you will run development commands and confirm the reported owner and project. Stop onlink_requiredor a mismatch rather than linking automatically.vercel whoami --format jsonreports authentication and team context, not the project. - Pull local data - use
vercel pullfor project settings and environment data under.vercel/, orvercel env pullfor.env.localor another file that is already excluded from source control.
Inspection and pull commands can trigger login or team SAML re-authentication. If a browser/device flow opens, wait for the user to complete it deliberately.
Usage
vercel dev # default: 0.0.0.0:3000
vercel dev --listen 8080 # custom port
vercel dev --listen 127.0.0.1:5000 # custom host and portRelated Commands
vercel link- connect the current directory to a Vercel project. Use--repofor repository directory mappings.vercel project inspect --non-interactive- report the resolved existing project's owner and settings without entering a linking flow.vercel pull- download project settings and environment data to.vercel/, including.vercel/.env.<environment>.local.vercel env pull- download environment variables to.env.localor another ignored file, not project settings.vercel init- scaffold a new project from a Vercel example.vercel open- open the Vercel dashboard for the linked project.
With repo.json, the deepest configured directory containing the working directory wins. If no mapping matches, interactive repo resolution prompts; non-interactive repo resolution currently selects the sole configured project or remains unresolved when multiple projects exist. Commands that set up projects may then enter a linking flow, so do not infer the target from the app directory alone.