Skip to content

Project linking

Learn how to link projects with Vercel CLI.

When running vercel in a directory for the first time, Vercel CLI needs to know which scope and Project you want to deploy your directory to. You can choose to either link an existing project or to create a new one.

vercel
? Set up and deploy “~/web/my-lovely-project”? [Y/n] y
? Which scope do you want to deploy to? My Awesome Team
? Link to existing project? [y/N] y
? What’s the name of your existing project? my-lovely-project
🔗 Linked to awesome-team/my-lovely-project (created .vercel and added it to .gitignore)

Linking an existing project when running Vercel CLI in a new directory.

Once set up, a new .vercel directory will be added to your directory. The .vercel directory contains both the organization and project id of your project. If you want unlink your directory, you can remove the .vercel directory.

You can use the --yes option to skip these questions.

When you create a new project, Vercel CLI will link the project and automatically detect the framework you are using and offer default project settings accordingly.

vercel
? Set up and deploy “~/web/my-new-project”? [Y/n] y
? Which scope do you want to deploy to? My Awesome Team
? Link to existing project? [y/N] n
? What’s your project’s name? my-new-project
? In which directory is your code located? my-new-project/
Auto-detected project settings (Next.js):
- Build Command: `next build` or `build` from `package.json`
- Output Directory: Next.js default
- Development Command: next dev --port $PORT
? Want to override the settings? [y/N]

Creating a new project with the vercel command.

You will be provided with default Build Command, Output Directory, and Development Command options.

You can continue with the default project settings or overwrite them. You can also edit your project settings later in your project dashboard.