Skip to content

CLI Reference

The resonon binary runs a file, drops into a REPL, or manages the runtime around it (server, views, versions, plugins). This page covers the runtime CLI. For the project and package commands (init, new, install, …), see the Package Management guide.

resonon [OPTIONS] [FILE]
ArgumentDescription
[FILE]Resonon file to run offline. Omit for the interactive REPL.

Running a file renders it once and exits — this is the offline-rendering path. The REPL and the VSCode extension are the live-coding paths.

OptionDescription
-m, --midi-port <NAME>MIDI output port (partial match supported).
--list-portsList available MIDI ports and exit.
--no-midiDisable MIDI output. This is the default when no port is specified.
--multicore[=<BOOL>]Enable multicore audio rendering. --multicore / --multicore=true on, --multicore=false off; omit to use the config file (default off).
--plugin-mod-stride <N>Samples between external-plugin automation points (default 16). 1 = per-sample.
-h, --helpPrint help.
-V, --versionPrint version.
Terminal window
resonon song.non # render a file once
resonon -m "IAC Driver" song.non # render, sending MIDI to a port
resonon --list-ports # see available MIDI ports
resonon # start the REPL

Start the WebSocket server for remote code execution and TUI views.

OptionDefaultDescription
--server-port <PORT>5555WebSocket server port.
--server-host <HOST>0.0.0.0Server host address.
--server-name <NAME>hostnameCustom name for discovery.
--password <PASS>Require a password (falls back to RESONON_SERVER_PASSWORD).
Terminal window
resonon server --server-port 6000 --server-name "studio"

Launch a TUI view connected to a running server. Views: console, midi_monitor, mixer, routing, scope.

OptionDescription
--port <PORT>Server port (omit for the auto-discovery connection screen).
--host <HOST>Server host (omit for auto-discovery).
--midi-port <NAME>MIDI input filter for the midi_monitor view (partial match).
--password <PASS>Password for a protected server.
Terminal window
resonon view mixer --host 10.0.0.5 --port 5555

Open the browser render page for a running server.

OptionDefaultDescription
--port <PORT>5555Server port.
--host <HOST>127.0.0.1Server host.

The render page is served by the server, so the server must already be running.

Manage installed Resonon versions (stored under ~/.resonon/versions/).

SubcommandDescription
list (default)List installed versions.
currentPrint the active version.
switch <VERSION>Switch the active version (may require sudo).
Terminal window
resonon version list
sudo resonon version switch v0.2.0

Manage audio plugins (CLAP + VST3).

SubcommandDescription
scanScan plugin directories and update the caches.
listList discovered plugins from the caches.
Terminal window
resonon plugin scan
resonon plugin list

These scaffold projects and manage dependencies. They’re covered in the Package Management guide:

CommandPurpose
resonon init <name>Scaffold a project in the current directory.
resonon new <name>Create a project in a new directory.
resonon buildBuild a native extension.
resonon install [src]Install a package, or all from resonon.toml.
resonon update [name]Update dependencies.
resonon remove <name>Remove a dependency.
resonon pkg …install / list / inspect / update.

init, new, and build accept --lib, --kit, and --native flags to choose the project type.

VariableDescription
RESONON_HOMEOverride the ~/.resonon home directory (config, lib, kits, …).
RESONON_MIDI_PORTDefault MIDI output port name.
RESONON_SERVER_PASSWORDDefault server password (used by server when --password is omitted).

Advanced audio-engine tuning (rarely needed): RESONON_PARALLEL, RESONON_WORKERS, RESONON_SPIN_BUDGET, and RESONON_PLUGIN_MOD_STRIDE override their respective config/CLI settings.

The output port is resolved first-match-wins:

  1. CLI flag (-m, --midi-port)
  2. Environment variable (RESONON_MIDI_PORT)
  3. Config file ([midi] output_port)

When you run resonon with a file or the REPL, it:

  1. Initializes logging and extracts embedded CLAP plugins.
  2. Parses CLI arguments; subcommands (view, version, pkg, plugin, …) handle their work and exit early.
  3. Handles --list-ports (prints ports and exits).
  4. Loads ~/.resonon/config.toml.
  5. Initializes the audio engine with the configured output device.
  6. Connects MIDI ports (the default port plus any named [[midi.outputs]]).
  7. Starts the REPL or runs the specified file.