Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
cux
command
cux — Run multiple Claude Code Pro/Max accounts as one.
|
cux — Run multiple Claude Code Pro/Max accounts as one. |
|
internal
|
|
|
atomicfile
Package atomicfile writes files in a way that survives crashes and concurrent readers.
|
Package atomicfile writes files in a way that survives crashes and concurrent readers. |
|
branding
Package branding holds the cux ASCII banner shown at install / setup time.
|
Package branding holds the cux ASCII banner shown at install / setup time. |
|
claudecfg
Package claudecfg manipulates the oauthAccount block inside Claude Code's global config (~/.claude/.claude.json), without touching any of the surrounding settings (themes, MCP servers, history, etc.).
|
Package claudecfg manipulates the oauthAccount block inside Claude Code's global config (~/.claude/.claude.json), without touching any of the surrounding settings (themes, MCP servers, history, etc.). |
|
config
Package config persists user preferences for cux at $XDG_CONFIG_HOME/cux/config.json (or $HOME/.config/cux/config.json when XDG_CONFIG_HOME is unset).
|
Package config persists user preferences for cux at $XDG_CONFIG_HOME/cux/config.json (or $HOME/.config/cux/config.json when XDG_CONFIG_HOME is unset). |
|
creds
Package creds reads and writes OAuth tokens for Claude Code.
|
Package creds reads and writes OAuth tokens for Claude Code. |
|
history
Package history is the persistent log of every account swap cux performs.
|
Package history is the persistent log of every account swap cux performs. |
|
hookinstall
Package hookinstall manages cux's entries in Claude Code's per-user settings file (~/.claude/settings.json).
|
Package hookinstall manages cux's entries in Claude Code's per-user settings file (~/.claude/settings.json). |
|
hooks
Package hooks implements the bodies of `cux hook stop`, `cux hook session-start`, and `cux hook rate-limit`.
|
Package hooks implements the bodies of `cux hook stop`, `cux hook session-start`, and `cux hook rate-limit`. |
|
lockfile
Package lockfile provides an advisory exclusive lock keyed to a file path.
|
Package lockfile provides an advisory exclusive lock keyed to a file path. |
|
monitor
Package monitor stitches store, creds, and usage together to keep the on-disk usage cache fresh.
|
Package monitor stitches store, creds, and usage together to keep the on-disk usage cache fresh. |
|
paths
Package paths centralises every on-disk location cux reads or writes, so the rest of the codebase never builds a path string by hand.
|
Package paths centralises every on-disk location cux reads or writes, so the rest of the codebase never builds a path string by hand. |
|
ptyhost
The attach socket's framed protocol, shared by the Unix (ptyhost.go) and Windows (ptyhost_windows.go) hosts and by `cux attach` / bridges:
|
The attach socket's framed protocol, shared by the Unix (ptyhost.go) and Windows (ptyhost_windows.go) hosts and by `cux attach` / bridges: |
|
registry
Package registry is the wrapper's heartbeat: every running cux wrapper self-reports what it is doing into one small JSON file under the runtime directory.
|
Package registry is the wrapper's heartbeat: every running cux wrapper self-reports what it is doing into one small JSON file under the runtime directory. |
|
session
Package session captures the running Claude Code session ID so the wrapper can call `claude --resume <id>` after an account swap.
|
Package session captures the running Claude Code session ID so the wrapper can call `claude --resume <id>` after an account swap. |
|
signals
Package signals is the file-based message bus between Claude Code's hooks (writers) and the cux wrapper (reader).
|
Package signals is the file-based message bus between Claude Code's hooks (writers) and the cux wrapper (reader). |
|
store
Package store owns cux's state file (state.json) and the per-account oauthAccount-block backups.
|
Package store owns cux's state file (state.json) and the per-account oauthAccount-block backups. |
|
strategy
Package strategy decides which managed account to swap to when the wrapper has determined a swap is needed.
|
Package strategy decides which managed account to swap to when the wrapper has determined a swap is needed. |
|
supportnotice
Package supportnotice throttles cux's support line: nothing for the first week after install, then at most once every 30 days.
|
Package supportnotice throttles cux's support line: nothing for the first week after install, then at most once every 30 days. |
|
switcher
Package switcher orchestrates the high-level operations on top of store, creds, and claudecfg: adding the currently-logged-in account, switching the active account, removing one.
|
Package switcher orchestrates the high-level operations on top of store, creds, and claudecfg: adding the currently-logged-in account, switching the active account, removing one. |
|
transcripts
Package transcripts derives per-project usage statistics from the session transcripts Claude Code already writes under ~/.claude/projects.
|
Package transcripts derives per-project usage statistics from the session transcripts Claude Code already writes under ~/.claude/projects. |
|
updater
Package updater is the opt-in update-check path.
|
Package updater is the opt-in update-check path. |
|
usage
Package usage talks to the Anthropic usage API (https://api.anthropic.com/api/oauth/usage) so cux can show users how much of their 5-hour and 7-day budgets each managed account has consumed, and so the wrapper can swap accounts before a hard cap is hit.
|
Package usage talks to the Anthropic usage API (https://api.anthropic.com/api/oauth/usage) so cux can show users how much of their 5-hour and 7-day budgets each managed account has consumed, and so the wrapper can swap accounts before a hard cap is hit. |
|
wrapper
Package wrapper runs `claude` as a child process and orchestrates the v0.2 hook-driven swap flow:
|
Package wrapper runs `claude` as a child process and orchestrates the v0.2 hook-driven swap flow: |
Click to show internal directories.
Click to hide internal directories.