How do I run the ores shell?

Table of Contents

compass shell wraps the ores.shell REPL so a session never needs hand-rolled connection flags: the binary is resolved from the checkout's preset and the NATS connection comes from .env.

Question

How do I run the ORE Studio shell against my local environment, interactively or as a scripted session?

Answer

Interactive REPL, connected and (when credentials are configured) logged in:

./compass.sh shell

Scripted session — feed a file of ores-shell commands; an exit is appended automatically when missing:

printf 'currencies history USD\n' > /tmp/session.ores
./compass.sh shell -u newuser3 -p "$ORES_SHELL_LOGIN_PASSWORD" -f /tmp/session.ores

Defaults come from .env: the binary from ORES_PRESET, the connection from ORES_SHELL_NATS_URL, ORES_SHELL_NATS_SUBJECT_PREFIX and the ORES_SHELL_NATS_TLS_* keys, and credentials from ORES_SHELL_LOGIN_USERNAME / ORES_SHELL_LOGIN_PASSWORD when present. Flags override:

  • -u/--username, -p/--password — login credentials.
  • -f FILE — scripted session from FILE.
  • --preset NAME — locate the binary under a different preset.
  • --log-enabled, --log-level LEVEL — forwarded to ores.shell.
  • --dry-run — print the command (password masked) without running.
  • Anything after -- is forwarded to ores.shell verbatim.

The Emacs dashboard's Open ORE Studio shell item launches the REPL through this command, so both entry points share the same defaults.

Script

compass shell in projects/ores.compass/src/compass.py (cmd_shell).

Tested by

Manual: compass shell --dry-run shows the resolved command; scripted smoke via -f during the currency history pilot dogfood (2026-06-05).

See also

Emacs 29.1 (Org mode 9.6.6)