
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
🚀 简单的 npm dev 命令后台管理工具
devctl 是一个轻量级的命令行工具,可以将你的 npm run dev 命令置于后台运行,并提供简单的管理命令。让你在开发时不再被占用终端,同时自动记录开发服务器的日志输出。
npm run dev 置于后台,释放终端# 全局安装(推荐)
npm install -g devctl
# 或者在项目中安装
npm install --save-dev devctl
# 启动开发服务器(后台运行)
devctl start
# 查看服务器状态
devctl status
# 查看实时日志
devctl logs
# 停止服务器
devctl stop
# 重启服务器
devctl restart
| 命令 | 描述 |
|---|---|
devctl start | 后台启动 npm run dev |
devctl stop | 停止开发服务器 |
devctl restart | 重启开发服务器 |
devctl status | 查看服务器运行状态 |
devctl logs | 查看实时日志 |
启动开发服务器:
devctl start
输出示例:
🚀 正在启动开发服务器...
✅ 开发服务器已启动!
📝 进程ID: 12345
📄 日志文件: ./logs/dev.log
查看状态:
devctl status
输出示例:
✅ 开发服务器正在运行
📝 进程ID: 12345
📄 日志文件: ./logs/dev.log
🕐 运行时间: 01:23:45
查看日志:
devctl logs
这会实时显示开发服务器的输出日志。
devctl 会在项目根目录创建一个 logs 文件夹:
logs/
├── dev.log # 开发服务器日志
└── dev.pid # 进程ID文件
dev.log:记录 npm run dev 的所有控制台输出dev.pid:存储当前运行的进程IDdevctl start 执行 npm run dev 并将其置于后台logs/dev.log 文件logs/dev.pid 文件如果你的开发服务器提示端口被占用,这是正常的,因为 devctl 不控制端口分配,它只是代理执行 npm run dev 命令。
Warning: Process not found, cleaning up PID file
这是正常的清理行为,重新启动即可:
devctl start
确保对项目目录有写权限,以便创建 logs 文件夹。
# 克隆项目
git clone <repository-url>
cd devctl
# 安装依赖
npm install
# 构建项目
npm run build
# 链接到全局(用于测试)
npm link
# 运行所有检查(推荐在提交前运行)
npm run check
# 单独运行各项检查
npm run typecheck # TypeScript 类型检查
npm run lint # ESLint 代码检查
npm run test # 运行测试
# 代码格式化
npm run format # 格式化所有代码
npm run format:check # 检查格式化状态
# 修复 ESLint 问题
npm run lint:fix
本项目使用 Husky + lint-staged 确保代码质量。提交代码时会自动:
# 添加文件到暂存区
git add .
# 提交(会自动触发检查)
git commit -m "feat: 添加新功能"
本项目采用 MIT 许可证。
FAQs
A simple background process manager for npm dev commands
The npm package devctl receives a total of 12 weekly downloads. As such, devctl popularity was classified as not popular.
We found that devctl demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.