portyo
v2.0.0
Published
Port management CLI with PRO features. Find, check, kill, scan ports. bruh.
Maintainers
Readme
portyo
Port management CLI. bruh.
Documentation | Get PRO | Report Bug | All Tools
Install
npm install -g portyoQuick Start
# find a free port
portyo
# 3000
# find 5 free ports
portyo -n 5
# check if port is free
portyo check 3000
# ✓ port 3000 is free. nice.
# kill process on port
portyo kill 3000
# ☠ killed pid 12345 on port 3000. rip.
# list listening ports
portyo list
# scan port range
portyo scan --commonCommands
FREE Commands
| Command | Description | Example |
|---------|-------------|---------|
| find | Find free ports (default) | portyo -n 5 |
| check | Check if port is free | portyo check 3000 |
| kill | Kill process on port | portyo kill 3000 |
| list | List listening ports | portyo list |
| scan | Scan port range | portyo scan -s 3000 -e 4000 |
PRO Commands
| Command | Description | Example |
|---------|-------------|---------|
| watch | Watch port changes in real-time | portyo watch 3000 8080 |
| history | View port activity history | portyo history -d 7 |
| reserve | Reserve ports temporarily | portyo reserve 3000 -t 60 |
| export | Export to JSON/CSV | portyo export -o ports.json |
Get PRO - One-time $6.99, no subscriptions.
Usage
Find Free Ports
# find 1 free port (default)
portyo
# find multiple ports
portyo -n 5
portyo find -n 10
# find in specific range
portyo -s 8000 -e 9000
portyo find --start 8000 --end 9000
# find consecutive ports
portyo find -n 3 --consecutive
# json output for scripts
portyo --json
# {"ports":[3000]}Check Ports
# check single port
portyo check 3000
# ✓ port 3000 is free. nice.
portyo check 22
# ✗ port 22 is taken (pid: 769, sshd). bruh.
# check multiple ports
portyo check 3000 8080 9000
# json output
portyo check 3000 --json
# {"port":3000,"free":true}
# shorthand
portyo -c 3000Kill Processes
# kill process on port
portyo kill 3000
# ☠ killed pid 12345 on port 3000. rip.
# kill on multiple ports
portyo kill 3000 8080 9000
# force kill (SIGKILL)
portyo kill 3000 --force
# shorthand
portyo -k 3000List Listening Ports
# list all listening ports
portyo list
# list in range
portyo list -s 3000 -e 9000
# json/csv output
portyo list --json
portyo list --csvNote: Free tier shows top 10 ports. Upgrade to PRO for unlimited.
Scan Port Range
# scan default range (1-1024)
portyo scan
# scan custom range
portyo scan -s 3000 -e 4000
# scan common ports only
portyo scan --common
# show only open (used) ports
portyo scan --open
# show only closed (free) ports
portyo scan --closedNote: Free tier limited to 100 ports per scan. Upgrade to PRO for unlimited.
Watch Ports (PRO)
# watch single port
portyo watch 3000
# watch multiple ports
portyo watch 3000 8080 9000
# custom check interval (seconds)
portyo watch 3000 -i 5
# with desktop notifications
portyo watch 3000 --notifyPort History (PRO)
# show last 7 days
portyo history
# show last 30 days
portyo history -d 30
# filter by port
portyo history -p 3000
# clear history
portyo history --clearReserve Ports (PRO)
# reserve port
portyo reserve 3000
# reserve with auto-release (60 seconds)
portyo reserve 3000 -t 60
# reserve multiple ports
portyo reserve 3000 8080 9000
# list reserved ports
portyo reserve --list
# release all reserved ports
portyo reserve --release
# release specific port
portyo reserve --release 3000Export Data (PRO)
# export to JSON
portyo export -o ports.json
# export to CSV
portyo export -f csv -o ports.csv
# export common ports
portyo export --common -o common.jsonLicense Management
# show license status
portyo license
# activate PRO license
portyo license --key YOUR_LICENSE_KEY
# deactivate license
portyo license --deactivateOptions Reference
| Option | Description | Default |
|--------|-------------|---------|
| -n, --count | Number of ports to find | 1 |
| -s, --start | Start of range | 3000 |
| -e, --end | End of range | 65535 |
| -c, --check | Check specific port | - |
| -k, --kill | Kill on specific port | - |
| -f, --force | Force kill (SIGKILL) | false |
| -i, --interval | Watch interval (seconds) | 2 |
| -t, --timeout | Reserve timeout (seconds) | 0 |
| -d, --days | History days to show | 7 |
| -o, --output | Output file path | - |
| --json | Output as JSON | false |
| --csv | Output as CSV | false |
| -h, --help | Show help | - |
| -v, --version | Show version | - |
Programmatic API
const portyo = require('portyo');
// Find free ports
const ports = await portyo.findFreePorts(5);
// [3000, 3001, 3002, 3003, 3004]
// Check if port is free
const isFree = await portyo.isPortFree(3000);
// true
// Get process on port
const proc = await portyo.getProcessOnPort(22);
// { pid: '769', process: 'sshd', user: 'root' }
// Kill process on port
await portyo.killProcessOnPort(3000);
// Scan ports
const used = await portyo.scanUsedPorts(1, 1024);
const common = await portyo.scanCommonPorts();Free vs PRO
| Feature | FREE | PRO | |---------|------|-----| | Find free ports | Unlimited | Unlimited | | Check ports | Unlimited | Unlimited | | Kill processes | Unlimited | Unlimited | | List ports | Top 10 | Unlimited | | Scan range | 100 ports | Unlimited | | Daily operations | 15/day | Unlimited | | Watch ports | - | Real-time | | Port history | - | 30 days | | Reserve ports | - | Auto-release | | Export data | - | JSON/CSV | | Price | Free | $6.99 (one-time) |
Get PRO - Unlimited everything. One-time purchase. No subscriptions.
Use in Scripts
# start server on free port
PORT=$(portyo) node server.js
# check before starting
if portyo -c 3000; then
npm start
else
echo "port 3000 is busy"
portyo kill 3000 && npm start
fi
# find consecutive ports for microservices
PORTS=$(portyo find -n 3 --consecutive --json | jq -r '.ports[]')More from bruh.tools
- jsonyo - JSON swiss army knife
- licenseme - Pick a license, bruh
- randumb - Random data generator
- httpwut - HTTP request debugger
- gitstats - Quick git statistics
License
MIT (c) bruh.tools
bruh.tools - no cap, fr fr
