Groove CLI is a terminal groovebox: you create tracks, assign samples, type patterns, and hit play.
Build and run:
cargo build --release
./target/release/groove-cliOr during development:
cargo run --- Default: TUI (tracker-style UI with a command line). This is what you get with no flags.
- Classic REPL:
groove-cli --repl(line-based prompt withrustyline).
groove-cli --open songs/song.yaml
# or
groove-cli -o songs/song.yamlIn REPL mode, if you start with --open … (or if song.yaml exists in the current directory) the app will watch the file and reload audio when it changes.
All commands below work in both modes unless noted.
+ kick snare hat
Track names are single words (no spaces). You can use - name to remove them later.
Use ~ for fuzzy sample selection:
kick ~ 909/kick
snare ~ snare
hat ~ hat
- Tab completion: in the TUI, press Tab after
~to see matches; in the REPL, Tab completion is provided byrustyline. - In the TUI: when there are multiple matches, pressing Tab cycles through them and inserts the current selection into the command line.
- Multi-word fuzzy search:
kick ~ linn snare class<Tab>matches space-separated tokens (any order). - Paths with spaces:
track ~ …accepts spaces; if you want to keep chaining more actions after the sample, use~[ ... ]or quotes.
Example chaining (pattern + sample + gain in one line):
kick x... ~[harsh 909 kick] -3db
kick x...x...x...x...
snare ....x.......x...
hat x.x.x.x.x.x.x.x.
You can also enter melodic note tokens (sharps + flats supported):
+ synth
synth ~ synth/C4
synth c d# eb bb
notes synth
go
. # stop (a single dot)
Aliases: play / stop.
140 # typing a number sets BPM
swing 15 # 0..100 (%)
Optional: set the UI “bar length” (used for the TUI playhead display):
steps 16
Track-first (recommended):
hat -6db
snare +2db
hat mute
hat unmute
kick solo # toggles
snare delay on
snare delay 1/8 0.40 0.25 # time, feedback (0..1), mix (0..1)
snare delay off
Define a variation:
kick.fill x.x.x.x.x.x.x.x.
Switch:
kick > fill
kick > main
kick gen euclid(5,16)
hat gen random(0.35, 42)
snare gen fill(16)
Built-ins include: euclid(k,n), random(density, seed), fill(length), repeat(pattern, n), invert(pattern), rotate(pattern, n), humanize(pattern, amount).
Set env vars (or put them in a .env file):
export OPENAI_API_KEY="..."
# optional
export OPENAI_MODEL="gpt-5.2"Apply a suggestion directly to a track:
kick ai "four on the floor"
Or generate suggestions without applying:
ai kick "funky breakbeat"
save my-song.yaml
open my-song.yaml