Skip to content

Repository files navigation

πŸš€ PortMan TUI

CI npm version License: MIT

A beautiful, modern Terminal User Interface (TUI) for managing ports on your system. Kill processes, find free ports, and monitor active connections - all with a stunning interface.

PortMan TUI Demo

✨ Features

  • 🎨 Beautiful TUI - Modern interface with gradients, animations, and smooth interactions
  • πŸ” Real-time Search - Filter ports by number, process name, or PID
  • ⚑ Kill Processes - Interactive process termination with confirmation
  • πŸ”Ž Find Free Ports - Quickly locate available ports in a range
  • πŸ”„ Auto-refresh - Live monitoring of active ports
  • 🌍 Cross-platform - Works on macOS, Linux (Ubuntu, Debian, Fedora, Arch), and Windows
  • ⌨️ Keyboard Navigation - Full keyboard control for power users

πŸ“¦ Installation

Global Installation (Recommended)

npm install -g portman-tui

Run without Installing

npx portman-tui

Local Installation

npm install portman-tui

πŸš€ Usage

Launch TUI

portman

Quick Commands

# List all active ports
portman list

# Kill process on specific port
portman kill 3000

# Find available port
portman find

# Find port in specific range
portman find --range 3000-4000

⌨️ Keyboard Shortcuts

Key Action
/ Enter search mode
↑ ↓ Navigate port list
← β†’ Toggle kill confirmation
Enter Select/Confirm
ESC Go back/Cancel
Q Quit application

🎯 Use Cases

Development

  • Quickly find which process is using port 3000
  • Free up ports when switching between projects
  • Monitor multiple services running simultaneously

DevOps

  • Check port conflicts on servers
  • Identify rogue processes
  • Quick port management in CI/CD pipelines

System Administration

  • Monitor network services
  • Troubleshoot port binding issues
  • Clean up orphaned processes

πŸ› οΈ Requirements

  • Node.js >= 18.0.0
  • Operating System: macOS, Linux, or Windows
  • Permissions: May require sudo/admin rights to kill certain processes

πŸ“‹ Platform-Specific Notes

macOS

Uses lsof command (pre-installed). No additional setup required.

Linux (Ubuntu/Debian/Fedora/Arch)

Uses lsof, ss, or netstat (usually pre-installed). If not available:

# Ubuntu/Debian
sudo apt-get install lsof net-tools

# Fedora/RHEL
sudo dnf install lsof net-tools

# Arch
sudo pacman -S lsof net-tools

Windows

Uses built-in netstat and tasklist commands. No additional setup required.

πŸ—οΈ Development

Setup

# Clone repository
git clone https://github.com/sidgaikwad/portman.git
cd portman

# Install dependencies
npm install

# Run in development mode
npm run dev

Scripts

npm run build        # Build TypeScript
npm run dev          # Run with tsx
npm run lint         # Run ESLint
npm run lint:fix     # Fix linting issues
npm run format       # Format code with Prettier
npm run format:check # Check formatting
npm run type-check   # TypeScript type checking
npm run clean        # Clean build directory

Project Structure

portman/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ cli.tsx              # CLI entry point
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ App.tsx          # Main application component
β”‚   β”‚   β”œβ”€β”€ Header.tsx       # Header with branding
β”‚   β”‚   β”œβ”€β”€ PortList.tsx     # Port listing component
β”‚   β”‚   β”œβ”€β”€ SearchBar.tsx    # Search interface
β”‚   β”‚   β”œβ”€β”€ KillConfirmation.tsx  # Kill dialog
β”‚   β”‚   └── Footer.tsx       # Keyboard shortcuts footer
β”‚   └── utils/
β”‚       └── portUtils.ts     # Port management logic
β”œβ”€β”€ .github/
β”‚   └── workflows/
β”‚       β”œβ”€β”€ ci.yml           # CI pipeline
β”‚       └── release.yml      # Release automation
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
└── README.md

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please make sure to:

  • Follow the existing code style
  • Run npm run lint and npm run format before committing
  • Add tests for new features
  • Update documentation as needed

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Built with Ink - React for CLIs
  • Inspired by modern TUI design principles
  • Thanks to all contributors!

πŸ› Issues

Found a bug? Have a feature request? Please open an issue.

πŸ“§ Contact

Your Name - @yourtwitter - your.email@example.com

Project Link: https://github.com/sidgaikwad/portman


Made with ❀️ by Your Name

About

No description, website, or topics provided.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages