CLI Commands
Commands
Section titled “Commands”pertmux serve
Section titled “pertmux serve”Start the background daemon.
pertmux serve # backgrounds automaticallypertmux -c config.toml serve # with specific configpertmux serve --foreground # stay in terminal (for debugging)The daemon forks to the background by default, logging to /tmp/pertmux-daemon.log. It validates your config and checks for an existing daemon before forking — errors show immediately in your terminal. Use --foreground to keep the daemon in your terminal for debugging.
The daemon runs until stopped with pertmux stop.
pertmux connect
Section titled “pertmux connect”Open the TUI client and connect to the running daemon.
pertmux connectFails with a clear error if the daemon is not running.
pertmux stop
Section titled “pertmux stop”Stop the running daemon.
pertmux stoppertmux status
Section titled “pertmux status”Show the daemon socket path and whether it’s running.
pertmux statuspertmux cleanup
Section titled “pertmux cleanup”Clean up stale files and persistence data.
pertmux cleanup- Removes the stale socket file if the daemon is not running.
- Removes
read_state.db(comment tracking) andlast_projectpersistence files. - Skips the live socket if the daemon is still running.
pertmux install
Section titled “pertmux install”Install optional integrations.
pertmux install --codex-hookspertmux install --codex-hooks --localpertmux install --codex-hooks --local --repo /path/to/repopertmux install --codex-hooks --force--codex-hooks installs global Codex hooks into ~/.codex/hooks.json by default. The hooks call pertmux codex-hook for SessionStart, UserPromptSubmit, and Stop, allowing Codex to notify the daemon immediately when a session starts, a user prompt is submitted, or a turn finishes.
Codex requires non-managed command hooks to be reviewed and trusted. After installing, start Codex and run /hooks once to trust the generated hook definitions. For one-off testing, you can start Codex with --dangerously-bypass-hook-trust.
| Option | Description |
|---|---|
--codex-hooks | Install the Codex hook integration |
--local | Install repo-local hooks into .codex/hooks.json instead of global hooks |
--repo <path> | Repository path for --local installs; defaults to the current directory |
--force | Replace an invalid existing hooks file |
Global options
Section titled “Global options”| Option | Description |
|---|---|
-c, --config <path> | Path to TOML config file |
--version | Show version |
-h, --help | Show help |