---
title: "Install the Vercel CLI"
description: "Install the Vercel CLI, authenticate with your Vercel account, and confirm everything is working before touching either app."
canonical_url: "https://vercel.com/academy/python-on-vercel/install-vercel-cli"
md_url: "https://vercel.com/academy/python-on-vercel/install-vercel-cli.md"
docset_id: "vercel-academy"
doc_version: "1.0"
last_updated: "2026-05-10T04:23:12.546Z"
content_type: "lesson"
course: "python-on-vercel"
course_title: "Python on Vercel"
prerequisites:  []
---

<agent-instructions>
Vercel Academy — structured learning, not reference docs.
Lessons are sequenced.
Adapt commands to the human's actual environment (OS, package manager, shell, editor) — detect from project context or ask, don't assume.
The lesson shows one path; if the human's project diverges, adapt concepts to their setup.
Preserve the learning goal over literal steps.
Quizzes are pedagogical — engage, don't spoil.
Quiz answers are included for your reference.
</agent-instructions>

# Install the Vercel CLI

# 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:

```bash
npm install -g vercel
```

If you don't have Node.js installed, grab the LTS version from [nodejs.org](https://nodejs.org) and come back.

### Authenticate

Once installed, log into your Vercel account:

```bash
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:

```bash
vercel --version
vercel whoami
```

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

\*\*Note: 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:

```bash
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.

```bash
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.

\*\*Warning: 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

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


---

[Full course index](/academy/llms.txt) · [Sitemap](/academy/sitemap.md)
