Skip to content

CLI Reference

The abcls CLI provides subcommands for formatting, validating, rendering, and converting ABC notation files. Install it with:

Terminal window
npm install -g abcls

Run abcls --help or abcls <subcommand> --help for the full option listing.

Formats an ABC file according to the formatter’s rules.

Terminal window
abcls format myfile.abc

Options:

  • -w, --write — write the formatted output back to the file (otherwise prints to stdout)

Validates an ABC file and reports syntax or semantic errors.

Terminal window
abcls check myfile.abc

Renders ABC notation to SVG. Produces one SVG file per tune.

Terminal window
abcls render myfile.abc

Options:

  • -t, --tune <numbers...> — render only the specified tunes by X: number (supports comma-separated, dash-separated, or repeated flags)
  • --ignore-parse-errors — continue rendering even if the ABC file has parsing errors
  • --ignore-missing-tunes — continue rendering even if some requested tunes are not found

Converts an ABC file to MIDI.

Terminal window
abcls abc2midi myfile.abc -o myfile.mid

Options:

  • -o, --output <file> — output MIDI file path (writes to stdout if omitted)
  • -t, --tune <numbers...> — export only the specified tunes by X: number

Converts a MIDI file to ABC notation.

Terminal window
abcls midi2abc myfile.mid -o myfile.abc

Options:

  • -o, --output <file> — output ABC file path (writes to stdout if omitted)
  • --title <title> — set the title (T: field)
  • --composer <composer> — set the composer (C: field)

Converts an ABCx chord sheet to standard ABC notation.

Terminal window
abcls abcx2abc myfile.abcx -o myfile.abc

Options:

  • -o, --output <file> — write output to a file instead of stdout

Starts the ABC language server. This is used by editor integrations (VS Code, Kakoune, Neovim, etc.) and is not typically invoked directly.

Terminal window
abcls lsp --stdio

Options:

  • --stdio — use stdio transport (default)
  • --socket <path> — use Unix socket transport at the given path