Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CLI Reference

Complete reference for all ralph commands and options.

Global Options

ralph [COMMAND]

The command is optional: bare ralph runs ralph chat.

OptionDescription
-V, --versionPrint version information (see version scheme)
-h, --helpPrint help (-h shows a summary)

Commands

CommandDescription
themesList available syntax highlighting themes
askSend a single-shot prompt to the LLM (details)
chatChat with a persistent, compressed memory; default when no command is given (details)
wireRecord harness-to-provider traffic through a local proxy (details)

ralph themes

List available syntax highlighting themes.

Usage

ralph themes

Description

Displays all built-in themes that can be used with the --theme flag. Custom .tmTheme files can also be loaded by specifying a file path instead of a theme name.

Built-in Themes

  • base16-eighties.dark
  • base16-mocha.dark
  • base16-ocean.dark (default)
  • base16-ocean.light
  • InspiredGitHub
  • Monokai Extended
  • Solarized (dark)
  • Solarized (light)

Environment Variables

Environment variables can be used instead of CLI flags. CLI flags take precedence over environment variables.

VariableEquivalent FlagDescription
RALPH_CONFIG_DIRN/AOverride config directory location
RALPH_THEME--themeSet syntax highlighting theme
RALPH_NO_BACKGROUND--no-backgroundDisable theme backgrounds (set to 1)
RALPH_ASK_PERMISSION_MODEask --permission-modePermission mode for ask
RALPH_CHAT_PERMISSION_MODEchat --permission-modePermission mode for chat turns and claude workers
RALPH_WORKTREE_DIRchat --worktree-dirDirectory for worker worktrees
RALPH_CHAT_SKILLSchat --skill:-separated skill directories for chat
RALPH_WRAP_WIDTHchat --wrap-widthColumn cap for chat replies and the prompt area (also [chat] wrap_width); 0 = terminal width

Examples

# Set theme via environment variable
export RALPH_THEME="Solarized (dark)"
ralph ask 'your prompt'

# Use custom config directory
export RALPH_CONFIG_DIR=/custom/config
ralph ask 'your prompt'

# One-off theme override
RALPH_THEME="Monokai Extended" ralph ask 'your prompt'

ralph wire

Run a local recording proxy, or inspect recorded sessions with ls, show, diff, and sessions. Details: ralph wire.

ralph wire [--provider anthropic] [--port N] [--upstream URL] [--dir PATH] [--responses]
FlagDefaultDescription
--provideranthropicProvider to proxy
--port0Port on 127.0.0.1; 0 picks a free port
--upstreamprovider defaultUpstream base URL
--dir<tmp>/ralph-wireDirectory holding session folders
--responsesoffAlso store decoded SSE events per call
ralph wire ls [--session ID] [--dir PATH] [--all] [--json]
ralph wire show N [--session ID] [--dir PATH] [--json]
ralph wire diff A [B] [--session ID] [--dir PATH] [--json]
ralph wire sessions [--dir PATH] [--json]
FlagApplies toDescription
--sessionls, show, diffSession id (default: the latest)
--dirls, show, diff, sessionsDirectory holding session folders (default <tmp>/ralph-wire)
--alllsAlso show non-inference calls
NshowCall number (seq) from ls
A, BdiffCall numbers (seq); with only A, diff A against the earlier call sharing its longest prompt prefix
--jsonls, show, diff, sessionsPrint JSON instead of a table

Exit Codes

CodeMeaning
0Success - all operations completed successfully
1Error - operation failed (see error message for details)

See Also