Setting Up Your Local Development Environment with Laravel Vapor CLI
Overview
Managing serverless infrastructure requires a bridge between your local code and the cloud. provides this through its dedicated Command Line Interface (CLI). This tool is essential for developers who prefer the efficiency of the terminal over a graphical dashboard. By configuring the CLI, you gain the ability to deploy applications, manage databases, and configure environments without ever leaving your IDE.
Prerequisites
Before running these commands, ensure you have and installed on your machine. You must also have a registered account. A basic understanding of the terminal is necessary to navigate the installation and authentication process.
Key Libraries & Tools
- : The standard dependency manager for PHP, used here to install the CLI globally.
- : The primary tool for interacting with the Vapor platform from your local environment.
Code Walkthrough
Global Installation
To make the tool available system-wide, use to fetch the package. This ensures you can run vapor commands from any directory.
composer global require laravel/vapor-cli
Authentication
Once installed, you must link the CLI to your account. This establishes a secure connection between your local machine and the Vapor API.
vapor login
The CLI will prompt you for your email and password. Upon successful login, it stores an API token locally for future requests.
Verifying the Connection
You can verify your access and see which teams you belong to by listing your teams. This is a quick way to confirm the CLI is communicating correctly with the cloud.
vapor team:list
Syntax Notes
The CLI follows the standard Laravel command structure. Commands usually follow a category:action pattern, making the tool intuitive for anyone familiar with the ecosystem. For example, team:list specifically targets the team resource with a list action.
Tips & Gotchas
Ensure your global bin directory is in your system's PATH. If you type vapor and get a "command not found" error, your terminal doesn't know where the executable lives. Adding ~/.composer/vendor/bin (on macOS/Linux) or %USERPROFILE%\AppData\Roaming\Composer\vendor\bin (on Windows) to your PATH fixes this immediately.
- 40%· products
- 20%· products
- 10%· products
- 10%· products
- 10%· products
- 10%· products

Learn Laravel Vapor #04: Preparing local development
WatchLaravel // 1:49
The official YouTube channel of Laravel, the clean stack for Artisans and agents. We will update you on what's new in the world of Laravel, from the framework to our products Cloud, Forge, and Nightwatch.