Play your code.
A rhythm game for the terminal. The notes are the tokens of real source code — keywords, names, operators, literals — falling down their own lanes. Clear the song and you’ve typed out a function.
Clear
- PERFECT
- 0
- GREAT
- 0
- GOOD
- 0
- MISS
- 0
- max combo
- 0
Take over with D F J K, or tap a lane.
fn longest_run(hits: &[bool]) -> u32 { let mut best = 0; let mut run = 0; for &hit in hits { run = if hit { run + 1 } else { 0 }; best = best.max(run); } best}Install
brew tap yukihirop/beatcode https://github.com/yukihirop/beatcodebrew trust --formula yukihirop/beatcode/beatcodebrew install beatcodenpx beatcodecurl -fsSL https://beatcode.run/install.sh | shRuns without installing. Node.js 18 or later.
macOS 11+ · Apple silicon / Intel
beatcode in 93 seconds.
What it plays like, where the charts come from (your repos, GitHub, an AI), sharing a chart as a gist, your result on X, your own leaderboard, and a song while your AI agent works.
The real thing, with the song.
Thirty seconds of the last chorus of Heroes Tonight by Janji (feat. Johnning), played on the bundled Rust charts. The code on the right lights up token by token as it’s hit.
Every token has a lane.
beatcode reads the file, sorts each token by what it is, and drops it down that kind’s lane. Hit them in order and the function writes itself back out.
Comments never become notes.
- DKeyword
- FIdentifier
- JOperator
- KLiteral
What you can play
- Charts
- The bundled songs, the git repos on your machine, your own GitHub repos, or a chart an AI writes for you on the spot. Long files are cut into one chart per function.
- Languages
- Rust, Python, Go, TypeScript, JavaScript, Ruby and PHP. Plain .md / .txt in English or Japanese. C, C#, CSS, HTML, JSON, Shell, TOML, YAML, Zig and Chinese prose come as plugins.
- Music
- Your Spotify liked songs play inside beatcode. Tempo and note timing come from analysing the audio on your machine; nothing is sent anywhere. YouTube Music works too, through Pear Desktop.
- Difficulty
- 4, 6 or 8 lanes — more lanes split tokens into finer kinds. NORMAL, or HARD: the same code packed into 16th notes, with chords and hold notes.
- History
- Every finished play is kept. Pick one to play the same song and chart again.
Get started
Keys
D F J K play the four lanes.
Switch your input method to plain ASCII before you play. With a Japanese IME on, the keys never reach the game.
beatcode | Song select |
|---|---|
beatcode path/to/file.rs | Play one file |
beatcode setup | Connect Spotify, YouTube Music and AI |
beatcode skills | Then run /beatcode-setup in Claude Code or Codex |
beatcode --help | Every command |
Where it runs
- macOS
- 11 or later, Apple silicon or Intel.
- Linux
- Not supported yet.