How jramirez-codes/nex works
nex is a GPU-rendered desktop terminal for Linux and macOS, combining terminal sessions with tabs, split panes, file browsing, Git changes, and SSH-aware workflows. The main user path runs from keyboard/mouse actions through app state and pane layout to terminal execution and rendering. Separate branches cover explorer operations, remote session following and uploads, agent visibility, and saved sessions. README and excerpts support the principal capabilities; some subsystem links are omitted where sampled source does not establish their caller.
Main entry points: workspace/mod.rs Tabs and panes · app/mod.rs App frame · file_explorer/mod.rs File explorer · terminal/mod.rs Terminal surface
Components 26
App and workspace
- App frame
src/app/mod.rs - User actions
src/app/actions.rs - Keyboard and mouse
src/app/input/keyboard.rs - Tabs and panes
src/app/workspace/mod.rs - Split tree
src/layout.rs - Configuration
src/config.rs - Session restore
src/session/mod.rs
Terminal runtime
- Terminal surface
src/terminal/mod.rs - Scrollback search
src/terminal/search.rs - PTY and shell
src/terminal/mod.rs
SSH workflows
- SSH tracking
src/remote/mod.rs - Remote execution
src/remote/exec.rs - Remote uploads
src/remote/upload.rs - nex host service
nex-host/src/main.rs
Workspace tools
- File explorer
src/file_explorer/mod.rs - Explorer view
src/file_explorer/view/mod.rs - File operations
src/file_explorer/fs/ops.rs - File transfer
src/file_explorer/fs/transfer.rs - Git changes
src/git_diff/mod.rs - Agent overview
src/agents/mod.rs
Rendering and platform
- GPU terminal paint
src/render/mod.rs - Window chrome and UI
src/ui/widgets.rs - OS services
src/platform/mod.rs
Other components
- Desktop user
- Local filesystem
- SSH server
Connections 27
- Desktop user → Keyboard and mouse: presses keys
- Keyboard and mouse → User actions: dispatches actions
- User actions → Tabs and panes: changes panes
src/app/actions.rs - Tabs and panes → Split tree: lays out panes
- App frame → Tabs and panes: draws workspace
src/app/mod.rs - App frame → Configuration: loads settings
src/app/mod.rs - App frame → Session restore: restores state
src/app/mod.rs - Tabs and panes → Terminal surface: hosts terminals
- Terminal surface → PTY and shell: runs shell
src/terminal/mod.rs - Terminal surface → GPU terminal paint: provides snapshots
src/render/mod.rs - App frame → Scrollback search: handles search
src/app/actions.rs - Terminal surface → SSH tracking: tracks SSH pane
src/terminal/mod.rs - SSH tracking → Remote execution: runs remote commands
src/remote/exec.rs - Remote execution → SSH server: connects over SSH
- SSH tracking → Remote uploads: coordinates uploads
src/remote/mod.rs - Remote uploads → SSH server: sends files
- Remote execution → nex host service: uses host service
- Tabs and panes → File explorer: hosts Files pane
src/file_explorer/mod.rs - File explorer → Explorer view: provides explorer state
src/file_explorer/view/mod.rs - File explorer → File operations: performs operations
- File explorer → File transfer: handles transfers
src/file_explorer/input/mod.rs - File operations → Local filesystem: reads and writes
- Tabs and panes → Git changes: hosts Changes pane
- Tabs and panes → Agent overview: hosts Agents pane
- File explorer → OS services: opens local files
src/file_explorer/mod.rs - GPU terminal paint → Window chrome and UI: uses paint utilities
- App frame → OS services: uses OS services
src/app/mod.rs