agent-tail
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseagent-tail
agent-tail
Pipes browser console output and dev server stdout/stderr to plain log files on disk so you can , , and read them directly.
greptail将浏览器控制台输出及开发服务器的stdout/stderr输出写入磁盘上的纯文本日志文件,方便你直接使用、命令查看或检索日志。
greptailReading logs
查看日志
bash
grep -ri "error\|warn" tmp/logs/latest/
tail -50 tmp/logs/latest/browser.log
tail -f tmp/logs/latest/*.logbash
grep -ri "error\|warn" tmp/logs/latest/
tail -50 tmp/logs/latest/browser.log
tail -f tmp/logs/latest/*.logLog files
日志文件
Logs live in (a symlink to the newest session directory, stable across restarts):
tmp/logs/latest/| File | Source |
|---|---|
| Browser |
| stdout/stderr of a named service (CLI) |
| All services interleaved, prefixed with |
日志存储在目录下(该目录是指向最新会话目录的符号链接,重启后仍保持稳定):
tmp/logs/latest/| 文件 | 来源 |
|---|---|
| 浏览器 |
| 命名服务的stdout/stderr输出(CLI模式) |
| 所有服务的日志合并输出,每条日志前缀为 |
Log format
日志格式
[HH:MM:SS.mmm] [LEVEL ] message (source-url)
stack trace indented with 4 spacesLevels are uppercased and padded to 7 characters (, , ).
LOG WARN ERROR [HH:MM:SS.mmm] [LEVEL ] message (source-url)
stack trace indented with 4 spaces日志级别为大写格式,且填充至7个字符长度(如、、)。
LOG WARN ERROR CLI
命令行界面(CLI)
bash
agent-tail run 'fe: npm run dev' 'api: uv run server' # run multiple services
agent-tail wrap api -- uv run fastapi-server # add to existing session
agent-tail init # create session onlyFlags (work with all commands):
--log-dir <dir> Log directory (default: tmp/logs)
--max-sessions <n> Max sessions to keep (default: 10)
--no-combined Don't write combined.log
--exclude <pattern> Exclude lines matching pattern (repeatable, /regex/ or substring)
--mute <name> Mute service from terminal + combined.log (still logs to <name>.log)See for full details.
references/cli-reference.mdbash
agent-tail run 'fe: npm run dev' 'api: uv run server' # 运行多个服务
agent-tail wrap api -- uv run fastapi-server # 加入现有会话
agent-tail init # 仅创建会话参数(适用于所有命令):
--log-dir <dir> 日志目录(默认:tmp/logs)
--max-sessions <n> 保留的最大会话数(默认:10)
--no-combined 不生成combined.log
--exclude <pattern> 排除匹配指定规则的日志行(可重复使用,支持正则/regex/或子字符串)
--mute <name> 屏蔽指定服务的终端输出及combined.log记录(仍会写入<name>.log)完整详情请查看。
references/cli-reference.mdSetup
安装配置
bash
npm install -D agent-tail- CLI (any stack): Add to your dev script
agent-tail run 'name: command' - Vite: See
references/setup-vite.md - Next.js: See (config wrapper + layout script + API route)
references/setup-nextjs.md
bash
npm install -D agent-tail- CLI(任意技术栈): 在你的开发脚本中添加
agent-tail run 'name: command' - Vite: 请查看
references/setup-vite.md - Next.js: 请查看(包含配置包装器、布局脚本及API路由)
references/setup-nextjs.md
Agent instructions
Agent使用说明
Add to your project's , , or equivalent:
CLAUDE.md.cursorrulesmarkdown
undefined将以下内容添加到项目的、或同类文件中:
CLAUDE.md.cursorrulesmarkdown
undefinedDev Logs
开发日志
All dev server output is captured to . The latest session
is symlinked at .
tmp/logs/tmp/logs/latest/When debugging, check logs before guessing about runtime behavior:
grep -ri "error\|warn" tmp/logs/latest/
tail -50 tmp/logs/latest/browser.logundefined所有开发服务器输出都会被捕获到目录下。最新的会话日志通过符号链接指向。
tmp/logs/tmp/logs/latest/调试时,请先查看日志,再推测运行时行为:
grep -ri "error\|warn" tmp/logs/latest/
tail -50 tmp/logs/latest/browser.logundefined.gitignore
Git忽略配置
Add to . agent-tail warns on startup if the log directory isn't gitignored.
tmp/.gitignore将添加到文件中。如果日志目录未被Git忽略,agent-tail启动时会发出警告。
tmp/.gitignore