<div align="center">
# wsup
### *A beautiful TUI localhost process manager with real-time graphs*
[](https://crates.io/crates/wsup)
[](https://crates.io/crates/wsup)
[](LICENSE)
[](https://github.com/NotKiwy/wsup/stargazers)
[](https://github.com/NotKiwy/wsup/issues)
[](https://www.rust-lang.org/)
[](https://github.com/ratatui-org/ratatui)
[](CONTRIBUTING.md)
---
**wsup** (pronounced "what's up") is a terminal UI for monitoring and managing processes running on localhost ports. Built with Rust and [ratatui](https://github.com/ratatui-org/ratatui).
[Features](#features) •
[Installation](#installation) •
[Usage](#usage) •
[Demo](#demo) •
[Contributing](#contributing)
</div>
## Demo
### Basic Navigation & Sorting
Press `s` to cycle through sort modes, `o` to reverse order

### CLI Flag: --sort
Start with a specific sort mode

### CLI Flag: --filter
Start with processes pre-filtered, or use `/` to search

### Detail View with Live Graphs
Press `Enter` on any process to see real-time metrics

## Quick Start
```bash
# Install
cargo install wsup
# Run
wsup
# Run with options
wsup --sort cpu --filter node
```
## Features
- Live CPU/Memory/Connection graphs with 60-point history
- Sort by Port, CPU, Memory, Connections, or Name
- Filter processes as you type
- Color-coded ports (HTTP, databases, dev servers)
- Kill processes with confirmation
- Vim keybindings (j/k) support
- Auto-refresh every 2 seconds
## Installation
### Via Cargo
```bash
cargo install wsup
```
### From Source
```bash
git clone https://github.com/NotKiwy/wsup.git
cd wsup
cargo install --path .
```
## Usage
### Basic Usage
```bash
# Start wsup
wsup
# Start with specific sort mode
wsup --sort cpu
# Start with a filter
wsup --filter node
# Both together
wsup --sort memory --filter 3000
```
### Keyboard Shortcuts
#### List View
| `↑/k` | Move up |
| `↓/j` | Move down |
| `/` | Search/filter |
| `s` | Cycle sort mode |
| `o` | Toggle sort order (ascending/descending) |
| `Enter` | Show process details |
| `x` or `d` | Kill selected process |
| `r` | Refresh processes |
| `q` | Quit |
#### Detail View
| `Esc` | Back to list |
| `x` | Kill process |
#### Search Mode
| `Type` | Filter processes |
| `Backspace` | Delete character |
| `Esc` or `Enter` | Exit search mode |
## Features Breakdown
### Process List View
- **Port Number** - Color-coded by service type
- **PID** - Process identifier
- **CPU %** - Current CPU usage
- **Memory** - RAM consumption (formatted)
- **Connections** - Active network connections
- **Name** - Process name
- **Command** - Full command with arguments
### Detail View
When you press `Enter` on a process, you get:
- **Process Info** - Name, port, PID, current stats
- **CPU History Graph** - Sparkline showing last 60 data points
- **Memory History Graph** - Visual memory usage trend
- **Connections Graph** - Active connections over time
- **Command Display** - Full command with all arguments
### Port Color Coding
- **Cyan** - HTTP/HTTPS (80, 443, 8080, 8443)
- **Green** - Dev servers (3000-3999)
- **Magenta** - Application servers (5000-5999)
- **Red** - Redis (6379)
- **Blue** - MongoDB (27017, 27018)
- **Light Blue** - PostgreSQL (5432, 5433)
- **Light Magenta** - MySQL (3306)
- **Yellow** - Various servers (8000-8999)
## Technical Details
### Built With
- **[ratatui](https://github.com/ratatui-org/ratatui)** - Terminal UI framework
- **[crossterm](https://github.com/crossterm-rs/crossterm)** - Terminal manipulation
- **[sysinfo](https://github.com/GuillaumeGomez/sysinfo)** - System information
- **[clap](https://github.com/clap-rs/clap)** - CLI argument parsing
### Architecture
- **Rust Edition 2021**
- **Zero unsafe code** - Memory-safe by design
- **250ms event polling, 2s auto-refresh**
- **Process detection** - Uses `lsof` for port mapping
- **CPU metrics** - Direct `ps` command integration
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
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
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
## Contributors
<a href="https://github.com/NotKiwy/wsup/graphs/contributors">
<img src="https://contrib.rocks/image?repo=NotKiwy/wsup" />
</a>
## Stats
<div align="center">



</div>
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Acknowledgments
- Built with [ratatui](https://github.com/ratatui-org/ratatui)
- Inspired by [htop](https://htop.dev/), [bottom](https://github.com/ClementTsang/bottom), and [glances](https://nicolargo.github.io/glances/)
- Terminal recording with [VHS](https://github.com/charmbracelet/vhs)
## Why "wsup"?
**wsup** = "what's up" - A casual way to check on your localhost processes. Quick to type, easy to remember, shows you what's up on your ports.
---
If you find **wsup** useful:
- ⭐ [Star this repository](https://github.com/NotKiwy/wsup/stargazers)
- 🐛 [Report bugs](https://github.com/NotKiwy/wsup/issues/new)
- 💡 [Suggest features](https://github.com/NotKiwy/wsup/issues/new)
- 🔀 [Contribute code](CONTRIBUTING.md)
---
<div align="center">
Made with ❤️ and Rust
[](https://github.com/NotKiwy/wsup)
[](https://x.com/0kiwy)
</div>