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.

What you’ve typed
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 beatcode

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.

Edited from beatcode record recordings, with captions and zooms. A small bot that reads the screen did the hitting. Song: Elektronomia - Sky High [NCS Release]. Music provided by NoCopyrightSounds. Free Download/Stream: http://ncs.io/skyhigh Watch: http://youtu.be/TW9d8vYrVFQ. In the play scenes: Janji - Heroes Tonight (feat. Johnning) [NCS Release]. Music provided by NoCopyrightSounds. Free Download/Stream: http://ncs.io/ht Watch: http://youtu.be/3nQNiWdeH2Q

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.

Recorded with beatcode record while Spotify played the song, from 2:38 to 3:08; the sound is what beatcode record captured as it played. A small bot that reads the screen did the hitting, so the score isn’t a person’s. Song: Janji - Heroes Tonight (feat. Johnning) [NCS Release]. Music provided by NoCopyrightSounds. Free Download/Stream: http://ncs.io/ht Watch: http://youtu.be/3nQNiWdeH2Q

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.

  1. DKeyword
  2. FIdentifier
  3. JOperator
  4. 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.

Read the guide →

beatcodeSong select
beatcode path/to/file.rsPlay one file
beatcode setupConnect Spotify, YouTube Music and AI
beatcode skillsThen run /beatcode-setup in Claude Code or Codex
beatcode --helpEvery command

Where it runs

macOS
11 or later, Apple silicon or Intel.
Linux
Not supported yet.