Thanks for your interest in contributing. This doc covers everything you need to build, test, and submit changes.
You'll need:
- Rust (stable, 2021 edition): https://rustup.rs
- macOS or Linux (Windows support is planned but not yet available)
- On macOS, Xcode with the Metal toolchain available via
xcrun
All Rust dependencies (including SQLite) are bundled via Cargo.
OrcaShell uses GPUI, and GPUI compiles Metal shaders as part of the macOS build. Before building on macOS, make sure the Metal compiler is available:
xcrun --find metalIf that command fails, or cargo build reports cannot execute tool 'metal' due to missing Metal Toolchain, install the component Xcode requests:
xcodebuild -downloadComponent MetalToolchainIf you have both Xcode and Command Line Tools installed, also make sure xcode-select points at the full Xcode app rather than Command Line Tools alone.
# Debug build
cargo build --workspace
# Release build
cargo build --workspace --release
# Run the app
cargo run -p orcashell
# Run the CLI
cargo run -p orcashell-cli -- daemon status# All tests
cargo test --workspace
# Clippy (warnings are errors)
cargo clippy --workspace -- -D warnings
# Format check
cargo fmt --checkAll three must pass before submitting a PR. If clippy or fmt fails, fix it before pushing.
crates/
orcashell/ # Desktop app entry point (GPUI)
orcashell-ui/ # Workspace, sidebar, tab bar, diff explorer, settings
orcashell-terminal-view/ # GPU terminal renderer, input, mouse, search, colors
orcashell-session/ # PTY engine, shell integration, semantic zones
orcashell-git/ # libgit2 wrapper: status, diff, stage, commit, worktrees
orcashell-syntax/ # Syntax highlighting via syntect
orcashell-daemon-core/ # Git coordinator, Unix socket server, worker threads
orcashell-store/ # SQLite persistence (windows, projects, worktrees)
orcashell-protocol/ # IPC framing and message types
orcashell-cli/ # CLI client (orca command)
forks/
alacritty_terminal/ # Forked with semantic prompt event support
vte/ # Forked with OSC 133 parsing
- The UI is a client of the daemon core. It never mutates git state or spawns processes directly.
- All git operations flow through the git coordinator's worker pool.
- Terminal rendering is decoupled from terminal state via frame snapshots (lock-free rendering).
- All persistent state goes through SQLite (in
orcashell-store). No ad-hoc file writes.
- Rust style: Standard
rustfmtformatting. Runcargo fmtbefore committing. - Error handling: Use
anyhow::Resultfor application code,thiserrorfor library error types. Don't panic in library code. - Tests: Every change that touches behavior should have a test. Unit tests go in
#[cfg(test)]modules. Integration tests go in per-cratetests/directories. - Dependencies: Minimize external crates. Every new dependency needs justification. Check if existing deps already cover it.
- No
unsafewithout explicit justification. - No hardcoded colors in UI code. All colors come from theme tokens in
orcashell-ui/src/theme.rs. - No pure black (
#000000) or pure white (#FFFFFF) anywhere in the UI. This is the Orca Brutalism rule.
- Fork the repo and create a branch from
main. - Make your changes. Write tests.
- Run
cargo test --workspace,cargo clippy --workspace -- -D warnings, andcargo fmt --check. - Open a PR against
mainwith a clear description of what you changed and why. - Keep PRs focused. One feature or fix per PR.
Open an issue with:
- What you expected to happen
- What actually happened
- Steps to reproduce
- Your OS and Rust version
Open an issue describing the use case. "I'm building X and I need Y because Z" is much more useful than "it would be cool if...".
By contributing, you agree that your contributions will be licensed under both the MIT License and the Apache License 2.0, at the user's option.