
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
hello-node-cli
Advanced tools
使用 node 编写 cli 工具
给执行权限:chmod +x index.js
#!/usr/bin/env node
文件第一行,然后 ./index.js 相当于 node index.js
jack命令,然后执行node ./index.js,如何设置?packages.json 添加bin
"bin":{
"jack": "index.js"
},
在控制台执行 jack 就是执行
node ./index.js
执行试试: jack
提示zsh: command not found: jack, 如何解决? 把 npm 添到全局。
npm link 会将本 npm 依赖添加到全局 node_modules 里,再jack, jack 命令变绿。
npm rm -g pkg-name
npm publish --tag demo
FAQs
使用 node 编写 cli 工具
The npm package hello-node-cli receives a total of 8 weekly downloads. As such, hello-node-cli popularity was classified as not popular.
We found that hello-node-cli demonstrated a not healthy version release cadence and project activity because the last version was released 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
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.