ifrit

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 1 Imported by: 0

README

ifrit

A command-line tool for monitoring network ports and managing processes.

[!NOTE] This is a learning project -- built while picking up Go. Contributions and feedback are welcome.

Install

Requires Go 1.25+.

go install github.com/rizqishq/ifrit@latest

Usage

Watch (interactive TUI)
ifrit watch

Real-time dashboard that auto-refreshes every 2 seconds.

Key Action
j/k or arrows Navigate
x Kill process (with confirmation)
s Cycle sort (port, PID, status, process)
/ Filter
r Refresh
q Quit
ifrit watch --interval 5
List connections
ifrit list
PID      PORT    PROTO   STATUS         PROCESS              USER
────────────────────────────────────────────────────────────────────────
1234     8080    TCP     LISTEN         nginx                www-data
5678     3000    TCP     LISTEN         node                 dev
9012     5432    TCP     ESTABLISHED    postgres             postgres

Total: 3 connections

Filter by protocol, state, or port:

ifrit list --proto tcp
ifrit list --state LISTEN
ifrit list --port 8080
ifrit list --state ESTABLISHED --proto tcp

Output as JSON or CSV:

ifrit list --format json
ifrit list --format csv
ifrit list --state LISTEN --format json
Kill a process
ifrit kill 1234
ifrit kill 1234 --force

Without --force, sends SIGTERM. With --force, sends SIGKILL.

Scan ports
ifrit scan localhost
ifrit scan 192.168.1.1 --ports 80-443
ifrit scan example.com --ports 22-80 --timeout 200

Default range is 1-1024. Timeout is in milliseconds (default 500).

Permissions

Some connections (owned by root or the kernel) will show PID 0 and process -. Run with sudo to see full process information:

sudo ifrit list

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL