New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-bins

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-bins

Fast create global commands by nodejs.

latest
Source
npmnpm
Version
2.8.2
Version published
Weekly downloads
40
29.03%
Maintainers
1
Weekly downloads
 
Created
Source

node-bins

Fast create global commands by nodejs.🥰

How to use

Install

npm install node-bins -g

Use

1、Create a folder, and run npm init or pnpm init or yarn init in this folder to create a 'package.json' file.

2、Create your command source code file (js, cjs, mjs, ts) under this folder, which contains all your command logic. Note that you need to write this code on the first line - '#!/usr/bin/env node'. For example

#!/usr/bin/env node

console.log('test node bins----1111')

3、Run create-bin in this folder. You can see

截屏2023-06-20 22.12.14.png

Yes! Your global nodejs command is create, you can run the command you created from anywhere !!! 🤪

You can unleash your creativity by writing cooler and more creative global script commands to operate your project and improve code efficiency.

This is a demo

node-bins-demo

Something new

Here are some built-in commands to choose from -

🎈 1. bins --help: Display Help Information.

🎈 2. bins --list: Check which commands are currently managed by 'node-bins'.

🎈 3. create-bin: Create a custom command for the corresponding file in the corresponding script folder.

🎈 4. delete-bin <deleteBinName>: Delete the custom commands you have already created in node-bins.

Keywords

node-bins

FAQs

Package last updated on 16 Aug 2023

Did you know?

Socket

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.

Install

Related posts