Package Exports
- @kaori-killer/port
- @kaori-killer/port/src/cli.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@kaori-killer/port) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@kaori-killer/port
A simple CLI tool for checking running ports and killing processes.
Installation
Global Installation (Recommended)
npm install -g @kaori-killer/portLocal Installation
npm install @kaori-killer/portUsage
Global Installation
After global installation, you can use the port command from anywhere:
port ls
port check 3000
port kill 3000Local Installation
With local installation, use npx or yarn:
Using npx:
npx port ls
npx port check 3000
npx port kill 3000Using yarn:
yarn port ls
yarn port check 3000
yarn port kill 3000Why Use port?
Direct Commands vs port
| Task | Direct Command | port |
|---|---|---|
| List Ports | lsof -i -P -n | grep LISTEN |
port ls |
| Check Port | lsof -i :3000 -P -n |
port check 3000 |
| Kill Process | lsof -ti :3000 | xargs kill |
port kill 3000 |
Key Benefits
- Simple Commands: Intuitive
portcommands instead of complexlsofsyntax - Readable Output: Formatted tables instead of raw data
- Friendly Error Handling: Clear messages when processes are not found
- Consistent Structure: All operations follow the
port <action>pattern - Kill Confirmation: Automatic confirmation messages after process termination
Development
Lint
npm run lintAuto-fix
npm run lint:fixFormat
npm run formatRun
npm startLicense
MIT