Smart Port Detection
Automatically detect which ports are in use and identify the processes using them. No more guessing or manual checks.
Simplify Your Development Workflow with Intelligent Port Management
Stop wasting time on port conflicts. Port Keeper automatically manages your local development ports, detects conflicts before they happen, and helps your team collaborate seamlessly. Available as both CLI and GUI with full cross-platform support.
# Install Port Keeper globally
npm install -g portkeeper
# Reserve a port for your project
portman reserve 3000 --name "my-api" --desc "API server"
# Check port status instantly
portman check 3000
# Launch the GUI
portman gui
Everything you need to manage ports like a pro
Automatically detect which ports are in use and identify the processes using them. No more guessing or manual checks.
Reserve ports for specific projects with descriptions and tags. Prevent conflicts before they happen.
Use the powerful CLI for automation or the beautiful desktop GUI for visual management. Your choice.
Full JSON output support for scripting and AI agent integration. Built for modern DevOps workflows.
Export and share port configurations with your team. Keep everyone on the same page.
Built with SQLite for instant performance. No external dependencies or slow network calls.
portman --help
to see all commandsportman reserve 3000 --name "my-app"
portman gui
Check if a port is free, reserved, or in use
# Check port status
portman check 3000
# JSON output
portman check 3000 --json
Reserve a port for a project
# Reserve with description
portman reserve 3000 -n "my-api" -d "API server"
# With tags
portman reserve 3000 -n "my-api" -t "backend,prod"
List all reserved and in-use ports
# List all ports
portman list
# Filter by status
portman list -s reserved
# Filter by project
portman list -p "api"
Release reserved ports
# Release single port
portman release 3000
# Release multiple
portman release 3000 3001 3002
Scan for all active ports
# Scan all ports
portman scan
# JSON output for automation
portman scan --json
Request multiple available ports
# Request 3 sequential ports
portman request 3 -n "microservices"
# Request random ports
portman request 5 -n "tests" -r
Kill process using a port
# Kill process on port
portman kill 3000
# Force kill without confirmation
portman kill 3000 -f
Export and import configurations
# Export to file
portman export -o config.json
# Import from file
portman import config.json
Display AI agent instructions
# Human-readable guide
portman ai
# Machine-readable JSON
portman ai --json
portman gui
Opens the Port Keeper desktop application
📊 Dashboard Screenshot
🔍 Scan View Screenshot
Port Keeper is designed for automation with comprehensive JSON support
#!/bin/bash
# Check if port is available
STATUS=$(portman check 3000 --json | jq -r '.status')
if [ "$STATUS" = "free" ]; then
portman reserve 3000 -n "my-app" --json
fi
# Get all ports for a project
PORTS=$(portman list -p "my-app" --json | jq -r '.[].number')
echo "Project ports: $PORTS"
import subprocess
import json
def check_port(port):
result = subprocess.run(
['portman', 'check', str(port), '--json'],
capture_output=True, text=True
)
return json.loads(result.stdout)
def request_ports(count, name):
result = subprocess.run(
['portman', 'request', str(count), '-n', name, '--json'],
capture_output=True, text=True
)
return json.loads(result.stdout)
# Usage
status = check_port(3000)
if status['status'] == 'free':
ports = request_ports(3, 'my-service')
print(f"Allocated: {[p['number'] for p in ports['ports']]}")
const { exec } = require('child_process');
const util = require('util');
const execPromise = util.promisify(exec);
async function getPorts(project) {
const { stdout } = await execPromise(
`portman list -p "${project}" --json`
);
return JSON.parse(stdout);
}
async function releaseAll(project) {
const ports = await getPorts(project);
const numbers = ports.map(p => p.number).join(' ');
if (numbers) {
const { stdout } = await execPromise(
`portman release ${numbers} --json`
);
return JSON.parse(stdout);
}
}
// Usage
releaseAll('old-project').then(console.log);
# GitHub Actions Example
- name: Setup Test Ports
run: |
# Request ports for testing
PORTS=$(portman request 5 -n "ci-${{ github.run_id }}" --json)
echo "TEST_PORTS=$PORTS" >> $GITHUB_ENV
- name: Run Tests
run: npm test
- name: Cleanup Ports
if: always()
run: |
# Extract port numbers and release
NUMBERS=$(echo $TEST_PORTS | jq -r '.ports[].number' | tr '\n' ' ')
portman release $NUMBERS --json
{
"port": 3000,
"status": "reserved",
"projectName": "my-api",
"description": "API server"
}
[
{
"number": 3000,
"projectName": "my-api",
"status": "reserved",
"reservedAt": "2025-07-26T10:00:00.000Z"
}
]
Reserve multiple ports for your services with one command:
portman request 5 --name "microservices" --sequential
Share port configurations with your team:
portman export team-ports.json
git add team-ports.json && git commit -m "Update ports"
Automate port management in your pipelines:
PORTS=$(portman request 3 --name "ci-test" --json)
# Run tests with reserved ports
portman release $(echo $PORTS | jq -r '.ports[].number')
npm install -g portkeeper
portman check 3000
portman reserve 3000 -n "my-app" -d "Dev server"
npm run dev
Share port configurations with your team:
# Export current setup
portman export -o team-ports.json
# Commit to repo
git add team-ports.json
git commit -m "Add port configuration"
# Team member imports
git pull
portman import team-ports.json
Request multiple ports for microservices:
# Request 5 sequential ports
portman request 5 -n "microservices" -d "Service cluster"
# Output:
# Allocated: 3000, 3001, 3002, 3003, 3004
# Use in docker-compose.yml
# service1: ${PORT_3000:-3000}
# service2: ${PORT_3001:-3001}
Integrate into your development workflow:
// package.json
{
"scripts": {
"predev": "portman check 3000 || exit 1",
"dev": "next dev -p 3000",
"postdev": "portman release 3000"
}
}
Use descriptive project names:
api-server
✅frontend-dev
✅test
❌p1
❌Tag ports for better organization:
portman reserve 3000 -n "api" -t "backend,prod"
portman reserve 3001 -n "api" -t "backend,dev"
Use auto-release for temporary ports:
portman reserve 3000 -n "test-server" -a
Clean up unused reservations:
# List all reserved ports
portman list -s reserved
# Release unused ones
portman release 3000 3001
"Port Keeper saved our team hours every week. No more port conflicts!"
- Sarah Chen, Full Stack Developer
"The GUI is beautiful and the CLI is powerful. Best of both worlds."
- Mike Johnson, DevOps Engineer
"Finally, a port manager that just works. Essential tool for any developer."
- Emma Davis, Tech Lead
Join thousands of developers who've simplified their workflow with Port Keeper