A modern CLI tool to identify and manage processes using network ports.
Built with Go for speed, clarity, and zero runtime dependencies.

brew tap doganarif/tap
brew install pf
Download the latest .exe file from the Releases Page:
pf-windows-amd64.exepf-windows-arm64.exeRename it to pf.exe and add to your PATH.
go install github.com/doganarif/portfinder/cmd/portfinder@latest
This installs the binary as pf.
Grab the latest release from the Releases Page.
pf 3000
Output:
🔍 Port 3000 is in use by:
Process node
PID 48291
Command npm run dev
Project ~/projects/my-react-app
Started 3 hours ago
Kill this process? [y/n]
pf check
Example output:
📊 Common Development Ports:
Frontend:
❌ 3000: node (my-react-app)
✅ 3001: free
✅ 4200: free
❌ 5173: vite (my-vue-app)
✅ 8080: free
Backend:
✅ 4000: free
❌ 5000: python (flask-api)
✅ 8000: free
✅ 9000: free
Databases:
✅ 3306: free
❌ 5432: postgres (docker)
❌ 6379: redis
✅ 27017: free
pf list
pf kill 3000
| Port | Common Use |
|---|---|
| 3000 | React, Node.js, Rails |
| 3001 | Create React App fallback |
| 4200 | Angular |
| 5173 | Vite |
| 5000 | Flask, Python servers |
| 8000 | Django |
| 8080 | General web development |
| 3306 | MySQL/MariaDB |
| 5432 | PostgreSQL |
| 6379 | Redis |
| 27017 | MongoDB |
| 9200 | Elasticsearch |
| 9090 | Prometheus |
| 3100 | Grafana Loki |
| 8983 | Solr |
You can override the default list of common ports by creating a config file at:
~/.config/portfinder/config.json
Example:
{
"common_ports": [3000, 3001, 5173, 5000, 8000]
}
# Clone the repository
git clone https://github.com/doganarif/portfinder.git
cd portfinder
# Build
make build
# Run tests
make test
# Install locally
make install
pf/
├── cmd/
│ └── portfinder/ # CLI entry point
├── internal/
│ ├── config/ # Configuration management
│ ├── process/ # Process detection logic
│ └── ui/ # Terminal UI components
├── Makefile # Build automation
└── README.md # This file
Contributions are welcome! Please open an issue or pull request.
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License — see the LICENSE file.
Arif Doğan
If you find this tool useful, please consider giving it a ⭐️ on GitHub!
$ claude mcp add portfinder \
-- python -m otcore.mcp_server <graph>