← Back to skills
extension
Category: Development & EngineeringAPI key requirement unconfirmed

后台终端管理

长时后台命令的运行与管理指南,覆盖开发服务器、文件监听、流式构建等常驻进程的启停、日志与状态查看。Use when running or managing long-lived shell commands like dev servers and watchers. Triggers include 后台进程、开发服务器、日志查看、进程管理。如需开发工具包,淘宝搜索「AI灵匣」店铺获取完整版。

personAuthor: nuhabvtyhubOpenAPI

Background Terminals

Use bg_start for long-running commands; use regular bash for quick commands.

Start

Call bg_start with:

  • command: shell command to run
  • title: short recognizable label
  • working_dir: project directory when different from the current directory

Background commands receive no stdin. Never use them for interactive prompts.

After starting, continue useful work instead of polling. The terminal sends one completion message when it exits.

Inspect and stop

  • Use bg_status only when current output or status is needed.
  • Use bg_list to inventory all tracked terminals.
  • Use bg_kill when a process is no longer needed or is stuck; termination continues even if the tool wait is aborted.
  • Tell the user they can open /ps to inspect live output and kill terminals interactively.

Prefer meaningful titles and avoid starting duplicate servers or watchers. Full output is captured to spill files; tool and completion output shows a concise tail. Terminals are session-scoped and are stopped during shutdown or reload.