Prism CLI
What the prism command does while Claude Code runs, and when it sends.
The prism CLI connects your Claude Code and Codex activity to Prism. After you sign in with prism login, it records supported activity while you work, either for every session (you run prism setup once) or for the sessions you start with prism claude or prism codex. The Claude Code plugin and the Codex plugin run the same recording and share the CLI’s sign-in and local files; see Install and update. Read Data collection and visibility before connecting.
What happens while you work
Section titled “What happens while you work”You do not run a Prism command for each prompt or response. If you record every session, prism setup registers five Claude Code hooks (Stop, SessionEnd, StopFailure, TeammateIdle, and SubagentStop) in Claude Code’s settings file and four Codex hooks (Stop, SubagentStop, Interrupt, and SessionEnd) in Codex’s config.toml. The steps then run in this order:
- When one of these events happens, Claude Code or Codex starts the hook. The hook only writes a short note to a local database in the Prism folder (
~/.config/optra-prismon macOS) and returns. It does not use the network and does not wait for Prism, so it does not slow Claude Code down. - If no background sender is running, the hook starts one.
- The sender reads the part of the session record that is new, masks secrets, and sends the result to Prism over HTTPS with the token from your sign-in. Messages go out when one of those events happens, not for every keystroke.
- Records the sender cannot deliver wait on your Mac and are sent later.
From time to time the CLI also asks the server for its collection settings.
If you are not signed in, the CLI sends nothing. prism setup prints nothing is collected until you do for that case.
Choose an action
Section titled “Choose an action”| Task | Command or guide |
|---|---|
| Sign in or sign out | prism login, prism logout |
| Record every session: register or remove the Claude Code and Codex hooks | prism setup, prism setup remove |
| Check sign-in, registration, and sending | prism status |
| Remove everything the CLI put on your Mac | prism uninstall |
| Record one session: start Claude Code or Codex through Prism | prism claude, prism codex |
| Stop collection for one session | PRISM_OFF=1 claude, PRISM_OFF=1 codex, see Stop collection |
| Update the CLI | Install and update |
| Fix a problem | Troubleshooting |
Commands lists what each command shows and does.
Where results appear
Section titled “Where results appear”Use Realtime for recent prompts, Sessions for past work, and Report for a review over a chosen period. The CLI itself prints no scores.
Work is evaluated after its window closes: at the end of a session, after /clear, or three hours after the last activity. A score can therefore arrive later than the prompt itself.