A modern terminal user interface for the netstat
command, built with Go and Bubble Tea.
- 🎨 Beautiful tabbed interface for different netstat outputs
- ⌨️ Keyboard navigation (arrow keys or vim-style h/l)
- 📊 Interactive tables with scrolling support
- 🎯 Smart column width calculation
- 🔍 Automatic parsing of various netstat formats
go install github.com/nvlanvn/vitalis-monitor@latest
Or build from source:
git clone https://github.com/nvlanvn/vitalis-monitor.git
cd vitalis-monitor
go build -o vitalis-monitor
Run with the same arguments you would pass to netstat:
# Show all connections
vitalis-monitor -a
# Show listening ports
vitalis-monitor -l
# Show network statistics
vitalis-monitor -s
# Show routing table
vitalis-monitor -r
←
/h
- Navigate to previous tab→
/l
- Navigate to next tab↑
/↓
- Navigate table rowsq
/Ctrl+C
/ESC
- Quit
vitalis-monitor/
├── main.go # Application entry point
├── go.mod # Go module definition
├── internal/
│ ├── netstat/ # Netstat command execution
│ │ └── runner.go
│ ├── parser/ # Output parsing logic
│ │ └── parser.go
│ ├── styles/ # UI styling definitions
│ │ └── styles.go
│ └── ui/ # Terminal UI components
│ ├── model.go # Main UI model
│ └── table.go # Table building logic
└── README.md
The application follows a modular architecture with clear separation of concerns:
- Netstat Runner: Executes the netstat command and provides output stream
- Parser: Intelligently parses netstat output into structured sections
- UI Model: Manages application state and user interactions
- Table Builder: Converts parsed data into interactive tables
- Styles: Centralized styling configuration
- Go 1.21 or higher
- netstat command available in PATH
go build -o vitalis-monitor
go test ./...
- New Netstat Formats: Add patterns to
parser.knownSections
and header mappings toparser.headerMappings
- New Styles: Modify the
styles
package - New UI Features: Extend the
ui.Model
with new functionality
Pull requests are welcome! Please ensure:
- Code follows Go conventions
- All tests pass
- New features include tests
- Documentation is updated
MIT License - see LICENSE file for details