SkillAgentSearch skills...

Netscope

NetScope is a powerful network and process monitoring tool inspired by `top` and `netstat`. It allows you to view established connections, listening connections, running processes, and interact with the processes, such as killing them.

Install / Use

/learn @yodabytz/Netscope
About this skill

Quality Score

0/100

Category

Operations

Supported Platforms

Universal

README

NetScope 2.0.15

NetScope is a powerful network and process monitoring tool inspired by htop and netstat. It lets you inspect established and listening connections, browse running processes, view per-interface network statistics, and interact with them in a fast, keyboard-friendly UI. It features a theming system with truecolor backgrounds (OSC 11) when supported, automatic 256-color/16-color fallbacks, and runtime theme switching (t). Themes can be supplied as JSON in /etc/netscope/themes/*.json; the default blue theme remains available out of the box.

Recent Changes

  • v2.0.15: Multi-color distro logos and expanded OS support.
    • 58 distro/OS logos with per-character color rendering (up from 12 with single-color-per-line). Logos include Alpine, Amazon, Android, Arch, Artix, ArcoLinux, Bedrock, BlackArch, CentOS, Clear Linux, CRUX, Darwin/macOS, Debian, Deepin, Devuan, DragonFly, Elementary, EndeavourOS, Fedora, FreeBSD, Garuda, Gentoo, Guix, Hyperbola, Kali, KDE Neon, Kubuntu, Linux Mint, LMDE, Lubuntu, Mageia, Manjaro, MX, NetBSD, NixOS, OpenBSD, openSUSE, Parabola, Parrot, Pop!_OS, Puppy, Raspbian, Red Hat, Slackware, Solus, SteamOS, Tails, Trisquel, Ubuntu, Ubuntu Budgie, Ubuntu MATE, Ubuntu Studio, Void, Windows, Windows 10, Xubuntu, Zorin, and more.
    • --distro flag: Preview any distro logo with netscope --distro "Arch". Case-insensitive with substring matching.
    • Multi-color logos for Ubuntu, Darwin, Linux Mint, CentOS, Windows, EndeavourOS, Raspbian, and others render with proper brand colors.
    • Includes tools/convert_neofetch.py one-time converter for importing additional logos from neofetch.
  • v2.0.14: Security hardening, bug fixes, and theme corrections.
    • Security: Hardened ASCII art module loading to prevent arbitrary code execution via environment variables or CWD. Added process ownership checks before kill. Sanitized user search input and environment variable validation.
    • Bug fixes: Fixed system info cache rebuilding every refresh tick. Fixed process selection highlighting. Fixed keystrokes ignored in system info screen. Removed dead code and duplicate help popup. Fixed snap package count going negative.
    • Themes: Corrected 11 of 15 themes to match official canonical color palettes.
    • Robustness: Popups no longer crash on small terminals. Network stats screen handles missing psutil gracefully. Fixed macOS AF_PACKET crash.
  • v2.0.13: Fixed a crash in the connection details popup that occurred when the process command was too long for the screen.

Features

  • Established Connections: View all established network connections with PID, program, user, and bytes sent/received.
  • Listening Connections: View all listening network connections.
  • Both Connections View: View both established and listening connections in a split-pane layout.
  • Running Processes: View and interact with running processes. Sort by CPU (c), memory (m), PID (p), or user (u) with ascending/descending toggle.
  • Network Statistics: Per-interface network stats with real-time throughput (bytes/sec).
  • System Info: Neofetch-style display with distro logo, OS, kernel, uptime, packages, shell, resolution, DE/WM, CPU, GPU, RAM, and disk usage. 58 distro/OS logos with multi-color rendering.
  • Distro Preview: Use --distro "name" to preview any distro logo regardless of your current OS.
  • Process Search: Press s to search for running processes, and n to navigate to the next match. Selection sticks to the matched process across refreshes.
  • Kill Processes with Confirmation: Press k to kill the selected process with a confirmation prompt and ownership verification.
  • Ignore Processes: Press i to exclude processes from all views. Persisted across sessions.
  • 16 Built-in Themes: Nord, Dracula, Gruvbox, Tokyo Night Moon, Catppuccin Frappe, Everforest Dark/Light, Kanagawa, Moonlight, Monokai Pro, Nightfox, Oxocarbon, Zenbones Dark/Light, Cthulhain, and the default Blue.
  • Help Menus: Press ? to display context-specific help menus with key bindings and navigation instructions.
  • Smooth Scrolling: Efficient scrolling with acceleration on held keys.
  • Mac OS X Support: Supports Mac OS X (tested on Intel chips). Requires sudo privileges.

Requirements

  • Python 3.x
  • psutil library
  • curses library

Screenshot

NetScope in action, running the Tokyo Night theme

<img src="https://raw.githubusercontent.com/yodabytz/netscope/refs/heads/main/Screenshot-1.jpg?raw=true" width="600"> <img src="https://raw.githubusercontent.com/yodabytz/netscope/refs/heads/main/Screenshot-2.jpg?raw=true" width="600"> <img src="https://raw.githubusercontent.com/yodabytz/netscope/refs/heads/main/Screenshot-3.jpg?raw=true" width="600">

Installation Steps

  1. Clone the Repository:

    git clone https://github.com/yodabytz/netscope.git
    cd netscope
    
  2. Install Dependencies:

    pip install psutil
    
  3. Create Directories and Move Files:

    sudo mkdir -p /etc/netscope/themes
    sudo cp ascii_art.py /etc/netscope/
    sudo cp -r themes /etc/netscope/
    
  4. Move the Script to /usr/bin:

    sudo cp netscope.py /usr/bin/netscope
    sudo chmod +x /usr/bin/netscope
    

    For Mac OS X, place the script in /usr/local/bin instead.

Usage

netscope [options]

Options:
  -d <seconds>        Update interval (default: 3)
  -t, --theme <name>  Theme from /etc/netscope/themes (default: blue)
  --distro <name>     Preview a specific distro logo (e.g., --distro Ubuntu)
  -h                  Show help
  -v                  Show version

Examples:
  netscope                          # Start with defaults
  netscope -d 5                     # Update every 5 seconds
  netscope -t tokyo-night           # Start with Tokyo Night Moon theme
  netscope -t dracula -d 2          # Dracula theme, 2 second refresh
  netscope --distro Arch            # Preview the Arch Linux logo
  netscope --distro "Linux Mint"    # Preview the Linux Mint logo

Controls

Global

t              : Open theme dialog
q / Esc        : Quit / go back
Left / Backspace : Return to main menu
?              : Show context-specific help

General Navigation

Up/Down or k/j : Navigate through lists and menu options
Enter          : Select a menu option or view details
l              : View the list of ignored processes

Connections Screens (Established / Listening / Both)

Up/Down or k/j : Scroll through connections
s              : Filter connections
i              : Ignore the selected connection's process
Enter          : View connection details
Tab            : Switch sections (Both view only)

Running Processes Screen

Up/Down or j   : Scroll through processes
k              : Kill the selected process (with confirmation)
i              : Ignore the selected process
s              : Search for a process
n              : Next search match
c/m/p/u        : Sort by CPU / Memory / PID / User (toggle asc/desc)

Network Statistics Screen

Up/Down or k/j : Scroll through interfaces
h              : Toggle hide/show inactive interfaces
Enter          : View interface details

Ignored Processes Screen

Up/Down or k/j : Scroll through ignored processes
u              : Unignore the selected process

License

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

Author NetScope 2.0 is developed by Yodabytz.

Contributions, issues, and feedback are welcome!

View on GitHub
GitHub Stars5
CategoryOperations
Updated10d ago
Forks0

Languages

Python

Security Score

85/100

Audited on Mar 21, 2026

No findings