About this project

# Opaline CLI Opaline CLI is a command-line tool that captures Claude Code and OpenAI Codex sessions and uploads them to the Opaline platform for team analytics. The production API is hosted at `https://opaline.so`. It was formerly known as `rudel` and maintains compatibility with that name. ## Quick Start Requires Node.js 20 or newer. Run `npx opaline@latest` from any directory. The CLI scans local Claude Code and Codex sessions, displays repository and session counts, and lets you choose which repositories to upload and keep syncing. Login opens only after selection. `pnpx opaline@latest` also works; a global install is optional. Copying the command from the Opaline demo adds a hidden `--code` value. That one-time code pairs the terminal with your browser for live selection and upload status. It expires after ten minutes if unused. Approve login in the same browser where you copied the command. First-time uploads continue browser setup; returning users open their workspace Sessions page. Automatic uploads retain the bundled CLI under `~/.rudel/runtime` and use your Node executable, so hooks keep working after the temporary runner cache is gone. `opaline login` opens a browser-based device flow. `opaline upload` groups local worktrees by repository, lets you choose which repositories stay synchronized, installs the required Claude Code and/or Codex hooks, and uploads new sessions. Open the same table to turn repositories ON or OFF. Existing `rudel` users do not need to log in again. Opaline intentionally reads the existing `~/.rudel` credential and state directory, and the `rudel` package continues as a compatibility alias. Run `opaline upload` from any directory, including your home folder. The picker finds saved sessions across repositories and uploads the repositories you select. It also enables automatic uploads for those selections. Claude Code's hook is installed in your user settings, so setup does not depend on your current directory. Existing hooks and settings are preserved. ## Typical Workflow Run `opaline upload` (or `npx opaline@latest`) to open the repository table. The table fills during scanning, then shows local and already-uploaded session counts alongside ON/OFF toggles. Space changes a repository; Enter opens a review with newly added, already active, and deactivated repositories. Enter confirms; Esc returns to editing. Upload progress stays in the same table. Existing Rudel hooks are recognized as enabled. Saving migrates owned hooks to Opaline, removes duplicate local hooks, and preserves unrelated agent settings. Codex notification tools can coexist with automatic uploads. Opaline retains the existing command and arguments, forwards the notification JSON, and uploads independently. Codex Computer Use stays at the front of its notification chain. Turning uploads OFF keeps notifications working. Custom scripts are preserved; Opaline does not rewrite scripts that invoke older Rudel installations themselves. Setup failures show their complete details and a retry/back action, including the settings file to fix when a Codex configuration is invalid. ## Key Concepts - **Sessions:** Claude Code and Codex JSONL transcripts discovered on the local machine. - **Hooks:** Agent lifecycle commands installed by `opaline upload` or `opaline enable`. Hooks run headlessly, consult the repository allowlist, filter known secret patterns, and upload the completed session. - **Organizations:** The Opaline workspace receiving uploads. Use `opaline set-org` to change the organization associated with a project. - **Local state:** Credentials, retry queues, logs, and project mappings remain in `~/.rudel` for compatibility. Set `OPALINE_CONFIG_DIR` to opt into another directory; `RUDEL_CONFIG_DIR` remains supported. - **Compatibility alias:** The `rudel` executable delegates to the same Opaline implementation with unchanged arguments, standard input/output, and exit status. Its only addition is one rename notice on stderr per invocation.