Agent CLI
Warp Agent CLI quickstart
# Warp Agent CLI quickstart import { VARS } from '@data/vars'; import { Tabs, TabItem } from '@astrojs/starlight/components'; This guide takes you from installing the {VARS.WARP_CLI} to your first agent conversation in about five minutes. ## Prerequisites * **A Warp account** - The login step opens your browser, where you can sign in or [create an account](https://app.warp.dev/signup). The CLI uses the same account as the Warp app, but doesn't require the app to be installed. * **A supported platform** - macOS, Linux, or Windows. See [supported platforms](/cli/#supported-platforms). ## 1. Install the Warp Agent CLI Install the CLI with the command for your operating system. <Tabs> <TabItem label="macOS and Linux"> ```bash curl -fsSL https://app.warp.dev/download/agent-cli | bash ``` </TabItem> <TabItem label="Windows"> Run this command in PowerShell: ```powershell Invoke-RestMethod "https://app.warp.dev/download/agent-cli.ps1" | Invoke-Expression ``` </TabItem> </Tabs> After installing, verify that the `warp` command is available: ```bash warp --version ``` The command prints the installed version. From here on, the CLI updates automatically. See [automatic updates](/cli/#automatic-updates). ## 2. Log in Log in once so the CLI can access your Warp account, models, and saved context. Start the CLI: ```bash warp ``` The CLI shows a verification link and a device code, and opens the link in your browser. Approve the login there and the CLI unlocks automatically, so you don't need to restart it. If the browser doesn't open, visit the link shown in the CLI and enter the code. When login completes, the CLI shows its start screen with the version, a short "What's new" list, and the rules, skills, and MCP servers it discovered for your current directory. :::note **Running in CI or a headless environment?** Authenticate with a Warp API key instead by setting the `WARP_API_KEY` environment variable: ```bash WARP_API_KEY=YOUR_API_KEY warp ``` You can also pass the `--api-key` flag, but prefer the environment variable. Command-line arguments can be captured in shell history and process listings. See [API keys](/reference/cli/api-keys/) to learn how to create one. ::: ## 3. Run your first prompt Type a prompt in plain language, such as `What does this project do?`, and press `Enter`. If the agent wants to run a command or edit a file, it shows a permission request. Choose an option to approve or reject the action. Learn more about the transcript, diffs, and approvals in [Agent conversations](/cli/agent-conversations/) and [Permissions and profiles](/cli/permissions-and-profiles/). ## 4. Run a shell command You can run shell commands directly without leaving the CLI. Type `!` at the start of an empty input to switch to shell mode. The footer shows **Shell mode**. Type a command, such as `git status`, and press `Enter`. To go back to prompting the agent, press `Backspace` on the empty input. To run recognized shell commands without the `!` prefix, run `/natural-language-detection` to turn on natural language detection. The CLI then classifies input as you type: recognized commands switch to shell mode, while natural-language prompts stay in agent mode. The prompt marker and statusline show the active mode before you press `Enter`. See [Input and shell commands](/cli/input-and-shell-commands/) for long-running commands, interactive programs, and full-screen apps. ## 5. Exit and resume Press `Ctrl+C` twice in a row to exit, or run `/exit`. A single `Ctrl+C` press stops the agent's current response, or clears the input when nothing is running. On exit, the CLI prints a resume command for the conversation: ```bash warp --resume CONVERSATION_TOKEN ``` Run the printed command later to pick up where you left off. To browse and reopen past conversations from inside the CLI, see [Agent conversations](/cli/agent-conversations/#conversation-history). ## Next steps * [Agent conversations](/cli/agent-conversations/) - Work with the transcript, code diffs, plans, and tasks. * [Customizing the CLI](/cli/configuration/) - Rules, skills, MCP servers, themes, and settings. * [Reference](/cli/reference/) - All flags, slash commands, and keyboard shortcuts.Tell me about this feature: https://docs.warp.dev/cli/quickstart/Install the Warp Agent CLI, log in, and run your first agent conversation in your own terminal in a few minutes.
This guide takes you from installing the Warp Agent CLI to your first agent conversation in about five minutes.
Prerequisites
Section titled “Prerequisites”- A Warp account - The login step opens your browser, where you can sign in or create an account. The CLI uses the same account as the Warp app, but doesn’t require the app to be installed.
- A supported platform - macOS, Linux, or Windows. See supported platforms.
1. Install the Warp Agent CLI
Section titled “1. Install the Warp Agent CLI”Install the CLI with the command for your operating system.
curl -fsSL https://app.warp.dev/download/agent-cli | bashRun this command in PowerShell:
Invoke-RestMethod "https://app.warp.dev/download/agent-cli.ps1" | Invoke-ExpressionAfter installing, verify that the warp command is available:
warp --versionThe command prints the installed version. From here on, the CLI updates automatically. See automatic updates.
2. Log in
Section titled “2. Log in”Log in once so the CLI can access your Warp account, models, and saved context. Start the CLI:
warpThe CLI shows a verification link and a device code, and opens the link in your browser. Approve the login there and the CLI unlocks automatically, so you don’t need to restart it. If the browser doesn’t open, visit the link shown in the CLI and enter the code.
When login completes, the CLI shows its start screen with the version, a short “What’s new” list, and the rules, skills, and MCP servers it discovered for your current directory.
3. Run your first prompt
Section titled “3. Run your first prompt”Type a prompt in plain language, such as What does this project do?, and press Enter.
If the agent wants to run a command or edit a file, it shows a permission request. Choose an option to approve or reject the action.
Learn more about the transcript, diffs, and approvals in Agent conversations and Permissions and profiles.
4. Run a shell command
Section titled “4. Run a shell command”You can run shell commands directly without leaving the CLI.
Type ! at the start of an empty input to switch to shell mode. The footer shows Shell mode. Type a command, such as git status, and press Enter. To go back to prompting the agent, press Backspace on the empty input.
To run recognized shell commands without the ! prefix, run /natural-language-detection to turn on natural language detection. The CLI then classifies input as you type: recognized commands switch to shell mode, while natural-language prompts stay in agent mode. The prompt marker and statusline show the active mode before you press Enter.
See Input and shell commands for long-running commands, interactive programs, and full-screen apps.
5. Exit and resume
Section titled “5. Exit and resume”Press Ctrl+C twice in a row to exit, or run /exit. A single Ctrl+C press stops the agent’s current response, or clears the input when nothing is running.
On exit, the CLI prints a resume command for the conversation:
warp --resume CONVERSATION_TOKENRun the printed command later to pick up where you left off.
To browse and reopen past conversations from inside the CLI, see Agent conversations.
Next steps
Section titled “Next steps”- Agent conversations - Work with the transcript, code diffs, plans, and tasks.
- Customizing the CLI - Rules, skills, MCP servers, themes, and settings.
- Reference - All flags, slash commands, and keyboard shortcuts.