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.
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/null02Version
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 migrate03Switching 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 aivisspeech04[effects] — what shows while playing
Turn the effects off one by one if they get in the way of reading the notes.
| Option | Default | What it does |
|---|---|---|
| bomb | true | A ring of light and sparks on the lane you hit |
| beam | false | Light 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 |
| crowd | true | A parade of kaomoji along the bottom of the right pane (4 rows). Hidden when the terminal is under 30 rows |
| combo | true | The big combo count and COMBO above the lanes, while 2 or more are chained. Hidden when the lanes are under 16 rows tall |
| milestone | true | Every 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 |
| notices | true | Show 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.
| Option | Default | What it does |
|---|---|---|
| se | true | false turns the sound effects off |
| volume | 0.5 | Volume 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.
| Option | Default | What 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_text | true | Write the token on each falling note. false draws plain colored bars; the big next token and the code pane stay as they are |
| next_token | true | Show 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_jacket | true | Show 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.
| Option | Default | What 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) |
| analyze | true | For 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.
[ai]provider = "openai"model = "gpt-6-luna"effort = "medium"| Option | Default | What it does |
|---|---|---|
| provider | "openrouter" | "openrouter", "openai", or an external plugin’s id |
| model | the provider’s | Model ID. "openai/gpt-6-luna" on openrouter, "gpt-6-luna" on openai |
| effort | the provider’s | How 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 |
| xray | true | Add 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.
[voice]provider = "voicevox"speaker = 3every = 50combos = [25, 75]text = "{n}コンボ!"| Option | Default | What it does |
|---|---|---|
| provider | none | "voicevox" or "aivisspeech" |
| speaker | voicevox: 3 (Zundamon) / aivisspeech: "zonoko" | Speaker ID or name |
| style | the first (normal) | The style when the speaker is a name ("A" and so on) |
| url | voicevox: http://127.0.0.1:50021 / aivisspeech: http://127.0.0.1:10101 | Where the engine is |
| every | 10 | Speak 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_after | 100 | When 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.
[keys]lanes = [["d", "Left"], "f", "j", ["k", "Right"]]lanes6 = ["q", "w", "e", "i", "o", "p"]| Option | Default |
|---|---|
| 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.
[keys.select]history = "H"ai = ["i", "F2"] [keys.result]retry = "Backspace"| Action | Table | Default | What it does |
|---|---|---|---|
| reload | [keys.select] | r | Songs: 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] | a | Ask the AI to write a chart |
| publish | [keys.select] | g | Publish the chart to a gist |
| fetch | [keys.select] | G | Paste a gist URL or ID: fetch the chart and play it |
| report | [keys.select] | b | Open a bug report or an idea on GitHub |
| ranking | [keys.select] | R | Open the ranking’s top page |
| web | [keys.select] | W | Open the beatcode website |
| commits | [keys.select] | c | Files ⇄ commit diffs of a repo |
| filter | [keys.select] | / | Songs: search songs. Charts: filter the sources |
| artist | [keys.select] | A | Songs: search everywhere for the artist of the song under the cursor |
| sort | [keys.select] | s | Original order → most ★ → best fit for the song |
| difficulty | [keys.select] | d | NORMAL / HARD |
| lanes | [keys.select] | w | 4 / 6 / 8 lanes |
| panel | [keys.select] | v | Code, cover art or camera in the lower right while playing |
| provider | [keys.select] | P | Pick the music, AI and voice providers |
| history | [keys.select] | p | Play history |
| retap | [keys.select] | t | Tap the song’s beat again |
| bpm_down | [keys.select] | - | Silent BPM down |
| bpm_up | [keys.select] | + = | Silent BPM up |
| quit | [keys.select] | q | Back a step, then ask to quit (same as Esc) |
| filter | [keys.history] | / | Filter the history |
| favorite | [keys.history] | f | Add or remove the ♥ |
| feel | [keys.history] | e | How that play felt: ◎ good → ○ ok → △ meh → none |
| reason | [keys.history] | y | Why it felt that way: S off the song → C dull chart → M my playing → none |
| publish | [keys.history] | g | Pick that play's song and chart on song select and publish the chart to a gist |
| share | [keys.history] | x | Make that play's results card again and show it off on X |
| back | [keys.history] | q p | Back to song select (same as Esc) |
| retry | [keys.result] | r | Play the same song again |
| share | [keys.result] | x | Show it off on X |
| ranking | [keys.result] | R | Open the board the play went on |
| timing | [keys.result] | o | Set the timing offset from this play |
| favorite | [keys.result] | f | Add or remove the ♥ |
| feel | [keys.result] | e | How this play felt: ◎ good → ○ ok → △ meh → none |
| reason | [keys.result] | y | Why it felt that way: S off the song → C dull chart → M my playing → none |
| back | [keys.result] | q | Back to song select (same as Esc and Enter) |
| reset | [keys.tap] | r | Start the taps over (same as Backspace) |
| back | [keys.tap] | q | Back (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.
[theme]name = "nord"keyword = "#ff79c6"string = "lightgreen"number = "208"lanes = true| Option | Default | What it does |
|---|---|---|
| name | "default" | default / monokai / dracula / nord / gruvbox / solarized |
| keyword ident type op bracket string number punct | the theme’s | Override one kind: "#rrggbb", a name like "red" or "lightgreen", or a number from "0" to "255" |
| lanes | false | true paints the lanes and notes with the theme too |
| comment | the theme’s | Code that isn’t played, such as comments. default uses #8b949e |
| muted | #a0a0a0 | The 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.
| Option | Default | What it does |
|---|---|---|
| external | true | false 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.
[repos]ignore = ["~/xxxx", "~/go/pkg", "venv"]| Option | Default | What it does |
|---|---|---|
| ignore | none | Directories not gone into when looking for repos |
| min_notes | 400 | The 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 |
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.
---name: Symbolsdescription: short names, packed with operators and bracketslength: 0.6---Write dense {lang} code about {topic}, about {lines} lines. ...| Key | What it does |
|---|---|
| name / description | Shown in the topic box |
| model / effort | Override [ai] for this prompt only |
| length | Multiplier on the lines (sentences for prose) asked for, 0.1–5 |
| lang | The language. Wins over the language tab |
| kind | code (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.
| File | What it is |
|---|---|
| history.tsv | Play 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.tsv | Timing offset, separately for silent, Spotify and YouTube Music |
| <provider>.key | AI keys, one per provider (openrouter.key and so on) |
| ai/ prompts/ ai_prompt.txt | Charts the AI wrote, prompts, and the last prompt used |
| gist/ | Charts fetched from gists and the URLs of charts you published |
| repos.tsv github.tsv | Your local and GitHub repos (r rescans) |
| difficulty.txt lanes.txt panel.txt | The last difficulty, lane count and lower-right panel |
| langs/*.toml | Languages you wrote yourself (beatcode plugins example prints a sample) |