A fast CLI tool for finding available network ports for development. GMAP automatically finds safe, available ports and copies them to your clipboard.
- Smart Port Detection: Automatically finds available ports avoiding system ports and common service ports
- Clipboard Integration: Automatically copies port(s) to clipboard
- Safe Port Ranges: Avoids problematic ports (0-1023, common service ports)
- Fast: Uses Bun for efficient port checking
- Multiple Ports: Request multiple ports at once with a single command
# Install dependencies
bun install
# Build the CLI
bun run build
# Copy to PATH (optional)
cp dist/gmap /usr/local/bin/Find a single available port:
gmapFind multiple available ports:
gmap --count 3
# or
gmap -c 5Show help message:
gmap --help
# or
gmap -hShow version:
gmap --version
# or
gmap -v| Option | Alias | Description | Default |
|---|---|---|---|
--count <number> |
-c |
Number of ports to find | 1 |
--help |
-h |
Show help message | - |
--version |
-v |
Show version | - |
GMAP automatically avoids:
- System ports (0-1023): Reserved for system services
- Common service ports: Well-known ports like 3000, 5432, 6379, 27017, 8080, etc.
This prevents conflicts with databases, web servers, and other common development tools.
- Single port: The port number alone (e.g.,
1024) - Multiple ports: Comma-separated list (e.g.,
1024,1034,1035)
Built with:
- Bun - Fast JavaScript runtime
- Commander.js - CLI framework
- Chalk - Terminal styling
- Boxen - Box styling
- Clipboardy - Clipboard access
MIT