MANUAL · 14 · CLI
Use it in the terminal (mfm)
mfm is a command that plays the metronome from your terminal. It is an early preview: set the BPM, the beats per bar, and the sound, and it plays.
Install
Run this command in your terminal to install mfm. It is a single binary, so you do not need Node.js or anything else.
curl -fsSL https://metronome.fm/install.sh | sh
It installs to ~/.local/bin. If that folder is not on your PATH, the installer prints a line to add to your shell config. Set MFM_INSTALL_DIR to install somewhere else.
# Install somewhere else
curl -fsSL https://metronome.fm/install.sh | MFM_INSTALL_DIR=/usr/local/bin sh
If you use mise, you can install it with mise too.
mise use -g github:yamauz/mfm
| OS | Support |
|---|---|
| macOS | Apple Silicon and Intel |
| Linux | x86_64 and arm64 (needs ALSA's libasound.so.2) |
| Windows | Not supported |
To update, run the install command again. If you installed it with mise, run mise upgrade.
Play
Run it with a BPM and it starts playing. Press Ctrl+C to stop.
mfm --bpm 120
# 90 BPM, 3 beats per bar, sound 2
mfm -b 90 -n 3 -s 2
While it plays, the beats show on one line in the terminal, and the current beat turns into ●. It uses the same sounds as the app, with an accent on the first beat of each bar.
| Option | What it does |
|---|---|
| -b, --bpm | Tempo, from 1 to 999 (default 120) |
| -n, --beats | Beats per bar, from 1 to 16 (default 4) |
| -s, --sound | Sound, 1 to 4 (default 1). 1 and 4 match the app's acoustic Metronome and Drum |
| --seconds | Stop after this many seconds |
| --render | Write a WAV file instead of playing (length from --seconds, 8 seconds if omitted) |
| -h, --help | Show help |
| -V, --version | Show the version |
# Write 30 seconds at 140 BPM to a WAV file
mfm -b 140 --seconds 30 --render click.wav
This is an early preview, so saved settings, progressive mode, multi-track, and volume controls are not available yet. More is on the way.
Uninstall
If you used the install command, delete the file it installed. mfm does not create any settings files, so that is all.
rm ~/.local/bin/mfm
If you set MFM_INSTALL_DIR, delete mfm from that folder instead. If you installed it with mise, remove it with this command.
mise unuse -g github:yamauz/mfm