psi now has a launcher-owned canonical CLI surface.
psi [launcher-flags] [psi-runtime-flags]
The launcher constructs startup basis data before psi.main starts.
That means user/project extension manifests participate in classpath and
extension availability before the JVM launches.
Launcher realization policy controls how psi and psi-owned extensions are resolved at startup. Three policies exist:
| Policy | When used | How psi is resolved |
|---|---|---|
jar | Default for released versions | Single org.hugoduncan/psi Maven coordinate from Clojars — fast, cached |
installed | Default for unreleased/git installs | Local paths relative to the launcher root (git checkout) |
development | Contributor/repo-local flows | Local paths relative to the launcher root (source tree) |
Auto-detection: when psi/version.edn contains a release semver (not
"unreleased"), the launcher defaults to :jar policy. An unreleased build
defaults to :installed.
Override with PSI_LAUNCHER_POLICY:
PSI_LAUNCHER_POLICY=jar psi # force Maven resolution (released builds)
PSI_LAUNCHER_POLICY=installed psi # force git/local paths (installed builds)
PSI_LAUNCHER_POLICY=development psi # force source-tree paths (contributors)
--tui) depends on
jline-terminal-ffm which uses the Java Foreign Function & Memory API
(finalized in Java 21, class-file version 66 = Java 22 minimum).
Java 25 is the version used in CI and recommended for production use.bb).Canonical install path:
bbin install org.hugoduncan/psi --as psi --mvn/version LATEST
Repo-local / development install alternative:
bbin install . --as psi
Repo-local development path without installation:
bb bb/psi.clj -- --tui
Legacy alias-based startup such as clojure -M:psi ... is now non-canonical.
It may still be useful in development or transition periods, but it is no
longer the primary documented startup contract.
These are consumed by the launcher and are not forwarded to psi.main.
--cwd <path>
--launcher-debug
:psi/init usage, and basis summary.All other flags are forwarded unchanged to psi.main.
--tui
--rpc-edn
--rpc-trace-file <path>
--rpc-edn, append inbound/outbound RPC frames to <path> as newline-delimited EDN.:dir :in and :dir :out) with timestamp and raw wire line.psi.extension/set-rpc-trace.--nrepl [port]
port is omitted, a random port is chosen.--model <key>
psi.ai.models/all-models).PSI_MODEL when not provided.--log-level <LEVEL>
TRACE | DEBUG | INFO | WARN | ERROR | FATAL | REPORT (case-insensitive).--memory-store <in-memory>--memory-store-fallback <on|off|true|false>--memory-history-limit <n>--memory-retention-snapshots <n>--memory-retention-deltas <n><n> must be a positive integer.
--llm-idle-timeout-ms <n>
<n> positive integer).600000 (10 minutes).ANTHROPIC_API_KEYOPENAI_API_KEYPSI_MODELPSI_DEVELOPER_PROMPTMemory-related:
PSI_MEMORY_STOREPSI_MEMORY_STORE_AUTO_FALLBACKPSI_MEMORY_HISTORY_COMMIT_LIMITPSI_MEMORY_RETENTION_SNAPSHOTSPSI_MEMORY_RETENTION_DELTASSession/runtime tuning:
PSI_LLM_IDLE_TIMEOUT_MS--model flag overrides PSI_MODEL.--llm-idle-timeout-ms overrides PSI_LLM_IDLE_TIMEOUT_MS.# Console
psi
# TUI
psi --tui
# RPC mode
psi --rpc-edn
# RPC mode with transport trace file
psi --rpc-edn --rpc-trace-file /tmp/psi-rpc.ndedn
# nREPL on random port
psi --nrepl
# nREPL on fixed port
psi --nrepl 7888
# TUI + nREPL
psi --tui --nrepl
# Pick model key
psi --model sonnet-4.6
# Memory retention
psi --memory-store in-memory \
--memory-retention-snapshots 500 \
--memory-retention-deltas 2000
# Disable auto fallback to in-memory
psi --memory-store-fallback off
# Launcher debug
psi --launcher-debug --tui
# Override cwd for manifest lookup and launched process
psi --cwd /path/to/project --rpc-edn
Old alias-based examples map directly:
clojure -M:psi -> psi
clojure -M:psi --tui -> psi --tui
clojure -M:psi --rpc-edn -> psi --rpc-edn
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |