6.4 KiB
Helder.
Helder is the dark workbench for reviewing the code Claude Code writes: a native macOS app in Swift, SwiftUI and AppKit. See docs/index.md for the architecture, the design tokens and the behaviour spec.
Build, test, run
scripts/build.sh # debug build (--release for release)
scripts/test.sh # all three test targets; e.g. --filter WorkspaceModel
scripts/run.sh [project] # build and run; the optional folder opens in the first window
scripts/bundle.sh # "build/Helder.app", ad-hoc signed, with ripgrep inside (--install copies it to ~/Applications)
Always use the scripts: they select the toolchain this machine needs. Search uses ripgrep when it can find one (Contents/Helpers/rg in the bundle, copied from vendor/ripgrep/rg, or $RG_BINARY) and a slower Swift walk otherwise.
What it does
One project per window, three columns, and a full-screen Git view over them:
- Git view (⌘G): staged, changed, new and deleted files with inline diffs; stage, unstage, discard, delete, restore; commit, commit and push, pull; a console with every git command; branch switching.
- Explorer: the file tree with change letters; new file/folder, rename, delete, Show in Finder, copy or pass on a reference.
- Editor: one open file under a bar with its path, unsaved dot and change counts; changed lines marked in the live code, Diff opens a full-screen side-by-side view; Preview renders Markdown; ⌘-click on a PHP class shows its definition and uses.
- Agent: Claude Code over a plain shell. "Pass on" pastes a reference (and the selected code) into the agent's composer without sending it.
Plus ⌘F search (this file, the project, file names), recent files and recent projects, and a watcher that keeps git, the tree and open files in step with what the agent writes.
Git view
Staged, changed, new and deleted files, each with an inline side-by-side diff.
Markdown preview
Search
One query searches the open file, the whole project and the file names.
Fork it with AI
prompt.md is a complete rebuild handoff for an AI agent such as Claude Code. Give it that one file, name a target language and UI toolkit, and it can rebuild Helder with the same behaviour, look and feel. The file holds every string, colour, size and key, and it lists every test as a plain-English rule.
Design
design/ holds the v2 design handoff: design/README.md describes the full-screen Git view and the design tokens, and Helder App v2.dc.html is the HTML prototype (open it in a browser next to support.js). The prototype is a reference, not production code. Where it differs from the app, the code wins.
Keyboard
Press ? (or the ? button in the title bar) for the list of shortcuts inside the app.
| Keys | Action |
|---|---|
| ⌘F | Search this file, the project and file names |
| ⌘O | Open a folder |
| ⇧⌘O | Open recent project: the list of recent projects |
| ⇧⌘N | New window |
| ⌘← ⌘→ | Column left or right; in the Explorer ⌘→ opens the row's menu |
| ↑ ↓ ↵ | Explorer: move the row cursor, open the row |
| ⌘↑ ⌘↓ | Recent files, from the editor |
| ⌘→ (selection) | Pass the selection to the agent |
| ⌘M | Markdown: code or rendered preview |
| ⌘S / ⌘W | Save / close the open file (asks about unsaved edits) |
| ⌘C | Open the Git view on the commit message (copies when something is selected) |
| ⌘↵ | Commit the staged files, while the Git view is open |
| ⌘P | Push |
| ⌘R | Re-read git, the tree and the open file from disk |
| ⌘G | Open or close the Git view |
| ⌘1 / ⌘2 / ⌘3 | Explorer / File / Claude column on or off |
| ⌘L / ⌘. | Fluid columns / hidden files |
| ⌘A | Select all in the focused pane; in the code pane, the whole file |
| ⌘0 / ⌘+ / ⌘− | Zoom: editor, Diff and terminal text |
| Esc | Close the overlay, then the Git view |
| ? | Keyboard shortcuts |
Closing a window, switching project or quitting (⌘Q) first asks about every unsaved file; a cancel keeps everything open. Then the session is written and both terminals end. A terminal whose process exited restarts on the next key press; right-click in a terminal gives Copy (with a selection) and Paste.
Testing
Three test targets mirror the three library targets: Tests/HelderCoreTests, Tests/HelderServicesTests and Tests/HelderUITests. Inside each target, the folders mirror Sources/<Target>/ (a test for Sources/HelderUI/State/EditorStore.swift sits in Tests/HelderUITests/State/).
The tests use Swift Testing. For a PHPUnit reader:
| PHPUnit | Swift Testing |
|---|---|
class FooTest extends TestCase |
@Suite struct FooTests |
public function test_it_works() |
@Test func itWorks() |
$this->assertSame($a, $b) |
#expect(a == b) |
$this->markTestSkipped / fail early |
try #require(value) (stops the test when nil or false) |
@dataProvider |
@Test(arguments: [...]) func x(_ value: …) |
setUp() |
the suite's init(), or a helper that builds the fixture |
- Fakes and harnesses live in
Tests/HelderUITests/Support/: one fake per service protocol inFakes/(FakeGit,FakeFiles,FakeSystem,FakeTerminal, …), andWorkspaceHarness, which wires a whole window to those fakes. UI tests never touch the disk, git, the user's defaults or the log. - Integration tests in
HelderServicesTestsrun the realgitand file system.TempGitRepocreates a throwaway repository (commit,write,run);TempDirectorya throwaway folder. - Waiting:
await model.settle()oreventually { … }, never a sleep.
scripts/test.sh # everything
scripts/test.sh --filter GitServiceLoadTests # one suite (the @Suite name, not the file name)
scripts/test.sh --filter "GitServiceLoadTests/aFileUnderTheSizeCapStillCarriesItsText" # one test




