Settings

beatcode reads its settings from one file, config.toml. Everything has a default, so write only what you want to change. This page goes through every section.

01Where it lives

Settings live in ~/.config/beatcode/config.toml (under XDG_CONFIG_HOME if it is set). Without the file, everything is default.

beatcode reads it at startup. An unknown option or a typo stops beatcode with the line and column, because quietly falling back to the default would hide the mistake. After editing, check it with beatcode --help >/dev/null: it prints nothing when the file is fine. beatcode config init writes an example with every option to config.toml.example, leaving config.toml alone.

Below is an example with a little of each section. Each section is explained further down.

~/.config/beatcode/config.toml
version = "1.0.0" [effects]bomb = falsebeam = truecrowd = falsecombo = falsemilestone = false [sound]se = falsevolume = 0.3 [display]icons = "text"logo = "text" [music]provider = "spotify"analyze = true [ai]provider = "openrouter"model = "openai/gpt-6-luna"effort = "low" [voice]provider = "aivisspeech" [keys]lanes = [["d", "Left"], "f", "j", ["k", "Right"]] [theme]name = "dracula"keyword = "#ff79c6" [plugins]external = false [repos]ignore = ["~/xxxx", "venv"]
beatcode configbeatcode --help >/dev/null

02Version

The version at the top is the version of the config.toml format (x.y.z), separate from beatcode’s own version. It is 1.0.0 now; without it, the file is read as 1.0.0. beatcode setup and beatcode provider add it when they write the file.

The format version goes up when an option is renamed or changes shape. A file of an older version still works, translated as it is read; beatcode config migrate rewrites it in the current format, keeps your comments, and leaves the original as config.toml.<version>.bak.

A file newer than this beatcode stops with “please update beatcode”. beatcode config shows where the file is and its version.

beatcode config migrate

03Switching providers

The provider of [music], [ai] and [voice] can be switched with a command instead of by hand. Only that one line changes; your other lines and comments stay.

beatcode provider alone lists the current providers and whether they are connected, and what to run next when they aren’t. For voice, off removes the provider, so beatcode stays quiet.

beatcode providerbeatcode provider music youtube-musicbeatcode provider ai openaibeatcode provider voice aivisspeech

04[effects] — what shows while playing

Turn the effects off one by one if they get in the way of reading the notes.

OptionDefaultWhat it does
bombtrueA ring of light and sparks on the lane you hit
beamfalseLight up the whole lane while you press its key. The key label under the judgment line lights up either way. Off by default, because a whole lane flashing on every press tires the eyes
crowdtrueA parade of kaomoji along the bottom of the right pane (4 rows). Hidden when the terminal is under 30 rows
combotrueThe big combo count and COMBO above the lanes, while 2 or more are chained. Hidden when the lanes are under 16 rows tall
milestonetrueEvery 100 combo, the big count flashes gold (rainbow at 500 and every 500 from 1000) with sparks, and the lane dividers and the judgment line pulse on the beat. With combo = false the dividers and the line still pulse
noticestrueShow notices from work in another terminal (beatcode notify, sent by the /beatcode-work skill) in the crowd. false shows none, and beatcode notify leaves nothing either

05[sound] — menu sound effects

Short sounds for moving the cursor, switching tabs, confirming, going back, opening a screen and starting a song. Nothing plays when you hit notes.

beatcode makes the sounds itself (there are no sound files) and mixes them over the music.

OptionDefaultWhat it does
setruefalse turns the sound effects off
volume0.5Volume from 0 to 1

06[display] — language, icons, logo and token text

The environment variables BEATCODE_ICONS and BEATCODE_LANG win over icons and language, so you can try a setting for one run without editing the file.

The logo shows at startup (a 1 s splash), in the song select and history titles, above the ready screen’s guide, on the tap-the-tempo screen, in the quit box, above the rank on the result screen, in the top-right box while playing, and at the top of beatcode --help.

OptionDefaultWhat it does
icons"nerd"Icons for repos, files and ranks. "text" uses letters like gh / 1st, "none" shows none
language"auto"Screen language: "auto" / "ja" / "en". auto picks Japanese when LC_ALL / LC_MESSAGES / LANG starts with ja, English otherwise
note_texttrueWrite the token on each falling note. false draws plain colored bars; the big next token and the code pane stay as they are
next_tokentrueShow the next token to hit large in the middle of the lanes. false hides it; the text on notes and the code pane stay as they are
select_jackettrueShow the cover art of the song under the cursor in the right panel while you’re on Songs in song select; false keeps the code there (terminals that can show images only; Spotify, or YouTube Music once the preview plays that song)
logo"auto"auto shows the image on terminals that can show images (kitty graphics, iTerm2 or sixel; not inside tmux or in Terminal.app) and a ▀▄█ text logo elsewhere. "text" always uses the text logo, "none" shows no logo and no splash

07[music] — where songs play from

Spotify plays inside beatcode and needs Premium. YouTube Music drives the Pear Desktop app through its API server. The song list shows only the songs of the provider you pick here; another name stops beatcode with unknown variant.

With Spotify, beatcode reads the song’s audio on your machine to set the tempo and where the notes go. The audio is never sent anywhere.

OptionDefaultWhat it does
provider"spotify""spotify" or "youtube-music"
url"http://127.0.0.1:26538"For youtube-music: where Pear Desktop’s API server is (http:// only)
analyzetrueFor spotify: read the audio to set the tempo and notes. With false it works like YouTube Music: you tap the tempo with Space, notes sit on the 8th-note grid (16th on HARD), there is no sort by fit, and previews start a third of the way in. Earlier analyses are kept and used again when you set it back to true

08[ai] — who writes AI charts

Built in are OpenRouter and OpenAI. You can also write the id of an external provider plugin (beatcode-plugin-provider-ai-<id> on PATH), such as google-ai-studio for the Gemini API: install it with beatcode plugins install google-ai-studio and check it with beatcode plugins.

Model IDs are written differently per provider (openai/gpt-6-luna on OpenRouter, gpt-6-luna on OpenAI), so change or remove model when you switch providers.

The API key is asked for by beatcode setup and kept in its own file per provider, readable only by you. An environment variable wins over it.

~/.config/beatcode/config.toml
[ai]provider = "openai"model = "gpt-6-luna"effort = "medium"
OptionDefaultWhat it does
provider"openrouter""openrouter", "openai", or an external plugin’s id
modelthe provider’sModel ID. "openai/gpt-6-luna" on openrouter, "gpt-6-luna" on openai
effortthe provider’sHow much to think: none / minimal / low / medium / high and so on, depending on the model. "low" on openrouter, openai and google-ai-studio. Empty to not send it
xraytrueAdd the X-ray of an analyzed song (its sections and how many notes fall in each) to the prompt. The audio itself is never sent. YouTube Music songs get none
xray_notes[1000, 2000]How many notes a chart with an X-ray should have. If the song has too few spots, more come from the grid; if too many, the weakest go

09[voice] — calling out combos

With a VOICEVOX or AivisSpeech engine running on your machine, beatcode says “50 combo!” and the like while you play. The clips are made ahead on the ready screen, so they play on time.

Without provider, beatcode stays quiet. beatcode voice check makes one clip with these settings and plays it. beatcode voice prepare [N] makes the clips up to N combo (1000 if left out) ahead of time.

~/.config/beatcode/config.toml
[voice]provider = "voicevox"speaker = 3every = 50combos = [25, 75]text = "{n}コンボ!"
OptionDefaultWhat it does
providernone"voicevox" or "aivisspeech"
speakervoicevox: 3 (Zundamon) / aivisspeech: "zonoko"Speaker ID or name
stylethe first (normal)The style when the speaker is a name ("A" and so on)
urlvoicevox: http://127.0.0.1:50021 / aivisspeech: http://127.0.0.1:10101Where the engine is
every10Speak at every multiple of this. 0 for none
combos[]Other combo counts to speak at, like [25, 75]
text"{n}コンボ!"The words. {n} becomes the combo count
miss_after100When a combo of at least this many breaks on a miss, say miss_text. 0 for never
miss_text"あ〜やっちゃったぁ〜"The words for that

10[keys] — lane keys

List the keys from the left lane. To give a lane several keys, write a list for it. Each lane count has its own option, so changing lanes6 leaves 4 lanes as they were.

A key is one character (letters are case-insensitive here) or Left Right Up Down Tab Backspace Home End PageUp PageDown Insert Delete F1–F12. Space, Enter and Esc start and stop the game, so they can’t be lane keys. The same key in two lanes is an error.

~/.config/beatcode/config.toml
[keys]lanes = [["d", "Left"], "f", "j", ["k", "Right"]]lanes6 = ["q", "w", "e", "i", "o", "p"]
OptionDefault
lanes["d", "f", "j", "k"]
lanes6["s", "d", "f", "j", "k", "l"]
lanes8["a", "s", "d", "f", "j", "k", "l", ";"]

11[keys.select] and friends — screen keys

Each screen has its own table: [keys.select] for song select, [keys.history] for the play history, [keys.result] for the results and [keys.tap] for tapping the beat. Write an action’s name and its key; actions you leave out keep their default. The key hints at the bottom of the screen and messages that name a key show the keys you wrote.

Keys are written as for lanes, but letters are case-sensitive: R and r are different keys. A list means any of them works.

Keys that move, pick or go back can’t be assigned: ↑↓←→, h j k l, Tab, Home, End, PageUp, PageDown, Space, Enter and Esc. Those, the text inputs (the / filter and the AI topic), the confirm boxes, and the keys on the ready screen and while playing stay as they are.

The same key for two actions in one table is an error. Different tables may share a key, as r does now.

~/.config/beatcode/config.toml
[keys.select]history = "H"ai = ["i", "F2"] [keys.result]retry = "Backspace"
ActionTableDefaultWhat it does
reload[keys.select]rSongs: reload the song list. Charts: rescan your repos
source_prev[keys.select][The previous chart source
source_next[keys.select]]The next chart source
ai[keys.select]aAsk the AI to write a chart
publish[keys.select]gPublish the chart to a gist
fetch[keys.select]GPaste a gist URL or ID: fetch the chart and play it
report[keys.select]bOpen a bug report or an idea on GitHub
ranking[keys.select]ROpen the ranking’s top page
web[keys.select]WOpen the beatcode website
commits[keys.select]cFiles ⇄ commit diffs of a repo
filter[keys.select]/Songs: search songs. Charts: filter the sources
artist[keys.select]ASongs: search everywhere for the artist of the song under the cursor
sort[keys.select]sOriginal order → most ★ → best fit for the song
difficulty[keys.select]dNORMAL / HARD
lanes[keys.select]w4 / 6 / 8 lanes
panel[keys.select]vCode, cover art or camera in the lower right while playing
provider[keys.select]PPick the music, AI and voice providers
history[keys.select]pPlay history
retap[keys.select]tTap the song’s beat again
bpm_down[keys.select]-Silent BPM down
bpm_up[keys.select]+ =Silent BPM up
quit[keys.select]qBack a step, then ask to quit (same as Esc)
filter[keys.history]/Filter the history
favorite[keys.history]fAdd or remove the ♥
feel[keys.history]eHow that play felt: ◎ good → ○ ok → △ meh → none
reason[keys.history]yWhy it felt that way: S off the song → C dull chart → M my playing → none
publish[keys.history]gPick that play's song and chart on song select and publish the chart to a gist
share[keys.history]xMake that play's results card again and show it off on X
back[keys.history]q pBack to song select (same as Esc)
retry[keys.result]rPlay the same song again
share[keys.result]xShow it off on X
ranking[keys.result]ROpen the board the play went on
timing[keys.result]oSet the timing offset from this play
favorite[keys.result]fAdd or remove the ♥
feel[keys.result]eHow this play felt: ◎ good → ○ ok → △ meh → none
reason[keys.result]yWhy it felt that way: S off the song → C dull chart → M my playing → none
back[keys.result]qBack to song select (same as Esc and Enter)
reset[keys.tap]rStart the taps over (same as Backspace)
back[keys.tap]qBack (same as Esc)

12[theme] — colors

Colors per kind of token for the code on song select and the code pane while playing (the tokens not hit yet). The code always uses all eight kinds, whatever the lane count.

The lanes, notes, bombs and beams keep their own colors unless you write lanes = true. Then the literal lane of 4 lanes takes string; with 6, the identifier-and-type lane takes ident and the operator-and-separator lane takes op.

A color that can’t be read stops beatcode and names the option. On terminals without 24-bit color (COLORTERM not truecolor), #rrggbb falls back to the nearest of 256 colors.

~/.config/beatcode/config.toml
[theme]name = "nord"keyword = "#ff79c6"string = "lightgreen"number = "208"lanes = true
OptionDefaultWhat it does
name"default"default / monokai / dracula / nord / gruvbox / solarized
keyword ident type op bracket string number punctthe theme’sOverride one kind: "#rrggbb", a name like "red" or "lightgreen", or a number from "0" to "255"
lanesfalsetrue paints the lanes and notes with the theme too
commentthe theme’sCode that isn’t played, such as comments. default uses #8b949e
muted#a0a0a0The faint gray across the screens: line numbers, the chart column in the history, hints and borders

13[plugins] — external languages

beatcode finds language plugins on your PATH (beatcode-plugin-lang-* and beatcode-plugin-nlang-*) and languages you wrote yourself in ~/.config/beatcode/langs/*.toml. Turn that off here.

With external = false, external AI providers aren’t loaded either, and writing one in [ai] is an error.

OptionDefaultWhat it does
externaltruefalse skips external languages and providers

14[repos] — where not to look for repos

beatcode looks for your repos by finding .git up to 3 levels below your home. ignore lists directories it doesn’t go into.

An entry with / or ~ is that one place (relative to home unless it starts with ~/ or /). An entry without is a directory name at any level. It doesn’t filter files inside a repo.

After changing it, beatcode rescans on the next launch; you don’t have to press r.

~/.config/beatcode/config.toml
[repos]ignore = ["~/xxxx", "~/go/pkg", "venv"]
OptionDefaultWhat it does
ignorenoneDirectories not gone into when looking for repos
min_notes400The fewest notes a chart made from a repo file may have. Functions in the same file are joined top to bottom until they reach it, and a function over twice this is cut partway. Whatever stays short is left out of the chart list. Bundled, AI and Gist charts and commit diffs are not affected

15[share] — the ranking

With a ranking server, the results screen sends each finished play to it and says how it went. R there opens the board the play went on, and R on song select opens the ranking’s top page.

You are named by your GitHub sign-in in gh, and its token goes to the server, so only write a server you trust. The Ranking server page explains running your own.

~/.config/beatcode/config.toml
[share]ranking_server_url = "https://ranking.example.com"
OptionDefaultWhat it does
ranking_server_urlnoneThe ranking server (https://…; http:// only on this machine). Left out or empty, nothing is sent
ranking_allow_httpfalsetrue also sends to an http:// server on another machine, such as one in your home network. Your GitHub token travels unencrypted

16AI prompts

The prompts for AI charts are Markdown files in ~/.config/beatcode/prompts/, one per file. The first time you press a, the seven bundled ones are written there: standard, song mood, symbol-heavy, rhythm-first and textbook for code, and standard and song mood for prose. They are read again each time you press a, so edits show at once.

When a new beatcode bundles a new prompt, only that one is added. Prompts you deleted don’t come back, and files you edited aren’t overwritten.

{lang}, {topic} and {lines} in the body are replaced (for prose, {lines} is the number of sentences). {difficulty} becomes how tokens are placed at the selected difficulty, and {lanes} the token kinds in each lane. {title}, {artist}, {bpm} and {duration} come from the selected song (empty when unknown), {ui_lang} is Japanese or English (the UI language), and {date} is today's date. If the body has {topic}, only the body is sent; otherwise the body becomes the instructions and the topic, language and length go separately.

beatcode adds one instruction to every prompt: write 2–4 sentences about the feelings behind the code. They show under the graph on the result screen.

{xray} puts the song X-ray (the song’s sections and how many tokens to write in each) where you write it. The page “Writing prompts” (guide/prompts/) covers it, what beatcode adds after your text, and how to print the exact text that is sent.

Writing prompts: where {xray} goes and what beatcode adds →

~/.config/beatcode/prompts/symbols.md
---name: Symbolsdescription: short names, packed with operators and bracketslength: 0.6---Write dense {lang} code about {topic}, about {lines} lines. ...
KeyWhat it does
name / descriptionShown in the topic box
model / effortOverride [ai] for this prompt only
lengthMultiplier on the lines (sentences for prose) asked for, 0.1–5
langThe language. Wins over the language tab
kindcode (default) or prose. A prose lang implies prose

17Files beatcode keeps

Besides config.toml, beatcode keeps these in ~/.config/beatcode/. Key and token files are readable only by you.

~/.cache/beatcode/ (under XDG_CACHE_HOME if set) holds repos fetched from GitHub (removed by beatcode github clean), the combo voice clips, and a log of why Spotify tracks failed to load. All of it is made again when needed.

FileWhat it is
history.tsvPlay history, up to 1000 plays
favorites.tsv♥ favorites
spotify/Spotify login, song analysis, tapped tempos, output latency, track names and searched songs
youtube-music/Pear Desktop token, tapped tempos and searched songs
judge_offset.tsvTiming offset, separately for silent, Spotify and YouTube Music
<provider>.keyAI keys, one per provider (openrouter.key and so on)
ai/ prompts/ ai_prompt.txtCharts the AI wrote, prompts, and the last prompt used
gist/Charts fetched from gists and the URLs of charts you published
repos.tsv github.tsvYour local and GitHub repos (r rescans)
difficulty.txt lanes.txt panel.txtThe last difficulty, lane count and lower-right panel
langs/*.tomlLanguages you wrote yourself (beatcode plugins example prints a sample)
← How to play: one song from start to finish