Vercel Hobby · Beachhead course

Reference

CLI cheat sheet

The commands this course uses, and a few you will want next. Run them from the linked project folder.

Every command and flag here was checked against --help in Vercel CLI 62.1.0 on 2 Oct 2026. Full reference: vercel.com/docs/cli.

Set up

CommandWhat it does
npm i -g vercelInstall the CLI.
vercel loginSign in through the browser.
vercel whoamiPrint the logged-in username.
vercel linkTie this folder to a project. Writes .vercel/.
vercel git connectConnect the project to this folder's Git remote.

Environment variables

Environments are production, preview and development. ls and rm are short for list and remove.

CommandWhat it does
vercel env lsList every variable and its environments. Secret values are not shown.
vercel env ls productionList one environment.
vercel env add NAME productionAdd a variable; prompts for the value. Stored as a Secret in production and preview by default.
vercel env add NAME developmentAdd the laptop value. Must be its own command.
vercel env add NAME production --no-sensitiveAdd a readable Config value instead of a Secret.
vercel env add NAME production --value "x" --yesNon-interactive. Lands in shell history: non-secrets only.
vercel env add NAME preview --git-branch feat1Value for one preview branch only; overrides the general preview value.
vercel env update NAME productionReplace a value; prompts for the new one.
vercel env rm NAME productionRemove from one environment.
vercel env pullWrite Development values to .env.local, merging with what is there.
vercel env pull --environment=previewPull another environment's values. Secrets come back as placeholders.
vercel env run -- npm run devRun a command with Development values, without writing a file.

Deploy and inspect

With Git connected you rarely deploy by hand: pushing does it. These are for the times you need to.

CommandWhat it does
vercelDeploy this folder as a Preview. (First deploy of a new project is Production.)
vercel --prodDeploy this folder to Production.
vercel deploy --logsDeploy and print the build log.
vercel redeploy <url>Rebuild and deploy an existing deployment, picking up current variables.
vercel inspect <url> --logsShow a deployment's build log.
vercel logs --environment production --level error --since 5mRecent production errors. Hobby keeps one hour of runtime logs.
vercel logs --followStream live runtime logs.

Storage

CommandWhat it does
vercel install neonProvision Neon Postgres, connect it to the project, inject variables, pull them.
vercel install neon --helpShow that integration's products, plans and options.
vercel install neon -e production -e previewConnect only the named environments.

The Git commands the course pairs with them

CommandEffect on Vercel
git push on mainNew Production deployment.
git push -u origin my-branchNew Preview deployment for that branch.
git commit --allow-empty -m "Redeploy" then pushA fresh deployment with no code change; another way to pick up new variables.