Warp Terminal Tutorial: AI Agent, Command Blocks & Workflows
Warp is a terminal with a built-in AI agent that can suggest commands, write code, and debug errors. Here's how to use command blocks and workflows.

👁 117 reads
Warp is a terminal with a built-in AI agent: you can type regular commands or describe what you want in plain English, and the agent will suggest a command, write code, or find the cause of an error. This tutorial walks you through the two modes, command blocks, and saving your own shortcuts, based on Warp’s official documentation.
Before You Start: Security Rules
An agent in your terminal can execute commands that delete or modify things. Before you begin, establish one rule: read every command before you approve it, and read commands that delete files, change permissions, or operate on servers twice. On a computer with important data, it’s also worth having a current backup before you start experimenting with new commands.
When working with production servers, a simple rule works well: the agent proposes, you execute.
Step 1. Installation and First Commands
After installation, Warp looks like a regular terminal, so all familiar commands work the same way. The difference appears right after your first command: each command together with its output creates a separate block. You can copy, search, and scroll each block independently from the rest.
Shortcuts from the documentation: you select a block by clicking, and copy its output with Cmd + C on Mac or Ctrl + Shift + C on Windows and Linux. You navigate between blocks with arrow keys plus Cmd or Ctrl.
Step 2. Terminal Mode and Agent Mode
Warp has two modes: a pure terminal for commands and a separate conversation view with the agent. You switch with Cmd + I on Mac or Ctrl + I on Windows and Linux. If automatic recognition is enabled, you can simply type a question in plain English, and Warp will recognize it’s not a command and pass it to the agent when you press Enter.
You can disable automatic recognition in agent settings. Then you switch modes only with the shortcut, which some people prefer because nothing guesses for them.
Step 3. First Task for the Agent
Good first tasks are small and verifiable:
- “find files larger than 1 GB in this directory”,
- “show which processes are using port 3000”,
- “explain what this command does” with a command pasted from the internet.
The agent proposes a command, and you approve it. Read the command before approving, especially when it deletes something or changes permissions.
Step 4. Block as Context
When a command returns an error, you don’t need to copy it to the chat. Each block has an icon in the toolbar with an option to attach the block to your query. The agent then sees the exact output and can explain what went wrong. This is the fastest way to diagnose compilation or installation errors.
Step 5. Agent in a Running Program
If you’ve launched an interactive program, such as a database console or development server, you can bring the agent into that session with a button in the terminal footer or the same Cmd + I shortcut. The agent sees what’s happening in the running program.
Step 6. Workflows: Saved Commands
Commands you repeat can be saved as workflows in Warp Drive. A workflow is a command with a name, description, and arguments that you enter in double curly braces. You create one from Warp Drive, from a block’s menu with the save-as-workflow option, or from the agent’s output. You launch it from the command palette. The agent also uses Warp Drive content, so saved commands improve its responses.
Example: First Day with Warp
In the morning you start a project and get a dependency installation error. You attach the error block to your query and the agent points out a missing tool version. In the afternoon you ask for a command that will find all log files older than a week. You approve it after reading, then save it as a workflow with an argument for the number of days.
A day like this shows well how terminal work changes. Commands don’t disappear, searching for them on the internet does. The agent explains the error based on the exact output, and the saved workflow means next time you don’t even need to ask. After a few weeks, your set of saved commands becomes a personal cheat sheet that the agent also uses, because it reads Warp Drive content.
Most Common Mistakes
- Approving commands without reading them.
- Copying errors manually instead of attaching blocks.
- Not saving workflows for commands you type every day.
How to Evaluate Your First Week
After a week, check how many times you searched for a command on the internet versus how many times you asked the agent. If the search engine still wins, try starting with the agent for a few days for every command you don’t remember. Also review the commands you typed most often and save them as workflows. It’s an investment of a few minutes that pays back with each subsequent use.
If you work in a team, show your workflows to others. Shared commands in Warp Drive save time for everyone, and new team members get a ready-made cheat sheet from day one.
Google · Your sourcesQuantslant higher in your Google - one clickAdd to preferred sources →Frequently Asked Questions
How do you switch between terminal mode and agent mode in Warp?
You switch with Cmd + I on Mac or Ctrl + I on Windows and Linux. If automatic recognition is enabled, Warp will recognize a typed question and pass it to the agent - this feature can be disabled in agent settings.
What are workflows in Warp and how do you create them?
A workflow is a saved command with a name, description, and arguments entered in double curly braces. You create one from Warp Drive, from a block’s menu with the save-as-workflow option, or from the agent’s output, and launch it from the command palette.
How do you quickly diagnose a command error using the agent in Warp?
Each error block has an icon in the toolbar with an option to attach the block to your query - you don’t need to manually copy the error to chat. The agent then sees the exact output and can explain what went wrong, which is the fastest way to diagnose compilation or installation errors.
More on this from QUANTSLANT
guides·Brain.fm Use Cases: Deep Work, Study, Open Office & SleepBrain.fm works best when your attention drifts due to environment, not motivation. Here are the situations where the app delivers the most value.

