Show HN:Proc-CLI —— 一款面向 Agent 友好的进程与端口管理 CLI 工具
英文标题:🔶 Show HN: Proc-CLI – An agent-friendly CLI tool for process and port management
开发者 yazeedaloyoun 在 Hacker News 上推出了开源命令行工具 Proc-CLI,专为进程与端口管理设计。该工具特别针对 AI Agent 及开发者日常运维场景进行了语义化封装,将繁琐脆弱的 lsof、ps 和 kill 管道组合命令浓缩为如 proc on、proc why、proc free 等直观指令。此外,它还提供了诸如查找项目遗留孤儿进程等传统 Unix 工具难以一步实现的功能,有助于显著减少 Agent 交互时的上下文占用并降低操作出错率。
打开原文相关 3 · 机会 2
中文
⬆️ 14 点赞 | 💬 2 条评论 | 作者:yazeedaloyoun
端口 3000 上运行着什么?
- 传统方式:
lsof -i :3000 -P -n - Proc 方式:
proc on :3000
它为什么会在那里?(溯源父进程链)
- 传统方式:执行
lsof -i :3000,随后沿着进程树逐步执行ps -o ppid= - Proc 方式:
proc why :3000
释放端口
- 传统方式:
lsof -t -i:3000 | xargs kill && sleep 1 && lsof -i:3000 - Proc 方式:
proc free :3000
等待进程退出
- 传统方式:
while ps aux | grep node | grep -v grep; do sleep 5; done - Proc 方式:
proc wait node
暂停进程
- 传统方式:
kill -STOP $(pgrep node) - Proc 方式:
proc freeze node
查找遗留进程
- 传统方式:无标准工具
- Proc 方式:
proc orphans --in .
English / 原文
What's on port 3000?lsof -i :3000 -P -n``proc on :3000
Why is it there?lsof -i :3000, then ps -o ppid= up the chainproc why :3000
Free the portlsof -t -i:3000 | xargs kill && sleep 1 && lsof -i:3000``proc free :3000
Wait for it to exitwhile ps aux | grep node | grep -v grep; do sleep 5; done``proc wait node
Pause a processkill -STOP $(pgrep node)``proc freeze node
Find leftoversNo standard toolproc orphans --in .