# Command line reference

The zene command-line tools — headless export, stem export, mastering and the control socket.

Source: https://zenestudio.org/docs/reference/cli

Markdown version of the Zene Studio page at https://zenestudio.org/docs/reference/cli. For a map of the whole site, see
https://zenestudio.org/llms.txt.

---
Zene Studio ships command-line entry points alongside the GUI, and they are currently the **only**
way to reach some features.

## Starting a session with a socket

```bash
zene --control-socket /tmp/zene.sock
```

Opt-in, off by default, local UNIX socket. See [Control socket](/docs/control/control-socket) —
including the security implications, which are not hypothetical.

## `zene exportstems`

Renders a project's tracks to separate files that line up and sum back to the mix.

```bash
zene exportstems my-song.mmp --output ./stems
```

Headless only. There is no interface control for it in the alpha.

## `zene master`

Auto-mastering, wave one: one render, several **measured** candidates against a named loudness
target. It generates and measures; it does **not** choose.

```bash
zene master my-song.mmp --target -14
```

## Talking to a running instance

```bash
# List every command, with schemas and reversibility classes
echo '{"command":"control.commands_list"}' | nc -U /tmp/zene.sock

# Undo, reaching the same history as Ctrl+Z
echo '{"command":"control.undo"}' | nc -U /tmp/zene.sock
```

## Verifying the build

```bash
zene --version
```

## Reproducibility and coverage

These project-side scripts are the measurement tools, and they live in the application repository,
not in a packaged binary:

```bash
bash tools/render-determinism-probe.sh --all   # bit-reproducibility sweep
bash tools/dawproject-proof.sh                 # the reversibility contract table
```

See [How we verify](/docs/control/verification) for what the output means.

## A note on flags

Argument parsing is still settling in the alpha. If a flag is rejected, check the release notes for
the build you are running. Do not assume the flag is missing forever, and please
[report it](https://github.com/KRUZZZZY/zene-studio/issues/new/choose).