Vercel Logo

Install and Authenticate the Vercel CLI

You've been deploying Python apps for years. Maybe to a VPS, maybe to Railway, maybe to a server you've been meaning to migrate off of since 2021. And then someone mentions Vercel and you figure that's for JavaScript people.

It isn't. Vercel runs Python. FastAPI, Flask, Django. All of it. And once you have the CLI installed, you can deploy your Python backend and your Next.js frontend from the same workflow, to the same project, without splitting your deployment story in two.

Let's get the CLI set up.

Outcome

Install the Vercel CLI, authenticate with your Vercel account, and confirm it's ready to use.

Fast Track

  1. Install the CLI: npm install -g vercel
  2. Authenticate: vercel login
  3. Verify: vercel --version

Hands-On

Install

The CLI ships as an npm package. Install it globally so you can run it from anywhere:

npm install -g vercel

If you don't have Node.js installed, grab the LTS version from nodejs.org and come back.

Authenticate

Once installed, log into your Vercel account:

vercel login

The CLI opens a browser tab and asks you to confirm the login. After you approve it, you'll see this in the terminal:

> Success! Email authentication complete for you@example.com

If you'd rather not open a browser, you can pass --no-browser and copy the URL manually. Same result either way.

Verify

Confirm the CLI is installed and authenticated:

vercel --version
vercel whoami

The first command prints the CLI version. The second confirms which account is active.

Token-based auth

In CI environments or anywhere a browser isn't available, use a Vercel access token instead: set VERCEL_TOKEN in your environment and the CLI picks it up automatically.

Try It

Run both commands and check the output:

vercel --version
Vercel CLI 48.2.0

Python on Vercel needs CLI 48.1.8 or newer. If your version is older, upgrade with npm install -g vercel@latest before moving on.

vercel whoami
you@example.com

If vercel whoami returns your email, you're good. If it says you're not logged in, run vercel login again.

Multiple accounts

The CLI stores one active session at a time. If you have a personal and a work Vercel account, vercel login will switch you to whichever you authenticate as. Run vercel whoami any time you're unsure which account is active.

Troubleshooting

vercel login opens a browser but hangs: Close the browser tab and run vercel login --no-browser. The CLI prints a URL you can paste manually. This also works in headless environments.

vercel: command not found after install: The global npm bin directory isn't in your PATH. Run npm config get prefix to find it, then add <prefix>/bin to your PATH. Alternatively, use npx vercel for any command.

Done-When

  • vercel --version prints a version number
  • vercel whoami returns your Vercel account email

Solution

npm install -g vercel
vercel login
vercel --version  # prints Vercel CLI 48.x.x or newer
vercel whoami     # prints your account email

Was this helpful?

supported.