⚠️ Beta Software — Owl is in early development and not yet ready for production use. APIs, configuration, and UI are subject to change without notice.
A visual diff viewer for local Git worktrees. Owl renders unified diffs with syntax highlighting, a file tree sidebar, and line-link selection. It runs entirely against your local repository — no pull requests, no URLs, just your working copy.
- Features
- Stack
- Getting Started
- Configuration
- API
- Scripts
- Project Structure
- Architecture
- Contributing
- License
- Worktree diff — View all local changes (staged, unstaged, and untracked files) in one unified patch.
- Syntax highlighting — Code is highlighted using the
@pierre/diffsengine with streaming web worker support. - File tree sidebar — Browse changed files by path with Git status indicators (added, modified, deleted, untracked).
- Line-link selection — Select and link to specific lines in the diff for sharing and navigation.
- Dark theme — Built-in dark theme with Geist font.
- Fully local — No network calls to external Git forges. All operations target your local repository.
| Layer | Technology |
|---|---|
| Frontend | React 19, CSS Modules |
| Build | Vite 7 |
| Server | Hono 4 on Bun |
| Language | TypeScript (tsgo / typescript) |
| Diff rendering | @pierre/diffs |
| File tree | @pierre/trees |
| Theming | @pierre/theme, @pierre/theming |
| Icons | @pierre/icons |
| Notifications | sonner |
| Linting | oxlint |
| Formatting | oxfmt |
git clone git@github.com:crnvl96/owl.git && cd owl
bun installexport OWL_WORKTREE_PATH=/absolute/path/to/your/git/repo # optional; defaults to current directory
bun devOpen http://localhost:5173 in your browser to view the app.
- Vite dev server runs on port
5173and serves the React frontend with HMR. - Hono API server runs on port
3000. In development, Vite proxies/apirequests to it automatically.
The target directory must be a valid Git working tree.
| Environment Variable | Required | Default | Description |
|---|---|---|---|
OWL_WORKTREE_PATH |
No | $PWD (server CWD) |
Absolute path to the Git worktree to inspect. |
All configuration is server-side via environment variables. There is no .env file or runtime config UI at this stage.
The Hono server exposes a single API endpoint:
| Method | Path | Description |
|---|---|---|
GET |
/api/local-worktree-diff |
Returns the full diff of the current worktree. |
Response
- 200 — Raw unified diff text (
text/plain). - 422 — No local changes (body:
"No local changes in the current worktree."). - 500 — Git command failed (body contains the error message).
The response includes the headers:
X-Patch-Source: local-worktreeCache-Control: no-store
| Command | Description |
|---|---|
bun dev |
Start Vite + Hono dev servers concurrently |
bun run build |
Production build (vite build) |
bun start |
Start the production Hono server |
bun typecheck |
Run TypeScript type checking (tsgo --noEmit) |
bun lint |
Run oxlint on all source files |
bun lint:fix |
Auto-fix lint issues |
bun fmt |
Format all files with oxfmt |
bun fmt:check |
Check formatting compliance |
bun check |
Format check + lint + typecheck (CI gate) |
bun fix |
Format and auto-fix lint issues in place |
Run bun check before committing. It ensures formatting, linting, and type checking all pass.
owl/
├── public/ # Static assets (fonts, etc.)
├── src/
│ ├── frontend/ # React client
│ │ ├── components/
│ │ │ ├── atoms/ # Primitives (Button, Toaster)
│ │ │ ├── diff/ # Diff rendering components
│ │ │ ├── layout/ # Layout, worker pool, preloading
│ │ │ └── review/ # Review UI (file tree, sidebar, viewer)
│ │ ├── hooks/ # React hooks (theme, worker pool, patch loader)
│ │ ├── lib/ # Client-side utilities (config, caching, streaming, types, theme)
│ │ ├── pages/ # Page components (Home)
│ │ ├── globals.css # Global styles
│ │ └── main.tsx # Entry point
│ └── server/ # Hono API server
│ ├── git.ts # Git command runner and worktree resolution
│ └── index.ts # Server entry point (API routes + static serving)
├── types/ # Ambient type declarations
├── index.html # HTML shell
├── vite.config.ts # Vite configuration
├── tsconfig.json # TypeScript configuration
├── components.json # shadcn/ui configuration (for reference)
├── package.json # Dependencies and scripts
└── bun.lock # Bun lockfile
- Frontend is a single-page React application bootstrapped in
src/frontend/main.tsx. It communicates exclusively with the Hono API server at/api. - Server is a thin Hono app that spawns
gitchild processes to generate diffs. All Git operations are server-side only and scoped to the worktree configured viaOWL_WORKTREE_PATH. - Diff rendering uses
@pierre/diffsfor parsing and rendering unified diffs (the only view mode currently supported), with syntax highlighting offloaded to web workers for responsiveness on large patches. - File tree is powered by
@pierre/trees, which builds a hierarchical file listing from the diff output and annotates each entry with its Git change type.
- Fork the repository.
- Create a feature branch:
git checkout -b feat/my-feature - Make your changes.
- Run
bun checkto ensure formatting, linting, and types are clean. - Commit and push your branch.
- Open a pull request.
Please keep changes focused and avoid large, unrelated refactors in feature PRs.
This project has not yet adopted a license. All rights are reserved by the author(s) until one is chosen.