https://github.com/dancer/npm-namer
https://github.com/dancer/npm-namer
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dancer/npm-namer
- Owner: dancer
- License: mit
- Created: 2024-09-06T22:30:35.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-06T22:53:31.000Z (almost 2 years ago)
- Last Synced: 2025-01-02T17:50:14.065Z (over 1 year ago)
- Language: JavaScript
- Size: 243 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Check NPM Names
 
A simple command-line tool to check if package names are available on [npmjs.com](https://npmjs.com). It reads names from a file and outputs the available names into a separate file.
## Features
- ⚡️ **Fast & Efficient**: Uses a progress bar to show status as names are checked.
- 🎨 **Colored Output**: Easily see which names are available (in green) and which aren't (in red).
- 📝 **File-based Input/Output**: Reads package names from a text file and saves available names to a new file.
## Installation
1. Clone the repository:
```bash
git clone https://github.com/dancer/NPM-Namer.git
cd check-npm-names
```
2. Install the dependencies:
```bash
npm install
```
## Usage
1. Create a text file (`package-names.txt`) and list the package names you want to check, one name per line:
```
package-name-1
package-name-2
package-name-3
```
2. Run the script:
```bash
node check-npm-names.js
```
3. The script will generate a file named `available-names.txt` with all the available names.
## Example
```bash
Checking 3 names from package-names.txt...
███████████████████ 100% | 3/3
package-name-1: Available
package-name-2: Not Available
package-name-3: Available
2 available names saved to available-names.txt
```
## Customization
- **Input File**: By default, the script looks for a file named `package-names.txt`. You can modify this in the code to use a different input file.
- **Output File**: Available names are saved to `available-names.txt`. This can also be changed in the script as needed.
## Dependencies
- [npm-name](https://www.npmjs.com/package/npm-name) — Check npm package name availability
- [chalk](https://www.npmjs.com/package/chalk) — Terminal string styling for colored output
- [cli-progress](https://www.npmjs.com/package/cli-progress) — Progress bar for the terminal
- [p-limit](https://www.npmjs.com/package/p-limit) — Controls the concurrency of asynchronous tasks
- [fs/promises](https://nodejs.org/api/fs.html#fspromises)
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
**Made with ❤️ by [DxD](https://github.com/dancer)**