官网把 Agent Mode 卖给写代码的人。但它的发动机不挑活:批量重命名加转格式、从一堆日志里捞统计、定期清磁盘、连进数据库改几行、盯一个跑着的 dev server —— 这些手动点来点去的系统、文件、数据活,都能交给它一步步做完(Full Terminal Use 让它能开 psql、vim、REPL 这类交互程序)。这章是全书论点的落点:Warp 是元工具,不只是写代码的终端。The vendor sells Agent Mode to people who write code. But its engine does not care what the work is: batch-rename-and-convert, pull stats out of a pile of logs, clean up disk on a schedule, hop into a database to fix a few rows, watch a running dev server — these manual, click-around system, file, and data jobs can be handed to it step by step (Full Terminal Use lets it drive interactive programs like psql, vim, REPLs). This chapter is where the book's thesis lands: Warp is a meta-tool, not just a terminal for code.
这是全书论点落地的一章。官网把 Agent Mode 演示成改 bug、提 PR,于是你默认它是给写代码的人的。但它的发动机不挑活:找回误删的分支、从一周日志里按小时捞 5xx、批量重命名再转格式、连进数据库回填一列、盯一个跑着的 dev server —— 这些你平时手动点来点去的运维、文件、数据、系统活,底下都是命令行和脚本,照样能一步步交给它。Warp 是元工具,不只是写代码的终端。This is the chapter where the book's thesis lands. The vendor demos Agent Mode as bug fixes and PRs, so you default to thinking it's for people who write code. But its engine doesn't care what the work is: recover a deleted branch, pull 5xx per hour out of a week of logs, batch-rename then convert, hop into a database to backfill a column, watch a running dev server — these manual, click-around ops, file, data, and system jobs are, underneath, command-line and scripts, and can be handed to it step by step all the same. Warp is a meta-tool, not just a terminal for code.
— I
非代码的活,底下也是命令行Non-Code Work Is Command-Line Underneath.
运维、文件、数据、系统任务,剥开都是同一组东西:文件、脚本、CLI 工具。Ops, files, data, system tasks — peeled open, they're the same set of things: files, scripts, CLI tools.找回误删的分支是 git reflog 加 git branch;从日志按小时捞 5xx 是 grep / awk,JSON 日志换成 jq;批量重命名加转格式是 find 加 rename 加 ffmpeg / imagemagick;回填一列数据是连进库跑 UPDATE;清磁盘是 du 加判断。这些你大都会,只是懒得每次现拼参数 —— 而现拼正是 agent 最擅长的。2注 2Note 2Warp Docs · Warp Agents overview —— 本地 agent 嵌在终端里,能写代码、debug、运行命令、自动化开发任务,并使用代码库、Warp Drive 与连接工具上下文;本地 agent 交互运行,云端 agent 后台运行。Warp Docs · Warp Agents overview — local agents are embedded in the terminal and can write code, debug, run commands, automate development tasks, and use codebase, Warp Drive, and connected-tool context; local agents run interactively while cloud agents run in the background.你要会的不再是参数,是把活说清楚。Recovering a deleted branch is git reflog plus git branch; pulling 5xx per hour from logs is grep / awk, or jq for JSON logs; batch-rename-and-convert is find plus rename plus ffmpeg / imagemagick; backfilling a column is connecting to the DB and running UPDATE; clearing disk is du plus judgment. You know most of these — you just don't want to re-assemble the flags each time, and re-assembling is exactly what the agent is best at.2注 2Note 2Warp Docs · Warp Agents overview —— 本地 agent 嵌在终端里,能写代码、debug、运行命令、自动化开发任务,并使用代码库、Warp Drive 与连接工具上下文;本地 agent 交互运行,云端 agent 后台运行。Warp Docs · Warp Agents overview — local agents are embedded in the terminal and can write code, debug, run commands, automate development tasks, and use codebase, Warp Drive, and connected-tool context; local agents run interactively while cloud agents run in the background. What you need to know is no longer the flags — it's stating the job clearly.一件事适不适合 Warp,先看它能不能被命令、文件、脚本、日志、环境变量表达:Whether work belongs in Warp starts with whether it can be expressed as commands, files, scripts, logs, and environment variables:
任务形状Task shape
适合 Warp 的信号Warp-fit signal
切走信号Switch-away signal
运维Ops
日志、服务状态、端口、进程、磁盘、deploy 前检查Logs, service state, ports, processes, disk, pre-deploy checks
正式告警、SLO、长期监控要进监控平台Formal alerts, SLOs, long-term monitoring belong in observability tools
文件Files
重命名、搜索、压缩、转换、diff,可 dry-runRename, search, compress, convert, diff, with dry-run
视觉整理、人工判断分类、不可恢复删除Visual curation, human classification, unrecoverable delete
从 ./logs/nginx/access.log 里统计昨天每小时的 5xx 请求数,
按「小时 → 次数」输出,顺带列出 5xx 最多的前 5 个路径。
先把你打算跑的命令给我看,确认后再跑,别写任何文件。From ./logs/nginx/access.log, count yesterday's 5xx requests per hour,
output as 'hour -> count', and also list the top 5 paths with the most 5xx.
Show me the commands you plan to run first, confirm before running, and don't write any files.
目标:批量处理 <目录/文件模式>,但先不要改任何文件。
要求:
1. 先列出会被处理的前 20 个文件;
2. 给出 dry-run 命令或只打印源路径 -> 目标路径;
3. 说明是否会覆盖、删除、移动;
4. 我确认后才执行真实写入;
5. 执行后给出处理数量、失败数量、可回滚方式。Goal: Batch-process <directory/file pattern>, but do not change files yet.
Requirements:
1. List the first 20 files that would be touched;
2. Provide a dry-run command or print source -> target only;
3. State whether anything will overwrite, delete, or move;
4. Execute real writes only after I confirm;
5. After execution, report processed count, failures, and rollback path.
目标:批量处理 ./assets/raw/*.png,统一转成 80% 质量的 .webp,但先不要改任何文件。
要求:
1. 先列出会被处理的前 20 个文件;
2. 给出 dry-run 命令或只打印源路径 -> 目标路径;
3. 说明是否会覆盖、删除、移动;
4. 我确认后才执行真实写入;
5. 执行后给出处理数量、失败数量、可回滚方式。Goal: Batch-process ./assets/raw/*.png, converting all to .webp at 80% quality, but do not change files yet.
Requirements:
1. List the first 20 files that would be touched;
2. Provide a dry-run command or print source -> target only;
3. State whether anything will overwrite, delete, or move;
4. Execute real writes only after I confirm;
5. After execution, report processed count, failures, and rollback path.
提示词Prompt数据清洗模板Data-cleaning template
读取 <input.csv/input.json>。
先做只读分析:
- 行数 / 字段名 / 缺失值统计;
- 抽样 10 行;
- 你建议的清洗规则。
然后给出一个可复现脚本,把输出写到 <output.tmp>,不要覆盖原文件。
最后用 diff / head / wc 验收。Read <input.csv/input.json>.
First do read-only analysis:
- row count / field names / missing-value stats;
- sample 10 rows;
- cleaning rules you suggest.
Then provide a reproducible script writing to <output.tmp>, without overwriting the original.
Finally verify with diff / head / wc.
读取 ./data/subscribers.csv。
先做只读分析:
- 行数 / 字段名 / 缺失值统计;
- 抽样 10 行;
- 你建议的清洗规则。
然后给出一个可复现脚本,把去掉重复邮箱、统一小写后的结果写到 ./data/subscribers.clean.tmp,不要覆盖原文件。
最后用 diff / head / wc 验收。Read ./data/subscribers.csv.
First do read-only analysis:
- row count / field names / missing-value stats;
- sample 10 rows;
- cleaning rules you suggest.
Then provide a reproducible script that dedupes emails and lowercases them, writing to ./data/subscribers.clean.tmp, without overwriting the original.
Finally verify with diff / head / wc.
— II
Full Terminal Use:它能进交互程序Full Terminal Use: It Can Step Into Interactive Programs.
agent 不止能跑一次性命令,它能进到一个交互程序里,边看边操作 —— 这是它做数据和系统活的关键。The agent doesn't only run one-shot commands — it can step inside an interactive program and operate while watching. That's the key to its data and system work.Full Terminal Use 让它看到实时终端缓冲、向 PTY 写入、应答提示,在运行中的进程里继续 —— 于是它能开 psql 查一段数据、在 Python REPL 里反复试一段清洗、用 vim 改个配置、盯着 dev server 的输出判断起没起来,而你始终在掌控。1注 1Note 1Warp Docs · Full Terminal Use —— agent 能与交互式终端程序协作:看到实时终端缓冲、向 PTY 写入运行命令、应答提示、在运行中的进程里继续工作,支持 psql / mysql 等数据库 shell、gdb 等调试器、vim、Python REPL、dev server,你始终在掌控。Warp Docs · Full Terminal Use — the agent can work with interactive terminal apps: see the live terminal buffer, write to the PTY to run commands, respond to prompts, and keep working inside a running process; supports database shells (psql/mysql), debuggers (gdb), vim, Python REPLs, and dev servers, with you staying in control.很多数据和系统活不是「跑一条命令」,是「进去待着、来回试」—— 这正是它和只会拼一行命令的工具的差别。Full Terminal Use lets it see the live terminal buffer, write to the PTY, respond to prompts, and continue inside a running process — so it can open psql to query some data, iterate on a cleaning step in a Python REPL, edit a config in vim, and watch a dev server's output to judge whether it came up, while you stay in control.1注 1Note 1Warp Docs · Full Terminal Use —— agent 能与交互式终端程序协作:看到实时终端缓冲、向 PTY 写入运行命令、应答提示、在运行中的进程里继续工作,支持 psql / mysql 等数据库 shell、gdb 等调试器、vim、Python REPL、dev server,你始终在掌控。Warp Docs · Full Terminal Use — the agent can work with interactive terminal apps: see the live terminal buffer, write to the PTY to run commands, respond to prompts, and keep working inside a running process; supports database shells (psql/mysql), debuggers (gdb), vim, Python REPLs, and dev servers, with you staying in control. Much data and system work isn't 'run one command' but 'go in, stay, iterate' — which is exactly the difference from a tool that only assembles one line.
# agent 开了一个 psql 会话,先只读地确认范围psql "$DATABASE_URL"=> SELECT count(*) FROM orders WHERE status IS NULL; count------- 1843=> -- 1843 行待回填,先确认样本再决定 UPDATE
agent 进 psql 核一段数据(只读,先看再动)The agent stepping into psql to check data (read-only, look before touching)
— III
什么时候别派给它When Not to Dispatch It.
稳定重复的活该写成脚本,不可逆的活要先空跑 —— 不是什么都现编。Stable, repeated work should become a script; irreversible work needs a dry run first — not everything should be improvised.判断很简单:一件事你每周都做且步骤固定,让 agent 每次现编就是浪费 —— 让它做一次,然后存成 Workflow 或写成脚本挂上 cron,下次直接跑。3注 3Note 3Warp Docs · Workflows —— 把一条参数化命令命名保存,带描述与参数默认值,从命令面板或 Warp Drive 调用,免得重复手敲。Warp Docs · Workflows — name and save a parameterized command with a description and argument defaults, invoked from the command palette or Warp Drive, so frequent commands aren't retyped.碰到批量删除、生产库迁移这种不可逆的,先让它只给命令、空跑(--dry-run 或先 SELECT 再 UPDATE)、你审过再放行。还有一类该交给专用工具:正经的 ETL、备份、监控有成熟的东西,比 agent 每次重搭更稳。元工具的价值是覆盖那条长长的杂活尾巴,不是取代那几件值得专门工具的事。再往外,要去点别的 GUI app —— 网页后台、桌面客户端 —— 那已经出了它的边界,是「边界」那章的事。The call is simple: if you do something weekly with fixed steps, having the agent improvise it each time is waste — have it do it once, then save it as a Workflow or a script on cron and just run it next time.3注 3Note 3Warp Docs · Workflows —— 把一条参数化命令命名保存,带描述与参数默认值,从命令面板或 Warp Drive 调用,免得重复手敲。Warp Docs · Workflows — name and save a parameterized command with a description and argument defaults, invoked from the command palette or Warp Drive, so frequent commands aren't retyped. For the irreversible — bulk deletes, prod migrations — have it show the command, dry-run (--dry-run, or SELECT before UPDATE), and only release after you've reviewed. And one class belongs to dedicated tools: real ETL, backup, and monitoring have mature options steadier than the agent re-building them each time. A meta-tool's value is covering that long tail of odd jobs, not replacing the few things that deserve a dedicated tool. Further out, clicking another GUI app — a web admin panel, a desktop client — is already past its edge, and that's the Boundary chapter.
切到Switch to
信号Signal
普通终端Plain terminal
只跑一两条你已经懂的命令、远程服务器默认环境、离线容器One or two commands you already know, default remote server environment, offline container
脚本 / cron / CIScript / cron / CI
流程稳定、重复、需要审计和失败重试Stable repeated flow needing audit and retries
ETL / BI / NotebookETL / BI / Notebook
数据量大、需要可视化探索、统计假设要反复验证Large data, visual exploration, statistical hypotheses to iterate
核心动作是点击网页或桌面软件Core action is clicking a web or desktop GUI
动手练习 —— 把一件你平时手动做的活整链交出去一次:Hands-on — hand one chore you usually do by hand over the whole chain, once:
01
挑一件手动的系统 / 文件 / 数据活Pick a manual system / file / data chore
例如批量重命名加转格式、从日志捞一周统计、定期清理某个目录、给一张表回填一列。For example batch-rename-and-convert, pull a week of stats from logs, periodically clean a directory, backfill a column in a table.
02
让 Agent Mode 一步步做完,你只审不打Have Agent Mode finish it step by step while you review, not type
给它目标和验收标准,要求先给命令、确认再跑;碰数据先只读核范围。Give it the goal and acceptance criteria, require it show commands and confirm before running; for data, read-only first to confirm scope.
03
把跑通的过程存成 Workflow 或 NotebookSave the working run as a Workflow or Notebook
存进 Warp Drive,下次一句话或一键再来 —— 沉淀那章会教怎么存好。Save it into Warp Drive so next time is one sentence or one click — the Distill chapter shows how to save it well.
04
记下它替你省的事,和你不放心自动跑的那一步Note what it saved you, and the step you won't let auto-run
写清:它省下了什么、哪一步你不放心让它自动跑、为什么。那条「为什么」就是你之后在「管住它」那章设权限的依据。Write down: what it saved, which step you won't let it auto-run, and why. That 'why' is your basis for setting permissions in the Keep It in Check chapter.