How vercel/hyper works
Hyper is an extensible Electron terminal. A user launches the desktop app, which creates a window and loads the renderer; the renderer initializes configuration and presents terminal sessions, while session actions request shell sessions through RPC. The main process also supplies menus, configuration, plugin management, notifications, and CLI integration. The graph includes the documented extension capability and the major session, terminal, and UI layers. Some cross-process wiring and unsampled subsystems are shown only where the available references support them; uncertain links are omitted.
Main entry points: index.ts Electron startup · index.tsx Renderer bootstrap · config.ts App configuration · plugins.ts Plugin manager
Components 18
Desktop process
- Electron startup
app/index.ts - Window lifecycle
app/ui/window.ts - Menus and commands
app/menus/menu.ts - CLI integration
app/utils/cli-install.ts - Main RPC
app/rpc.ts - Desktop notifications
app/notify.ts
Renderer interface
- Renderer bootstrap
lib/index.tsx - Hyper interface
lib/containers/hyper.tsx - Session actions
lib/actions/sessions.ts - Session state
lib/reducers/sessions.ts - Terminal views
lib/components/terms.tsx - Terminal component
lib/components/term.tsx
Terminal sessions
- PTY session
app/session.ts
Configuration and extensions
- App configuration
app/config.ts - Config paths
app/config/paths.ts - Plugin manager
app/plugins.ts - Renderer plugins
lib/utils/plugins.ts
Other components
- User
Connections 16
- User → Electron startup: launches
README.md - Electron startup → Window lifecycle: creates windows
app/index.ts - Electron startup → Menus and commands: creates menu
app/index.ts - Electron startup → CLI integration: installs CLI
app/index.ts - Electron startup → App configuration: initializes config
app/index.ts - Electron startup → Plugin manager: exposes plugins
app/index.ts - App configuration → Config paths: uses paths
app/config.ts - Renderer bootstrap → Hyper interface: renders
lib/index.tsx - Renderer bootstrap → Session actions: dispatches actions
lib/index.tsx - Session actions → Main RPC: requests sessions
lib/actions/sessions.ts - Renderer bootstrap → Session state: updates state
- Hyper interface → Terminal views: renders
lib/containers/hyper.tsx - Terminal views → Terminal component: renders terminals
- PTY session → App configuration: reads profile
app/session.ts - Plugin manager → Config paths: uses paths
app/plugins.ts - Renderer plugins → Plugin manager: integrates plugins
lib/utils/plugins.ts