Installation
There is nothing to install to use barline — it runs in the browser. You only need a local setup if you want to hack on the engine itself.
Hosted (the fast path)
Section titled “Hosted (the fast path)”Open barline.dev. A song loads, you press play, you hear techno. The full example you’ll see is Nebelwand — a 192-bar hard-techno track that is also a single TypeScript file.
- View / listen to any public song without an account.
- Sign in to create your own songs and publish them. Your personal org
doubles as your artist page at
barline.dev/<you>. - Connect an AI collaborator over MCP — see MCP setup.
No download, no DAW, no plugins. A modern browser with Web Audio is the whole requirement (Web MIDI, used for hardware control and “pro mode” MIDI-out, is Chromium-only today).
Local development
Section titled “Local development”barline is a pnpm + Turborepo monorepo. You need Node ≥ 24 and pnpm 10.
git clone https://github.com/jungdotdev/barlinecd barlinepnpm install # workspace installpnpm build # turbo build — packages first (core → runtime → studio-lib)Run the studio with its API worker embedded in one dev process:
pnpm --filter studio dev # studio + embedded api worker on :3000Open http://localhost:3000. Edits to the song hot-reload and land at the next
bar boundary.
The API worker (per-song Durable Object, song index, MCP server) can also run standalone:
pnpm --filter @barline/api dev # api worker alone on :8799Other useful commands
Section titled “Other useful commands”pnpm test # vitest across packagespnpm typecheck # tsc across packagesHow the packages fit together
Section titled “How the packages fit together”@barline/core types, AST, pattern primitives — zero dependencies, public@barline/runtime Tone.js wrapper, scheduler, bar clock — publicstudio-lib patterns/effects/sounds/ai/analyze/midi/persist/ui — privateapps/studio the TanStack Start app (Cloudflare Workers)services/api the Hono worker — health, song CRUD, MCP serverThe dependency direction is law: studio → studio-lib → runtime → core, never
up or sideways. A song file imports only @barline/core (primitives) and the
Song type from @barline/runtime.