# vercel/hyper architecture

> Architecture diagram of the GitHub repository vercel/hyper, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vercel/hyper
- Repository: https://github.com/vercel/hyper

## Overview

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: [`app/index.ts`](https://github.com/vercel/hyper/blob/canary/app/index.ts) (Electron startup), [`lib/index.tsx`](https://github.com/vercel/hyper/blob/canary/lib/index.tsx) (Renderer bootstrap), [`app/config.ts`](https://github.com/vercel/hyper/blob/canary/app/config.ts) (App configuration), [`app/plugins.ts`](https://github.com/vercel/hyper/blob/canary/app/plugins.ts) (Plugin manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop process"]
  node_main["Electron startup<br/>[index.ts]"]
  node_window["Window lifecycle<br/>[window.ts]"]
  node_menus["Menus and commands<br/>[menu.ts]"]
  node_cli["CLI integration<br/>[cli-install.ts]"]
  node_rpc["Main RPC<br/>[rpc.ts]"]
  node_notify["Desktop notifications<br/>[notify.ts]"]
end

subgraph group_renderer["Renderer interface"]
  node_renderer["Renderer bootstrap<br/>[index.tsx]"]
  node_container["Hyper interface<br/>[hyper.tsx]"]
  node_actions["Session actions<br/>[sessions.ts]"]
  node_state["Session state<br/>[sessions.ts]"]
  node_terms["Terminal views<br/>[terms.tsx]"]
  node_term["Terminal component<br/>[term.tsx]"]
end

subgraph group_sessions["Terminal sessions"]
  node_session["PTY session<br/>[session.ts]"]
end

subgraph group_extensions["Configuration and extensions"]
  node_config["App configuration<br/>[config.ts]"]
  node_configpaths["Config paths<br/>[paths.ts]"]
  node_plugins["Plugin manager<br/>[plugins.ts]"]
  node_pluginrenderer["Renderer plugins<br/>[plugins.ts]"]
end

node_user(("User"))

node_user -->|"launches"| node_main
node_main -->|"creates windows"| node_window
node_main -->|"creates menu"| node_menus
node_main -->|"installs CLI"| node_cli
node_main -.->|"initializes config"| node_config
node_main -->|"exposes plugins"| node_plugins
node_config -->|"uses paths"| node_configpaths
node_renderer -->|"renders"| node_container
node_renderer -->|"dispatches actions"| node_actions
node_actions -->|"requests sessions"| node_rpc
node_renderer -.->|"updates state"| node_state
node_container -->|"renders"| node_terms
node_terms -.->|"renders terminals"| node_term
node_session -->|"reads profile"| node_config
node_plugins -.->|"uses paths"| node_configpaths
node_pluginrenderer -.->|"integrates plugins"| node_plugins

click node_main "https://github.com/vercel/hyper/blob/canary/app/index.ts"
click node_window "https://github.com/vercel/hyper/blob/canary/app/ui/window.ts"
click node_menus "https://github.com/vercel/hyper/blob/canary/app/menus/menu.ts"
click node_cli "https://github.com/vercel/hyper/blob/canary/app/utils/cli-install.ts"
click node_config "https://github.com/vercel/hyper/blob/canary/app/config.ts"
click node_configpaths "https://github.com/vercel/hyper/blob/canary/app/config/paths.ts"
click node_plugins "https://github.com/vercel/hyper/blob/canary/app/plugins.ts"
click node_pluginrenderer "https://github.com/vercel/hyper/blob/canary/lib/utils/plugins.ts"
click node_renderer "https://github.com/vercel/hyper/blob/canary/lib/index.tsx"
click node_container "https://github.com/vercel/hyper/blob/canary/lib/containers/hyper.tsx"
click node_actions "https://github.com/vercel/hyper/blob/canary/lib/actions/sessions.ts"
click node_state "https://github.com/vercel/hyper/blob/canary/lib/reducers/sessions.ts"
click node_terms "https://github.com/vercel/hyper/blob/canary/lib/components/terms.tsx"
click node_term "https://github.com/vercel/hyper/blob/canary/lib/components/term.tsx"
click node_session "https://github.com/vercel/hyper/blob/canary/app/session.ts"
click node_rpc "https://github.com/vercel/hyper/blob/canary/app/rpc.ts"
click node_notify "https://github.com/vercel/hyper/blob/canary/app/notify.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_window,node_menus,node_cli,node_rpc,node_notify,node_user toneBlue
class node_renderer,node_container,node_actions,node_state,node_terms,node_term toneAmber
class node_session toneMint
class node_config,node_configpaths,node_plugins,node_pluginrenderer toneRose
```

## Components

### Desktop process

- [Electron startup](https://github.com/vercel/hyper/blob/canary/app/index.ts): `app/index.ts`
- [Window lifecycle](https://github.com/vercel/hyper/blob/canary/app/ui/window.ts): `app/ui/window.ts`
- [Menus and commands](https://github.com/vercel/hyper/blob/canary/app/menus/menu.ts): `app/menus/menu.ts`
- [CLI integration](https://github.com/vercel/hyper/blob/canary/app/utils/cli-install.ts): `app/utils/cli-install.ts`
- [Main RPC](https://github.com/vercel/hyper/blob/canary/app/rpc.ts): `app/rpc.ts`
- [Desktop notifications](https://github.com/vercel/hyper/blob/canary/app/notify.ts): `app/notify.ts`

### Renderer interface

- [Renderer bootstrap](https://github.com/vercel/hyper/blob/canary/lib/index.tsx): `lib/index.tsx`
- [Hyper interface](https://github.com/vercel/hyper/blob/canary/lib/containers/hyper.tsx): `lib/containers/hyper.tsx`
- [Session actions](https://github.com/vercel/hyper/blob/canary/lib/actions/sessions.ts): `lib/actions/sessions.ts`
- [Session state](https://github.com/vercel/hyper/blob/canary/lib/reducers/sessions.ts): `lib/reducers/sessions.ts`
- [Terminal views](https://github.com/vercel/hyper/blob/canary/lib/components/terms.tsx): `lib/components/terms.tsx`
- [Terminal component](https://github.com/vercel/hyper/blob/canary/lib/components/term.tsx): `lib/components/term.tsx`

### Terminal sessions

- [PTY session](https://github.com/vercel/hyper/blob/canary/app/session.ts): `app/session.ts`

### Configuration and extensions

- [App configuration](https://github.com/vercel/hyper/blob/canary/app/config.ts): `app/config.ts`
- [Config paths](https://github.com/vercel/hyper/blob/canary/app/config/paths.ts): `app/config/paths.ts`
- [Plugin manager](https://github.com/vercel/hyper/blob/canary/app/plugins.ts): `app/plugins.ts`
- [Renderer plugins](https://github.com/vercel/hyper/blob/canary/lib/utils/plugins.ts): `lib/utils/plugins.ts`

### Other components

- **User**

## Connections

- User → Electron startup: launches (evidence: `README.md`)
- Electron startup → Window lifecycle: creates windows (evidence: `app/index.ts`)
- Electron startup → Menus and commands: creates menu (evidence: `app/index.ts`)
- Electron startup → CLI integration: installs CLI (evidence: `app/index.ts`)
- Electron startup → App configuration: initializes config (evidence: `app/index.ts`)
- Electron startup → Plugin manager: exposes plugins (evidence: `app/index.ts`)
- App configuration → Config paths: uses paths (evidence: `app/config.ts`)
- Renderer bootstrap → Hyper interface: renders (evidence: `lib/index.tsx`)
- Renderer bootstrap → Session actions: dispatches actions (evidence: `lib/index.tsx`)
- Session actions → Main RPC: requests sessions (evidence: `lib/actions/sessions.ts`)
- Renderer bootstrap → Session state: updates state
- Hyper interface → Terminal views: renders (evidence: `lib/containers/hyper.tsx`)
- Terminal views → Terminal component: renders terminals
- PTY session → App configuration: reads profile (evidence: `app/session.ts`)
- Plugin manager → Config paths: uses paths (evidence: `app/plugins.ts`)
- Renderer plugins → Plugin manager: integrates plugins (evidence: `lib/utils/plugins.ts`)
