Development Setup & Tooling
Relevant source files
The following files were used as context for generating this wiki page:
Rebase uses a dual-stack architecture comprising a React/Tauri frontend and a Rust-based backend. Development requires specific environments for both the web-based production app and the experimental native GPUI port. The project relies on Bun for JavaScript execution and Cargo for Rust compilation.
Sources: CONTRIBUTING.md:12-25, README.md:65-71
Prerequisites and Environment
You must install specific toolchains before building the project. The project supports macOS (Apple Silicon and Intel), Linux (x86_64), and Windows (x86_64).
Core Dependencies
- Node.js 20+: Required for the primary web-based application.
- Node.js 22+: Required specifically for the experimental Native GPUI preview.
- Rust Toolchain: A stable version of Rust is required for backend services and the native port.
- Bun: The primary package manager and runtime for UI tooling.
- Xcode: Required for GPUI development on macOS.
Sources: CLAUDE.md:4-15, CONTRIBUTING.md:12-14, README.md:65-74
External Provider Setup
Rebase acts as a GUI for third-party coding agents. You must install and sign in to at least one supported provider CLI (e.g., Claude Code, Codex, Cursor, Grok Build, or Devin) for the application to function.
Sources: README.md:17-21, CONTRIBUTING.md:12-14
Development Workflows
The project manages two distinct application versions: the production-ready React/Tauri app and the experimental Rust + GPUI native app.
React/Tauri Application (Production)
The production app uses Tauri to bridge the web frontend with the Rust backend. Use the following commands for development:
| Command | Action |
|---|---|
bun install | Installs project dependencies |
bun run tauri dev | Launches the application in development mode |
bun run check | Runs full CI checks (vitest, tsc, cargo clippy/test) |
bun run check:web | Runs only web-side checks (vitest, tsc) |
bun run check:rust | Runs only Rust-side checks (cargo fmt/clippy/test) |
Sources: CLAUDE.md:4-10, CONTRIBUTING.md:16-18, CONTRIBUTING.md:33-40
Native GPUI Application (Experimental)
Rebase Native is an experimental port using the GPUI framework. It shares the same database as the production app.
The diagram shows the shared data relationship between the production app and the experimental native port.
Sources: README.md:76-88, CONTRIBUTING.md:27-31
Repository Structure
The codebase is organized into functional modules and platform-specific implementations.
| Directory | Description |
|---|---|
src/app/ | Contains application startup, window shell, and update UI logic. |
src/features/ | Product behavior grouped by feature (UI, models, hooks). |
src/integrations/harness/ | Provider adapters and protocol modules for external CLIs. |
src/platform/tauri/ | Adapters for filesystem, PTY, and clipboard via Tauri. |
src-tauri/src/ | Rust implementation for PTYs, Git integration, and session storage. |
crates/rebase-core | Core logic for the native GPUI port. |
crates/rebase-gpui | UI implementation for the native GPUI port. |
Sources: CONTRIBUTING.md:20-31
Testing Infrastructure
Rebase utilizes multiple testing frameworks to ensure cross-platform and browser-level compatibility.
Unit and Integration Tests
The project uses Vitest for web-side testing and Cargo test for Rust components. Protocol modules for external providers are pure functions with dedicated unit tests to allow testing without the specific CLI installed.
Sources: CONTRIBUTING.md:23-25, CONTRIBUTING.md:33-37
Browser-Level Tests
For transcript layout and scrolling validation, Rebase uses Playwright. These tests exercise scroll geometry in real Chromium and WebKit environments.
The sequence illustrates the escalation from mocked DOM tests to full browser layout validation.
Sources: CONTRIBUTING.md:42-47
Automation and Scripting
The development environment includes pre-configured automation templates used to validate repository health and setup instructions.
| Template ID | Purpose | Trigger |
|---|---|---|
repo-health | Checks tree cleanliness and stale scripts | Monday at 09:00 |
install-doctor | Verifies clean installation and boot from README steps | Monday at 10:00 |
failing-ci-watch | Diagnoses red CI states on weekday mornings | Weekdays at 08:30 |
Sources: src/features/automations/model/automationTemplates.ts:223-263
Summary
The development setup for Rebase requires a hybrid environment for web and native technologies. While the React/Tauri stack serves as the production target, the Rust/GPUI stack provides a high-performance native alternative. Both environments rely on Bun for management and shared access to the application database, supported by a rigorous testing suite covering unit logic and visual layout.