Codelegate is a Tauri 2 desktop app for running coding-agent sessions and repository workflows in one place.
This repository currently targets desktop only (apps/desktop).
- Multi-session workspace grouped by repository, with sidebar search and quick switching.
- New Session flow with agent selection (
Claude CodeorCodex CLI), repository picker + recent directories, optional Git worktree mode, optional environment variables, and optional pre-agent setup commands. - Per-session panes:
- Agent terminal
- Git pane with staged/unstaged/untracked diff view, syntax highlighting, commit/amend, and bulk stage/unstage/discard actions
- Terminal pane
- Session lifecycle actions: rename branch, terminate session, and close confirmation with optional "remember sessions" restore behavior.
- Settings in UI: terminal font family, terminal font size, shortcut modifier key, battery saver (reduced animation), and per-agent CLI args.
<Modifier> defaults to Alt and is configurable in Settings.
<Modifier> + A= Agent pane<Modifier> + G= Git pane<Modifier> + T= Terminal pane<Modifier> + N= New session<Modifier> + P= Settings<Modifier> + R= Rename active branch<Modifier> + W= Terminate active session<Modifier> + S= Focus session search<Modifier> + 1..9= Select session from current hotkey page<Modifier> + 0= Next hotkey pageCtrl + Tab= Cycle sessions
apps/desktop: Desktop app (React + Vite frontend, Tauri + Rust backend)apps/desktop/src: Frontend UI and app logic (CSS Modules)apps/desktop/src-tauri: Backend commands, permissions, and Tauri configpackages/shared: Shared TypeScript utilities/icons.github/workflows/desktop-build.yml: CI workflow that verifies desktop build
- Node.js 20+
pnpm- Rust stable toolchain
- On Linux, Tauri system dependencies (WebKitGTK/GTK stack) are required for desktop builds.
Workspace-level scripts (package.json):
| Command | Purpose |
|---|---|
pnpm build |
Run root TypeScript build (tsc -b). |
pnpm build:desktop |
Build desktop frontend (@codelegate/desktop). |
pnpm build:website |
Build website app workspace (if present). |
pnpm clean |
Clean TypeScript build artifacts (tsc -b --clean). |
pnpm dev:desktop |
Start desktop frontend Vite dev server. |
pnpm dev:website |
Start website dev server (if present). |
pnpm tauri:desktop <args> |
Run Tauri CLI in desktop workspace. |
pnpm typecheck |
Typecheck all workspaces via TS project references. |
Desktop workspace scripts (apps/desktop/package.json):
| Command | Purpose |
|---|---|
pnpm --filter @codelegate/desktop dev |
Start Vite dev server for desktop UI. |
pnpm --filter @codelegate/desktop build |
Typecheck desktop TS + build frontend assets. |
pnpm --filter @codelegate/desktop preview |
Preview built desktop frontend assets. |
pnpm --filter @codelegate/desktop tauri <args> |
Run Tauri CLI directly in desktop workspace. |
pnpm --filter @codelegate/desktop typecheck |
Typecheck desktop workspace only. |
Common desktop workflows:
- Install dependencies:
pnpm install- Run full desktop app (Tauri + Vite):
pnpm tauri:desktop dev- Run frontend only:
pnpm dev:desktop- Typecheck:
pnpm typecheck- Frontend desktop build:
pnpm build:desktop- Full desktop app build (bundle enabled):
pnpm tauri:desktop build- App-only macOS bundle (skip DMG):
pnpm --filter @codelegate/desktop tauri build --bundles app- CI-style backend compile check without packaging:
pnpm --filter @codelegate/desktop tauri build --no-bundle- Icon source image:
apps/desktop/src-tauri/icons/icon.png. - Generate platform icon assets after icon changes:
pnpm --filter @codelegate/desktop tauri icon src-tauri/icons/icon.pngapps/desktop/src-tauri/tauri.conf.jsonmust includebundle.iconentries (includingicons/icon.icnsfor macOS).- For release verification on macOS, build a bundled app (
pnpm tauri:desktop buildorpnpm --filter @codelegate/desktop tauri build --bundles app). --no-bundleonly verifies compile and does not produce packaged app icon metadata/resources.
- Workflow file:
.github/workflows/desktop-build.yml - Triggers:
pull_requestpushonmainworkflow_dispatch(manual run)
- Runner:
ubuntu-24.04 - CI pipeline steps:
- Checkout repository (
actions/checkout@v4) - Setup pnpm (
pnpm/action-setup@v4, version 9) - Setup Node.js (
actions/setup-node@v4, node 20, pnpm cache) - Setup Rust (
dtolnay/rust-toolchain@stable) - Install Linux Tauri dependencies (
apt-getpackages for GTK/WebKit and bundling tools) - Install dependencies:
pnpm install --frozen-lockfile - Typecheck:
pnpm typecheck - Build desktop frontend:
pnpm build:desktop - Build desktop app without bundle:
pnpm --filter @codelegate/desktop tauri build --no-bundle
- Checkout repository (
Core CI verification commands:
pnpm typecheck
pnpm build:desktop
pnpm --filter @codelegate/desktop tauri build --no-bundle- Release workflow:
.github/workflows/release-desktop.yml - Trigger: push a Git tag matching
v*such asv0.1.0 - Manual run: start the workflow from the Actions tab and provide
release_tagwith the same tag value, such asv0.1.0 - The pushed tag must match
apps/desktop/src-tauri/Cargo.tomlversion - The workflow builds the Tauri desktop app from
apps/desktop, creates or updates the GitHub Release, uploads Linux and macOS artifacts, and enables GitHub-generated release notes - macOS bundles are signed and notarized in CI
- Linux bundles are built on Ubuntu and published to the same GitHub Release
Required GitHub Actions secrets:
| Secret | Value |
|---|---|
APPLE_CERTIFICATE |
Base64-encoded .p12 signing certificate exported from Keychain Access. |
APPLE_CERTIFICATE_PASSWORD |
Password used when exporting the .p12 certificate. |
KEYCHAIN_PASSWORD |
Password for the temporary macOS keychain created during CI signing. |
APPLE_API_KEY |
App Store Connect API Key ID. |
APPLE_API_ISSUER |
App Store Connect Issuer ID. |
APPLE_API_KEY_P8_BASE64 |
Base64-encoded contents of AuthKey_<KEY_ID>.p8. |
Release steps:
- Update
apps/desktop/src-tauri/Cargo.tomlto the release version. - Commit the version change and push it to the branch you want to release from.
- Create and push the matching tag:
git tag v0.1.0
git push origin v0.1.0After the tag is pushed, GitHub Actions runs the desktop release workflow on GitHub-hosted macOS and Linux runners, builds Linux and macOS bundles, signs and notarizes the macOS artifacts with the configured Apple credentials, then publishes all generated assets to the GitHub Release page for that tag.
- Settings:
~/.codelegate/config.json- Recent directories are stored under
settings.recentDirs.
- Recent directories are stored under
- Worktrees:
~/.codelegate/worktrees/<repo-slug>/<timestamp>-<agent>