README.md

April 3, 2026 Β· View on GitHub

Aperture

Diagnostic tui for Windows power users



Quick Navigation

Installation (standalone/portable)

Download and run the latest release (1 MB executable)

That's all! Run as admin to access all features.

If you want to run the aperture command from any terminal:

Just move Aperture.exe to a folder that is already in your user's PATH
Then restart your terminal and run aperture from anywhere!

Installation (package managers)

WinGet

winget install aperture

Scoop

Scoop requires 100 GitHub stars or 2000 downloads to be in their Extras bucket, for now please use this installation command:
scoop install https://raw.githubusercontent.com/stylebending/scoop-bucket/refs/heads/main/bucket/Aperture.json

Chocolatey

choco install aperture

Installing with these package managers automatically adds Aperture to your path. After running one of those installation commands, just close and re-open your terminal and you'll immediately be able to run aperture from any terminal.

Usage

aperture

Screenshots

Locker Tab - Process Management

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Aperture [Locker] [Controller] [Nexus] β”‚ Keys              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β†’ Find and kill processes holding file β”‚ Navigation        β”‚
β”‚   locks                                β”‚ j/k     Move      β”‚
β”‚                                        β”‚ ↑/↓     Move      β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ C-d/u   Page      β”‚
β”‚ β”‚ Processes (Locker) [CPUβ–Ό] [45/230] β”‚ β”‚ Tab     SwitchTab β”‚
β”‚ β”‚                                    β”‚ β”‚                   β”‚
β”‚ β”‚ 1234  chrome.exe   15.2%   245.6MB β”‚ β”‚ Actions           β”‚
β”‚ β”‚ 5678  firefox.exe   8.1%   189.2MB β”‚ β”‚ /       Search    β”‚
β”‚ β”‚ 9012  notepad.exe   0.5%     4.2MB β”‚ β”‚ s/S     Sort      β”‚
β”‚ β”‚ 3456  code.exe      3.2%    56.8MB β”‚ β”‚ f       FindLocks β”‚
β”‚ β”‚ 7890  explorer.exe  2.1%    78.3MB β”‚ β”‚ K       Kill      β”‚
β”‚ β”‚ ...                                β”‚ β”‚ r       Refresh   β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ Esc     ClearFilt β”‚
β”‚ Sort: CPU β–Ό                            β”‚                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Controller Tab - Service Management

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ ... [Controller] ...                   β”‚ Keys              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β†’ Start, stop, and manage Windows      β”‚ Navigation        β”‚
β”‚   services                             β”‚ j/k     Move      β”‚
β”‚                                        β”‚ ...               β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚                   β”‚
β”‚ β”‚ Services (Controller) [Statusβ–²]    β”‚ β”‚ Actions           β”‚
β”‚ β”‚                                    β”‚ β”‚ /       Search    β”‚
β”‚ β”‚ Windows Update        Running ...  β”‚ β”‚ s/S     Sort      β”‚
β”‚ β”‚ Print Spooler         Running ...  β”‚ β”‚ Enter   Toggle    β”‚
β”‚ β”‚ Bluetooth Service     Stopped ...  β”‚ β”‚ r       Refresh   β”‚
β”‚ β”‚ ...                                β”‚ β”‚ Esc     ClearFilt β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚                   β”‚
β”‚ Sort: Status β–²                         β”‚                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

File Lock Search Modal

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Find Locking Processes         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Path: C:\Users\Me\Documents\file.txt   β”‚
β”‚                                        β”‚
β”‚   Locking processes:                   β”‚
β”‚                                        β”‚
β”‚     PID:   5678  notepad.exe           β”‚
β”‚   β–Ά PID:   9012  chrome.exe            β”‚
β”‚     PID:  12345  excel.exe             β”‚
β”‚                                        β”‚
β”‚ [/] Edit Path  [Enter] Search          β”‚
β”‚ [j/k] Navigate  [K] Kill  [Esc] Close  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Note: Press / to enter input mode and type a file path. Enter a folder path to scan all files in that directory.

Acknowledgements

This project wouldn't be possible without:

  • Rust - Systems programming language making Windows API access safe and fast
  • ratatui - The beautiful terminal user interface framework powering Aperture
  • crossterm - Cross-platform terminal manipulation and event handling
  • tokio - The asynchronous runtime enabling responsive UI updates
  • windows-rs - Microsoft's official Windows API bindings for Rust
  • Vim / Neovim - For the motion-based navigation philosophy

Quick Start Guide

Find What's Locking a File

Can't delete a file because it's "in use"? Aperture can find the culprit:

  1. Press f to open the File Lock Search modal
  2. Press / to enter input mode
  3. Type the full path to the file (e.g., C:\Users\You\file.txt)
  4. Press Enter to search
  5. See which processes have the file locked
  6. Navigate with j/k and press K to kill the process (requires admin)

Tip: Enter a folder path to scan all files in that directory and find all locks.

Kill a Runaway Process

  1. Switch to Locker tab (press Tab until you see "Locker")
  2. Sort by CPU usage: Press s until title shows "CPU", then S to toggle direction
  3. Find the process using high CPU
  4. Press K to kill it (requires admin privileges)

Manage Services

  1. Switch to Controller tab
  2. Sort by Status: Press s until title shows "Status"
  3. Find the service you want to control
  4. Press Enter to toggle start/stop (requires admin)

View Process Tree

See hierarchical process relationships (parent/child):

  1. Switch to Locker tab
  2. Press t to toggle Tree View
  3. Navigate the tree with j/k
  4. Press Space to expand/collapse nodes (> / v indicators)
  5. Search/filter still works in tree view - shows matching processes and their ancestor chain

View Process Details

See detailed information about a process:

  1. Switch to Locker tab
  2. Navigate to a process with j/k
  3. Press d to open Process Details modal
  4. View loaded modules, parent PID, CPU, and memory usage
  5. Press K in the modal to kill the process (requires admin)
  6. Press Esc or q to close

Export Data

Export all data to JSON or CSV format:

  1. Press e to open the Export modal
  2. Press j to export as JSON
  3. Press c to export as CSV
  4. Files are saved to your Documents folder with timestamps
  5. Press Esc or q to cancel

Export includes: All processes, services, and network connections from all tabs

  • Press / to enter search mode
  • Type to filter the current list
  • Press Enter to apply the filter and exit search mode
  • Press Esc to clear the filter

Example workflow:

  1. In Locker tab, press /
  2. Type "chrome" - list filters to show only Chrome processes
  3. Navigate with j/k
  4. Press Esc to clear filter and see all processes again
  • j/k or ↑/↓ - Move one item at a time
  • Ctrl+D - Page down (jump 10 items)
  • Ctrl+U - Page up (jump 10 items)
  • gg - Jump to first item
  • G - Jump to last item
  • Tab/Shift+Tab - Switch between tabs

Sort Data

Each tab supports different sorting:

Locker (Processes):

  • Press s to cycle: Name β†’ PID β†’ CPU β†’ Memory
  • Press S (Shift+s) to toggle ascending/descending
  • Default: CPU descending (highest first)

Controller (Services):

  • Press s to cycle: Name β†’ Status β†’ Type
  • Press S to toggle order
  • Default: Status ascending (Running first)

Nexus (Connections):

  • Press s to cycle: State β†’ PID β†’ Protocol β†’ Process
  • Press S to toggle order
  • Default: State ascending (ESTABLISHED first)

Keybindings

CategoryKeyActionContextDescription
NavigationTab / Shift+TabSwitch tabsGlobalMove between Locker/Controller/Nexus
j / kNavigateListsMove down/up one item
↑ / ↓NavigateListsAlternative to j/k
Ctrl+DPage downListsJump down 10 items
Ctrl+UPage upListsJump up 10 items
ggJump to firstListsJump to first item
GJump to lastListsJump to last item
Actions/Toggle searchGlobalEnter/exit search mode
EscClear/CancelGlobalClear filter, exit search, or close modal
sCycle sortGlobalChange sort key (Name, PID, Status, etc.)
S (Shift+s)Toggle orderGlobalSwitch ascending/descending
rRefreshGlobalForce refresh current tab
fFind locksGlobalOpen file lock search modal
eExportGlobalOpen export format modal
LockertTree viewLocker onlyToggle hierarchical process tree view
SpaceExpand/CollapseLocker onlyExpand/collapse tree node (tree mode only)
dDetailsLocker onlyShow process details modal
KKill processLocker onlyKill selected process (admin)
ControllerEnterToggle serviceController onlyStart/stop selected service (admin)
File Lock Modal/Edit pathModalEnter input mode to type path
EnterSearchModalExecute search
j/kNavigateModalMove up/down results
KKillModalKill selected locking process
SystemqQuitGlobalExit application

Search Mode Keybindings

When in search mode (/):

  • Type characters to filter
  • Backspace - Delete last character
  • Enter - Apply filter and exit search
  • Esc - Cancel search

File Lock Search Modal

When file lock modal is open (f):

  • Type file paths (one per line)
  • / - Enter input mode to edit path (any key including j/k can now be typed)
  • Enter - Search for locking processes
  • j/k or ↑/↓ - Navigate results (normal mode only)
  • K - Kill selected process (admin)
  • Esc - Close modal (or cancel input mode)

Directory Scanning:

  • Enter a folder path to scan all files in that directory
  • Shows "Scanned X files - Found Y locks" with the count of files checked

Export Modal

When export modal is open (e):

  • j - Export to JSON format
  • c - Export to CSV format
  • Esc or q - Close modal without exporting

Export Location: Files are saved to your Documents folder with timestamps (e.g., aperture_export_1234567890.json)

Process Details Modal

When process details modal is open (d in Locker tab):

  • View process information: PID, name, parent PID, CPU%, memory
  • View loaded modules (first 10, with count of additional modules)
  • K - Kill the process (requires admin)
  • Esc or q - Close modal

Configuration

Aperture currently uses sensible defaults optimized for real-time performance:

SettingDefaultDescription
Data refresh interval2 secondsHow often to poll for new data
Navigation debounce50msDelay after navigation before accepting updates
CPU metrics interval1 secondHow often to update CPU/memory usage

Note: Configurable polling intervals are on the roadmap. Currently, these values are optimized for smooth real-time performance without overwhelming the system.

Performance

Aperture is designed for real-time performance on Windows:

Smart Update System

  • Change Detection: Uses data hashing to only update when data actually changes
  • Navigation Debounce: 50ms delay after navigation prevents cursor jumping during active use
  • Separate Concerns: Filter operations apply instantly; only navigation triggers debounce
  • Cached Metrics: CPU and memory values are cached to prevent flashing during temporary data unavailability

Data Loading

  • Preload All Tabs: Data for all tabs loads at startup, enabling instant tab switching
  • Background Updates: All tabs refresh every 2 seconds in the background
  • Initial Load Bypass: First data load happens immediately without debounce

Why Not WMI?

Aperture uses direct Win32 APIs instead of WMI for maximum performance:

  • WMI queries can take 500ms-2s per call
  • Win32 APIs respond in <50ms
  • Essential for smooth TUI experience with 2-second refresh rates

Architecture

aperture/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main.rs          # Entry point, event loop, keybindings
β”‚   β”œβ”€β”€ app.rs           # Application state, tab management
β”‚   β”œβ”€β”€ ui/              # UI rendering
β”‚   β”‚   β”œβ”€β”€ mod.rs       # Layout, sidebar, status bar
β”‚   β”‚   β”œβ”€β”€ locker.rs    # Process tab UI with sorting
β”‚   β”‚   β”œβ”€β”€ controller.rs # Services tab UI with sorting
β”‚   β”‚   └── nexus.rs     # Network tab UI with sorting
β”‚   β”œβ”€β”€ sys/             # Windows API abstractions
β”‚   β”‚   β”œβ”€β”€ process.rs   # Process enumeration, CPU/memory metrics
β”‚   β”‚   β”œβ”€β”€ service.rs   # SCM/Service control
β”‚   β”‚   β”œβ”€β”€ network.rs   # IP Helper/TCP-UDP connections
β”‚   β”‚   └── handle.rs    # File lock detection (Restart Manager)
β”‚   └── state/           # Per-tab state with sorting
β”‚       β”œβ”€β”€ locker.rs    # Process state, PID tracking
β”‚       β”œβ”€β”€ controller.rs # Service state, name tracking
β”‚       └── nexus.rs     # Connection state, key tracking
β”œβ”€β”€ Cargo.toml
└── README.md

Win32 APIs Used

FeatureAPI
Process EnumerationEnumProcesses, QueryFullProcessImageNameW, CreateToolhelp32Snapshot, Process32FirstW
Process Tree/Parent PIDCreateToolhelp32Snapshot, Process32FirstW/NextW
Process MetricsGetProcessTimes, GetProcessMemoryInfo
Process DetailsEnumProcessModules, GetModuleBaseNameW, GetModuleFileNameExW
Elevation CheckOpenProcessToken, GetTokenInformation
Service ManagementOpenSCManagerW, EnumServicesStatusExW, ControlService
Network Connections (IPv4)GetExtendedTcpTable, GetExtendedUdpTable
Network Connections (IPv6)GetExtendedTcpTable (AF_INET6), GetExtendedUdpTable (AF_INET6)
File Lock DetectionRmRegisterResources, RmGetList (Restart Manager)

Roadmap

Completed βœ…

  • Process management with CPU/memory metrics
  • Handle search using Restart Manager API
  • Service management (start/stop)
  • Network connection monitoring (IPv4 + IPv6)
  • Smart sorting and filtering
  • Persistent sidebar with keybindings
  • Real-time navigation debounce (50ms)
  • Change detection and smart updates
  • Cached metrics to prevent flashing
  • Process tree view - Hierarchical parent/child relationships with expand/collapse
  • Process details view - Show loaded modules, parent PID, and process info
  • Export to JSON/CSV - Export all tab data with timestamps
  • IPv6 support - Full IPv6 TCP/UDP connection monitoring

In Progress / TODO

  • Real-time service status notifications via NotifyServiceStatusChange
    • Currently polls every 2s; would show instant service state changes
  • Configurable polling intervals
    • Allow users to change 2s refresh rate

Aperture bridges the gap between the Linux btop/lsof experience and Windows' deep diagnostic capabilities (Processes, Services, and Network). Unlike cross-platform tools, Aperture focuses on Windows-specific pain points: file locks, service management, and process-to-socket mapping.

Features

The Locker (Process Management)

  • View all running processes with PID, name, path, CPU%, and memory usage
  • Real-time CPU and memory metrics with intelligent caching
  • Sort by: Name, PID, CPU usage, Memory usage
  • Filter processes by name, path, or PID
  • Kill processes (requires admin - press K)
  • Find file locks - Identify which processes are locking specific files (press f)
  • Process tree view - Hierarchical parent/child relationships (press t)
  • Process details - View loaded modules and detailed info (press d)

The Controller (Service Management)

  • List all Windows services with status, start type, and process ID
  • Start/Stop services (requires admin - press Enter)
  • Sort by: Name, Status, Service Type
  • Filter services by name or display name

The Nexus (Network Monitor)

  • Real-time TCP/UDP connection listing (IPv4 and IPv6)
  • Map connections to process PIDs and names
  • View connection states (ESTABLISHED, LISTENING, etc.)
  • Sort by: Connection State, PID, Protocol, Process Name
  • Filter connections by address, port, PID, or process name

UI Features

  • Vim Motions keybindings for easy navigation
  • Permanent sidebar with context-aware keybindings
  • Smart data caching - All tabs preload for instant switching
  • 50ms navigation debounce - Smooth cursor movement without jitter
  • Change detection - Only updates when data actually changes
  • Cached metrics - CPU/memory values persist during temporary data unavailability
  • Export data - Save all tab data to JSON or CSV (press e)

License

MIT