Skip to content
EngazanPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

309 Commits

Folders and files

Repository files navigation

Superior

A minimal desktop core. Open a local or SSH-backed project folder and run agent CLIs (claude, codex) inside it, with live output in an embedded, tabbed terminal.

Download License Platforms

Superior application preview

Install

macOS

Release builds are signed with a Developer ID and notarized by Apple, so they open with a normal double-click — no Gatekeeper warning.

If you ever hit "Superior is damaged and can't be opened" (only happens with an older, unsigned build, or a download that kept its quarantine flag), strip the flag once from a terminal:

xattr -dr com.apple.quarantine /Applications/Superior.app

Windows

The Windows build is unsigned, so SmartScreen may warn on first run — choose More info → Run anyway.

Project structure

The repository is split into three applications, each with its own dependencies and commands:

  • desktop/ — Electron desktop app, including source, build scripts, packaging assets and configuration.
  • mobile/ — Expo / React Native companion for iOS and Android.
  • server/ — encrypted relay connecting the desktop and mobile apps.

The main README, changelog and shared documentation remain at the repository root. GitHub CI and release workflows remain in .github/workflows/ and build the desktop app from desktop/.

Stack

Electron + React + TypeScript + Vite (electron-vite) + Tailwind CSS, with node-pty for true-TTY process execution and @xterm/xterm for terminal rendering.

Scripts

Run the desktop commands from desktop/:

cd desktop
npm install      # installs dependencies (Node 22.12+)
npm run dev      # launch the app in development (HMR)
npm run build    # type-check + build main/preload/renderer into out/
npm start        # preview the production build
npm run rebuild  # manually rebuild node-pty if Electron is upgraded

npm run dist:mac    # package a macOS dmg/zip
npm run dist:win    # package a Windows nsis installer/zip
npm run dist:linux  # package a Linux AppImage/deb

Builds run per-platform on their native OS (CI uses a macOS/Windows/Linux matrix — see .github/workflows/ci.yml and release.yml). node-pty is a native module, so packaging on Windows needs the VS Build Tools + Python and Linux needs build-essential + python3.

How it works

  • Open from folder → native directory picker (main process). The chosen path is validated and persisted to workspaces.json under the app's userData dir, then restored on next launch.
  • Remote SSH workspace → stores an SSH host/alias plus remote path and launches terminals through the system ssh client in that directory. Credentials, keys and passphrases stay owned by your normal SSH config/agent.
  • Open Claude / Open Codex → spawns the CLI through the host shell with cwd set to the workspace. On macOS/Linux that's a login shell ($SHELL -l -c <cmd>, falling back to /bin/bash) so your real PATH (e.g. ~/.local/bin, nvm) is available even when launched from Finder; on Windows it's cmd.exe /c <cmd> (and a plain terminal opens PowerShell).
  • Each launched agent gets its own terminal pane; Claude, Codex and custom presets can run side by side on the same workspace surface, without new tabs.

Splitting and moving terminals

  • Click SPLIT in a terminal's top-right corner, choose a preset from the same picker as +, then choose left, right, above or below.
  • Drag a terminal by its header onto another terminal. The nearest edge selects its placement, and the highlighted area previews the resulting position. This moves the existing terminal; it does not merge shell input or restart it.
  • Drag a divider to resize its split. Hold Alt to bypass snapping. Escape, pointer cancellation or losing window focus cancels an in-progress drag.
  • Closing a pane gives its space back to its sibling. Layouts are saved per workspace, and restarting a terminal retains its position. Existing grid layouts migrate with their cell sizes intact. The existing 12-pane limit, maximize/restore and broadcast features remain available.

Code and terminals

Use CLI · Code · Browser in the center of the title bar, or Cmd/Ctrl+Shift+E, to switch between the terminal layout and the file editor. The shortcut is customizable in Settings → Keyboard.

Opening a file from the project tree, file search, or a terminal link selects Code. Each file gets a tab; reopening the same file selects its existing tab. Use the split button or drag a tab into the right half of the editor to view two files side by side. Drag the divider to resize, or use its arrow keys while focused. The merge button brings the groups back together.

Terminals continue running while Code is visible. Open editors retain unsaved changes, undo history, cursor and scroll when switching files, projects, views, or settings. Cmd/Ctrl+S saves the focused editor; Cmd/Ctrl+W closes its tab and asks before discarding unsaved edits. Each workspace remembers its open file paths, editor groups, divider width and selected view across app restarts.

Terminal activity and notifications

The activity pulse means the terminal is producing output; a pause does not mean the agent has finished. Attention indicators and background OS notifications are triggered by explicit terminal alerts (BEL, OSC 9 notifications, or OSC 777 notify) or an actual process exit. Alerts can also mean an agent needs approval, so the UI says needs attention, not finished successfully.

Repeated alerts are coalesced until another keyboard interaction or submitted prompt. Historical scrollback, redraws, Windows OSC 9;4 progress updates and daemon disconnects do not trigger completion notifications. Native notifications are suppressed while Superior is focused or notifications are disabled in settings.

An interactive CLI must emit a supported terminal alert to notify between turns; if its own notifications are disabled or use an unsupported channel, Superior does not guess completion from silence. No agent configuration files are changed.

Review comments → agent

In Changes, click + beside a diff line to add a review comment. Save with Ctrl/Cmd+Enter or Save. The comments list lets you edit or remove notes, then Send to agent shows the combined prompt and a picker of running command sessions in the current workspace. Sending pastes the batch and presses Enter; choose an agent ready for input.

Notes are saved locally per workspace and retain their original file, old/new line, branch, staged/unstaged side, and nearby code. They survive panel switches, app restarts, staging, and subsequent file edits. The original excerpt remains available even when its line is no longer in the diff. Notes stay in the list after sending so you can check the agent's revision and remove addressed items. A transport error keeps the notes; check the target terminal before retrying.

Browser preview and Design Mode

Use the CLI · Code · Browser switch in the title bar to open Browser. Use Cmd/Ctrl+click on an HTTP/HTTPS URL in terminal output to open it in that workspace's Browser automatically, or enter the URL of your running development server in the address bar. Back, Forward and Reload work within that workspace; its last URL is restored on the next app launch. The workspace-mode shortcut cycles through all three modes. With focus in the page, Ctrl/Cmd+L focuses the address bar and app navigation shortcuts remain available.

Turn on Design Mode and click an element. The click selects it without activating its page action. A dialog shows the element's visible screenshot crop, HTML and computed CSS. Describe the change, pick a running agent in the workspace, and choose Send to agent. The request includes the source context and a local PNG path that the agent can read. Escape leaves selection mode. The selected element and draft remain available while switching modes during the app session.

Preview pages run in a separate sandboxed Chromium view without Superior's API or Node access. Browser views hide while app dialogs are open and close with their workspace/window. The development server still runs independently; remote agent sessions cannot receive the local screenshot through this flow.

Account usage footer

Codex profiles also display available reset tickets and their expiry dates when the provider supplies them. Use one ticket opens a confirmation dialog showing the selected profile; only CONFIRM submits the reset. The provider selects the ticket. Limits and ticket availability are fetched again afterwards, including for custom memory profiles. Failed ticket lookups are shown as unknown, not zero. Ambiguous network results can be retried with the same request ID during the current app session; reset requests are never retried automatically.

The footer shows Claude and Codex subscription limits. Open Profiles & options to pin default or custom-memory profiles, inspect each limit and reset time, refresh usage, and choose used/remaining percentages or compact details. Choices are saved. Custom profiles come from Custom memory terminal presets; selecting them here chooses the displayed usage profile, not the account of a running CLI.

Each profile reads its own credentials: Claude's .credentials.json (or its scoped macOS Keychain entry) and Codex's auth.json. Credentials stay in the main process and are sent only to their provider's fixed account-usage endpoint. The footer does not change login files or install status-line hooks. Codex profiles using only an OS credential store currently show that no readable sign-in is available. Expired credentials require signing in again through the relevant CLI.

Usage refreshes approximately once per minute, with caching and backoff for rate-limited requests. Provider account endpoints are not stable public billing APIs; failures display an unavailable state rather than zero usage. Profiles that share an account also share its quota, so percentages are never summed.

Source layout

desktop/src/shared/          # domain types, typed IPC contract, daemon protocol
desktop/src/main/            # Electron main process: services + IPC handlers
desktop/src/daemon/          # persistent PTY process and scrollback buffer
desktop/src/preload/index.ts # explicit contextBridge capabilities
desktop/src/renderer/src/    # React UI, hooks, terminal and file/git views
mobile/                      # Expo / React Native iOS and Android companion
server/                      # encrypted mobile relay and Dokploy deployment

Mobile relay

Superior's terminal daemon keeps PTY sessions and recent scrollback alive across desktop app restarts. The desktop can now connect to a self-hosted relay over WSS, pair a phone, stream existing sessions and accept terminal input. Both desktop and phone make outbound connections, so users need no VPN or router port forwarding. The daemon's local socket stays private. The React Native mobile app is in mobile/; its pairing, encryption and messaging protocol is documented in docs/mobile-companion.md.

Open Mobile access above Workspaces in the left sidebar (or Settings → Mobile access) to set the address, enable the connection, generate a five-minute pairing QR code and revoke devices. Official builds receive the relay address from the SUPERIOR_RELAY_URL GitHub Actions variable. A local runtime variable or the desktop setting can override it. No server address is hardcoded.

See the mobile protocol for pairing, encryption and client messages. The relay server and Dokploy instructions are in server/.

License

MIT

Terminal preferences

Open Settings → Terminal (also available from the command palette) to adjust font family, size, regular/bold weight, line height, ligatures, cursor shape, blinking and opacity. A local terminal preview shows the changes before you return to your sessions. Preferences apply to existing terminals and survive app restarts. Font names refer to fonts installed on your computer.

Terminal colors can follow the app or stay light/dark independently. Choose separate light and dark palettes (Superior, Solarized, and Dracula for dark), minimum text contrast and opacity for inactive split panes. Scroll controls cover normal history, fast Alt/Option scrolling, terminal applications and the retained row count (1,000–100,000). The row setting controls each displayed terminal; restored output still has the daemon's separate 1.5 MB retention limit, and increasing a limit cannot recover discarded output.

On macOS, Option as Alt supports Auto, Both, Left, Right and Off. Auto uses Alt/Esc sequences only for a detected US layout; unknown or non-US layouts keep character composition. GPU acceleration supports Auto/On/Off, loads on demand, and falls back to the DOM renderer on activation failure or context loss. Ligatures require a supporting font; Auto recognizes common programming fonts.

Optional switches enable copy on selection, right-click paste, focus following the mouse, and OSC 52 clipboard writes from local or SSH terminal programs. Control-click (Ctrl+right-click on Windows/Linux) keeps the context menu available when right-click paste is enabled. OSC 52 is off by default, accepts UTF-8 writes up to 100 KB, blocks clipboard queries and does not execute historical replay. Reset terminal settings restores terminal defaults without changing other application preferences.

Worktree preparation

Hover over a local workspace in the sidebar and click its gear icon for Project setup (also available in the workspace menu). Enter one setup command per line (for example npm ci, then npm run build) and optional relative file paths such as .env.local. Settings are saved locally per project; they apply automatically to new worktrees, including worktrees created by Tasks. An empty configuration makes a new worktree ready immediately.

Preparation copies the selected files from the original project, then runs each command in the new worktree. Existing destination files are kept, including on retry. Copying is limited to files within the two roots; directories, symlinks, absolute paths, parent traversal and .git metadata are rejected. Files are copied without printing their contents. Commands use a login shell on macOS/Linux and cmd.exe on Windows, with SUPERIOR_PROJECT_ROOT and SUPERIOR_WORKTREE_PATH available in the environment. Each line runs in a separate shell; put multiline logic and shared environment setup in a script.

Open the workspace gear icon and choose Details for preparation status and the current command, live output, errors, Stop setup, and Retry setup. The latest 64,000 characters of output are retained locally; command output can contain secrets, so avoid printing them. Each command must finish within 15 minutes. Agents wait for a successful setup; a plain terminal remains available to diagnose failures.

A failure keeps the worktree and its files. Update Project setup, then retry in the same checkout. All commands run again, so use repeatable commands. A task that fails during preparation retains its worktree for the Tasks Retry action. Existing worktrees from earlier versions remain usable; choose Run setup to prepare one explicitly. Changing project settings does not rerun ready worktrees.

Closing the app cancels active preparation processes. Interrupted preparation is shown as failed and requires an explicit retry; it never automatically starts an agent after reopening the app. Ordinary agent terminals retain their existing persistence behavior. This preparation workflow applies to local worktrees.

Send selected context to an agent

Select text in a source editor, Markdown preview, or terminal and open its context menu → Send to agent. Choose a running local agent in that workspace and enter an instruction. The preview includes the source and editor line range (the visible buffer may include unsaved edits). Selections are limited to 100,000 characters. When right-click paste is enabled, use the terminal's modified context-menu click. A transport error leaves the dialog open; inspect the target before retrying.

Scheduled Tasks

Tasks now run from the main process, independently of the Tasks panel. Expand Schedule & conditions to choose a local start time, an hourly/24-hour/7-day repeat interval, an agent timeout, and an optional precheck shell command. Exit 0 from the precheck runs the agent; any other result or a 60-second timeout records a skipped run. Use a command that explicitly tests its condition, not merely a command that prints an empty list successfully. Prechecks run in the project root.

Every run has its own result and optional worktree. The next recurring run is saved atomically with the result; missed intervals are skipped rather than replayed in a burst. Delete the next queued run to stop repetition. Retry runs a single fresh attempt. Only one task per project runs at a time. Run times are fixed elapsed intervals, so a daily repeat can shift local clock time at DST.

Superior must remain running for scheduling and timeouts. Existing PTYs survive app shutdown, but no new scheduled jobs start while it is closed. On restart, tasks reconcile with the surviving daemon; a missing result is a failure, never an assumed success. Agent timeout enforcement resumes when Superior opens.

Pull request checks

The Changes panel reads the current branch's pull request through your locally signed-in GitHub CLI (gh). It shows review state, individual checks and the fetch time, and warns if the PR commit differs from local HEAD. Refresh runs a new read; background refresh happens once a minute while the panel is mounted. Use Send to agent to include failed check names and links in an instruction. Missing authentication, a missing PR and network failures remain visible errors; they are never presented as passing checks. This feature does not push or mutate pull requests. GitLab merge requests are not supported by this panel.

Native Codex chat

Choose Chat in the workspace switcher and create a conversation. Superior starts the locally installed codex app-server with your existing CLI sign-in. It streams assistant text and tool cards, displays command/file approval requests and structured questions, and supports Stop, Plan mode and Fork from here on completed responses. Forking copies conversation history through that turn; it does not rewind files or create a new worktree. Conversations persist locally and resume on the next message after an app restart. Interrupted turns are never silently replayed. Drafts remain until the start request is acknowledged.

Native chats use workspace-write sandboxing and user-directed on-request approvals. Unsupported permission/tool requests fail explicitly. At most eight chat connections run simultaneously; idle connections can be released and later resumed. The native adapter currently supports Codex; Claude and other presets continue to use the existing terminal experience. Native chat does not import existing terminal conversations. Requires a Codex CLI supporting the app-server thread/turn protocol; incompatible versions report their protocol error.

The mobile workspace Chat action opens the same conversations, with persistent drafts, Plan mode, Stop, history forks and approval/question cards. Mobile shows bounded recent excerpts; full history remains on desktop. Approvals too large to display completely can only be answered on desktop. Mutations use durable request IDs so reconnecting checks their outcome without replaying the action.

Coordinator and workers

In Chat, choose Coordinator to enable scoped worker tools. The coordinator can dispatch up to three concurrent Codex workers, each in a new worktree created from the coordinator workspace's committed HEAD. Uncommitted parent changes are not copied. Project setup completes before the worker starts. Workers cannot dispatch nested workers; Plan mode cannot dispatch workers.

The coordinator can wait for results and exchange durable inbox messages with its workers. Worker cards expose status, branch, result, messages and navigation to approvals in the worker's own chat. Mail is read through the worker tools; it does not interrupt a running prompt. Each dispatch is reserved before checkout creation, so a duplicate tool call returns the same worker. Stop on a coordinator also stops its workers. Worktrees remain for review, including after failure; nothing is automatically merged, pushed or deleted. On restart, interrupted workers require an explicit new message to resume.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages