Install Node 22.13 or newer, which Electron Forge needs, and Bun canary (bun upgrade --canary). Then run bun install and bun start. bun install also adds a pre-commit hook that lints and formats staged files.
bun run testruns the unit tests. Plainbun teststops and says so, because each test file needs a fresh global.bun lintandbun fmtlint and format.bun checktypechecks the app, andbun check -p buildtypechecks the build scripts, which run under Bun.bun run package, thenbun run e2e, runs the end-to-end tests against the packaged app.
Each e2e launch gets its own temporary home and user data directory, and its app stops when the test run does, even one that times out or is stopped with Ctrl-C. CONDUIT_E2E_KEEP=1 keeps them, and CONDUIT_E2E_APP points at another Conduit.app. CONDUIT_E2E_ARTIFACTS=<dir> saves each launch's last screenshot, app log and Playwright trace, and CI uploads these when a run fails.
bun run profile profiles a realistic session in the packaged app: tab switches, a splitter drag, terminal echo and throughput, scrolling a browser pane, and idle CPU and memory per process. CI doesn't run it. Run it before and after a change and compare the summaries. It writes a summary, the raw results and CPU profiles of the tab switches and the splitter drag for DevTools to a temporary folder, or to CONDUIT_PROFILE_OUT. Its browser panes load real sites, so expect some noise.
Conduit is a thin core plus one folder per feature. The core finds each feature's files by path with import.meta.glob, so a feature contributes by putting a file in the right place.
src/main.tscreates the window.src/main/holds the rest of the main process: lifecycle, menus, and the socket server for the CLI.src/main/features.tsloads every feature's service and startup.src/preload/window/buildswindow.conduit, andsrc/cli/is theconduitcommand used in Conduit's terminals (cli.md).src/renderer/is the React core: the command, keybinding and menu engine incommands/, CLI request routing incli/, UI primitives inui/, the Query client inquery.tsand Store atoms increateAtom.ts.src/shared/holds what main and the renderer both use: the service contract inrpc.ts, command IDs, the CLI protocol, and types shared by three or more features.
A feature lives in src/features/<name>/ and has only the parts it needs:
model.tsholds its types, shared by its main and renderer halves.main/service.tsdefault-exports an object of methods. Main serves each as<name>:<method>, the preload exposes it aswindow.conduit.<name>.<method>(), and merging<name>: typeof serviceintoServicesin@shared/rpctypes it for the renderer. Events work the same way: merge them intoEventsinmodel.ts, send them withemitter("<name>")fromsrc/main/events.ts, and listen withwindow.conduit.<name>.on(event, listener).main/startup.tsruns before the window loads, and may return a disposer that quit awaits.client/is renderer logic,components/is React, andcommands.tslists palette commands, keybindings and menu items.panes.tsxrenders the feature's pane, whosetypeis the folder name. Its pane type also joins thePaneunion insrc/features/workbench/model.ts.cli/command.tsaddsconduitsubcommands, andcli/handler.tsanswers them in the renderer. The browser also haspreload/, which runs in its webviews.
Data that main owns lives in TanStack Query, through the feature's client/queries.ts, and main's events keep it fresh. TanStack Store atoms hold only UI state, like tabs, layout and the sidebar, never a copy of something main owns.
Electron never asks macOS for location access, so a site's location only works once Conduit is switched on in System Settings > Privacy & Security > Location Services.
bun pm version patch(orminor), thengit push --follow-tags.gh workflow run release.yml.
The workflow runs the tests, then Forge builds, signs, notarizes and publishes a GitHub release for the new version. Installed copies update themselves from this repo's releases. It needs three secrets: MACOS_SIGNING_CERTIFICATE (the Developer ID .p12, base64), MACOS_SIGNING_PASSWORD and NOTARY_APP_PASSWORD. The certificate expires on February 1, 2027.