How penso/herdr-gpui works
Herdr GPUI is a native desktop client for an already-installed Herdr daemon. A user opens a window for a local or remote session; the client connects to the daemon, exchanges framed protocol messages, and the GUI renders terminal surfaces and sends input while the daemon retains session state. The application also exposes session management, provider usage reporting, GitHub and repository workflows, configuration, notifications, and updates. The README documents the GUI–client–protocol boundary; sampled source supports the session worker and several feature modules, but not every UI-to-service call, so uncertain wiring is omitted.
Main entry points: window.rs Window and terminal UI · lib.rs Client connection · app.rs App bootstrap · session.rs Session state
Components 25
Desktop UI
- App bootstrap
crates/herdr-gpui/src/app.rs - Window and terminal UI
crates/herdr-gpui/src/window.rs - Terminal rendering
crates/herdr-gpui/src/terminal.rs - Workspace sidebar
crates/herdr-gpui/src/sidebar.rs - Configuration
crates/herdr-gpui/src/config.rs - Notifications and sound
crates/herdr-gpui/src/notifications.rs
Daemon connection
- Client connection
crates/herdr-client/src/lib.rs - Endpoint discovery
crates/herdr-client/src/discovery.rs - Session state
crates/herdr-client/src/session.rs - Session catalog
crates/herdr-client/src/sessions.rs - Wire protocol
crates/herdr-protocol/src/lib.rs
Developer workflows
- Worktrees and Git
crates/herdr-gpui/src/worktree.rs - Issues and pull requests
crates/herdr-gpui/src/repo_items.rs - Pull request details
crates/herdr-gpui/src/pull_request.rs - Agent task context
crates/herdr-gpui/src/repo_items/context.rs
Account services
- GitHub sign-in
crates/herdr-gpui/src/github.rs - Usage reporting
crates/herdr-gpui/src/usage/service.rs - Usage providers
crates/herdr-gpui/src/usage/providers.rs - App updater
crates/herdr-gpui/src/updater.rs
Other components
- User
- Herdr daemon
- Terminal processes
- GitHub
- AI service providers
- Release service
Connections 24
- User → App bootstrap: launches
- App bootstrap → Window and terminal UI: opens window
- Window and terminal UI → Client connection: connects and inputs
- Client connection → Endpoint discovery: discovers endpoint
- Client connection → Session state: runs worker
- Session state → Wire protocol: exchanges frames
- Wire protocol → Herdr daemon: sends and receives
- Herdr daemon → Terminal processes: owns sessions
- Window and terminal UI → Terminal rendering: renders surface
- User → Session catalog: manages sessions
- User → Workspace sidebar: browses workspaces
- User → Configuration: sets preferences
- User → Notifications and sound: receives alerts
- User → Worktrees and Git: works with checkouts
- User → Issues and pull requests: browses repository items
- User → Pull request details: views pull requests
- Issues and pull requests → Agent task context: writes checkout context
- User → GitHub sign-in: signs in
- GitHub sign-in → GitHub: authenticates and fetches
- User → Usage reporting: views usage
- Usage reporting → Usage providers: dispatches probes
- Usage providers → AI service providers: fetches account usage
- User → App updater: checks for updates
- App updater → Release service: checks releases