Skip to content

Latest commit

History

214 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ClaudeX Logo

ClaudeX

Build WorkflowGitHub Release

CapabilitiesInstallUsageNotes


ClaudeX is a companion CLI for Claude Code that finds every Claude account on the machine and configures them identically, writes an AGENTS.md and skills layout into a project, and launches a session under the account you pick.

It exists for juggling several Claude subscriptions, and everything except the account picker works the same with one. It does not replace claude, which launch execs.

Capabilities

CategoryCommandsDescription
Accountsconfigure, status, switch, oauth-tokenProvision every account, read its usage, move a project between accounts
SessionslaunchPick the account and the session, then exec claude
Project layoutapply, apply-preset, clean-cwdWrite and remove the AGENTS.md and skills layout
Presetscreate-presetScaffold your own bundle of skills and rules

Install

Release binary

# Linux/macOS
curl -sL https://github.com/tanq16/claudex/releases/latest/download/claudex-$(uname -s | tr '[:upper:]''[:lower:]')-$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') -o claudex
chmod +x claudex
sudo mv claudex /usr/local/bin/

Each release carries claudex-linux-amd64, claudex-linux-arm64, claudex-darwin-amd64, and claudex-darwin-arm64.

From source

Needs Go 1.27.

git clone https://github.com/tanq16/claudex.git
cd claudex
make build

make build-all produces all four platform binaries instead.

Usage

--debug is on every command and swaps the styled output for zerolog: a timestamped console line in a terminal, and JSON when stdout is not one. Color and cursor redraws drop automatically off a terminal too, so piping any command gives plain text with no flag. -A/--account takes an account config directory path, and on launch and switch it also matches on just the directory name. Global state lives under ~/.config/claudex/, holding the plugin in global/ and presets in presets/.

configure

Provisions every discovered account, then lays down the global defaults once.

Per account it writes statusline.sh into the account directory and points settings.json at it. The statusline shows the account label, the model, the working directory, the git branch, context used, and the 5h and 7d rate-limit percentages. It also merges these keys into the existing settings.json, leaving every other key alone:

KeyValue
attribution.commit""
effortLevelxhigh
tuifullscreen
autoMemoryEnabledfalse
skipDangerousModePermissionPrompttrue
outputStyleConcise
env.DISABLE_AUTOUPDATER1
env.ENABLE_CLAUDEAI_MCP_SERVERSfalse

An account whose settings.json is not valid JSON is skipped rather than overwritten.

The global defaults are a Claude Code plugin at ~/.config/claudex/global/, carrying an .lsp.json that wires gopls, pyright-langserver, and typescript-language-server, plus the built-in presets extracted into ~/.config/claudex/presets/.

-A configures one account instead of all of them. -l/--label overrides the account label in the statusline and requires -A; without it the label comes from the directory name, where .claude is first, .claude2 is second, .claude3 is third, and anything else uses the numeric suffix.

apply

Writes the layout into the current directory:

AGENTS.md base instruction block, between <!-- claudex:base --> markers
CLAUDE.md -> AGENTS.md
.agents/skills/ session-summary, skill-creator, write-document
.claude/skills -> ../.agents/skills

AGENTS.md and .agents/skills/ are the real files, following the Agent Skills layout that Cursor and Codex read on their own, and the two symlinks exist because Claude Code looks for the other names.

An existing AGENTS.md keeps everything outside the markers: the base block is inserted or replaced in place. The same four paths also go into .git/info/exclude, which is local to your clone, so the layout never appears in git status and never gets pushed.

Nothing is written when any of those paths already holds something ClaudeX did not put there. Every conflict is reported at once so you can clear them in one pass rather than one run per path.

apply-preset

A preset is a directory under ~/.config/claudex/presets/ holding a preset.yaml, an optional AGENTS.partial.md, and a skills/ directory. Applying one symlinks its skills into .agents/skills/ and writes its partial as its own marked section of AGENTS.md, keyed by preset name, so re-applying replaces that section instead of appending a second copy. It needs claudex apply to have run first.

claudex apply-preset # multi-select picker
claudex apply-preset private # by name; several names apply in order

--skills links only the skills and leaves AGENTS.md alone. --agents writes only the section and links no skills. Neither flag applies the whole preset; passing one narrows the run to that half.

One preset ships in the binary. private carries 31 skills covering Go and Node conventions, containers, release workflows, and testing, plus the author's development, pull request, and operating rules as an AGENTS.md section.

The manifest keys:

KeyDefaultDescription
namethe directory nameShown in the picker and used as the AGENTS.md section key
descriptionemptyOne line shown beside the name in the picker
skillsevery directory under skills/ holding a SKILL.mdWhich skills to link

create-preset

Scaffolds ~/.config/claudex/presets/<name>/ with a preset.yaml, an AGENTS.partial.md, and an empty skills/. Names take lowercase letters, digits, and single hyphens.

clean-cwd

Removes what apply and apply-preset wrote: .agents/, both symlinks, the ClaudeX sections of AGENTS.md, and the .git/info/exclude block.

launch

Prompts for new or resume, for the account, and for MCP mode, then execs claude with --dangerously-skip-permissions, a --plugin-dir pointing at the global plugin, and CLAUDE_CONFIG_DIR set to the account you picked. Any inherited CLAUDE_CONFIG_DIR is stripped first so it cannot override that choice. The plugin is rebuilt on every launch, so language servers work without running configure.

The new-or-resume prompt only appears when this project has sessions, and the account prompt only when there is more than one account. Resume lists this project's 10 most recent sessions across every account, and picking one launches under the account that holds it.

FlagEffect
-A/--accountSkip the account picker
--newStart a new session
--resumeResume: the latest session, or a list when there is more than one
--session <id>Resume that session by id
--mcp mcps|connectors|noneSkip the MCP picker

--new, --resume, and --session are mutually exclusive. The MCP modes are mcps for MCP servers on, connectors to add Claude.ai connectors on top, and none for --strict-mcp-config. Launch hands the session to claude, so it errors without an interactive terminal.

status

Per account, the 5h session window and the 7d windows as bars with their reset times. It reads the account's OAuth token from the macOS Keychain or from .credentials.json and queries Anthropic's usage endpoint, so an expired token shows as a prompt to open Claude Code on that account. --json prints the raw numbers, -A limits it to one account.

switch

Moves the current project's session files and history entries out of the account holding them and into another. It needs at least two accounts, and -A/--account is required without an interactive terminal.

The picker lists this project's sessions from every account, under a row that takes all the ones in the account holding the newest. Picking a single session moves only that session, out of whichever account holds it. --session <id> names one directly and skips the picker, and without a terminal there is no picker, so it moves the whole account unless --session narrows it.

oauth-token

Runs the OAuth PKCE flow in a browser and prints an access token to stdout. -p/--port pins the local callback port, which defaults to one the OS picks, and -e/--expires-in sets the requested expiry in seconds, which the server may override. --manual prints the authorize URL instead of opening a browser and takes the code pasted back, for a machine with no browser to hand off to. Status lines and the URL are printed only when stdout is a terminal, so TOKEN=$(claudex oauth-token) still captures the token alone.

Notes

  • Account discovery.~/.claude and every ~/.claudeN directory whose suffix is digits, such as ~/.claude2. Nothing else in your home directory counts as an account.
  • Preset skills are symlinks. They point back into ~/.config/claudex/presets/, so editing a preset changes every project that applied it. The three base skills from apply are real copies extracted from the binary, so re-running apply is what updates them.
  • Built-in presets are refreshed from the binary.~/.config/claudex/presets/private/ is rewritten whenever a preset command runs, so edits to it do not survive. Presets you create yourself are never touched.
  • Language server binaries are yours to install. ClaudeX writes the .lsp.json, and a server whose binary is missing is skipped while the rest still start. Install commands and the typescript@5 pin are in docs/language-servers.md.
  • Another repo's agent files..git/info/exclude only reaches untracked files, so a GEMINI.md or .cursor/ that the repository itself tracks stays in your working tree. docs/foreign-agent-files.md covers the sparse-checkout that removes them.

About

Multi-account CLI companion for Claude Code that tracks usage limits, launches configured sessions, and applies skills & output styles.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
GitHub - Tanq16/claudex: Multi-account CLI companion for Claude Code that tracks usage limits, launches configured sessions, and applies skills & output styles. · GitHub
Skip to content

Latest commit

History

214 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ClaudeX Logo

ClaudeX

Build WorkflowGitHub Release

CapabilitiesInstallUsageNotes


ClaudeX is a companion CLI for Claude Code that finds every Claude account on the machine and configures them identically, writes an AGENTS.md and skills layout into a project, and launches a session under the account you pick.

It exists for juggling several Claude subscriptions, and everything except the account picker works the same with one. It does not replace claude, which launch execs.

Capabilities

CategoryCommandsDescription
Accountsconfigure, status, switch, oauth-tokenProvision every account, read its usage, move a project between accounts
SessionslaunchPick the account and the session, then exec claude
Project layoutapply, apply-preset, clean-cwdWrite and remove the AGENTS.md and skills layout
Presetscreate-presetScaffold your own bundle of skills and rules

Install

Release binary

# Linux/macOS
curl -sL https://github.com/tanq16/claudex/releases/latest/download/claudex-$(uname -s | tr '[:upper:]''[:lower:]')-$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') -o claudex
chmod +x claudex
sudo mv claudex /usr/local/bin/

Each release carries claudex-linux-amd64, claudex-linux-arm64, claudex-darwin-amd64, and claudex-darwin-arm64.

From source

Needs Go 1.27.

git clone https://github.com/tanq16/claudex.git
cd claudex
make build

make build-all produces all four platform binaries instead.

Usage

--debug is on every command and swaps the styled output for zerolog: a timestamped console line in a terminal, and JSON when stdout is not one. Color and cursor redraws drop automatically off a terminal too, so piping any command gives plain text with no flag. -A/--account takes an account config directory path, and on launch and switch it also matches on just the directory name. Global state lives under ~/.config/claudex/, holding the plugin in global/ and presets in presets/.

configure

Provisions every discovered account, then lays down the global defaults once.

Per account it writes statusline.sh into the account directory and points settings.json at it. The statusline shows the account label, the model, the working directory, the git branch, context used, and the 5h and 7d rate-limit percentages. It also merges these keys into the existing settings.json, leaving every other key alone:

KeyValue
attribution.commit""
effortLevelxhigh
tuifullscreen
autoMemoryEnabledfalse
skipDangerousModePermissionPrompttrue
outputStyleConcise
env.DISABLE_AUTOUPDATER1
env.ENABLE_CLAUDEAI_MCP_SERVERSfalse

An account whose settings.json is not valid JSON is skipped rather than overwritten.

The global defaults are a Claude Code plugin at ~/.config/claudex/global/, carrying an .lsp.json that wires gopls, pyright-langserver, and typescript-language-server, plus the built-in presets extracted into ~/.config/claudex/presets/.

-A configures one account instead of all of them. -l/--label overrides the account label in the statusline and requires -A; without it the label comes from the directory name, where .claude is first, .claude2 is second, .claude3 is third, and anything else uses the numeric suffix.

apply

Writes the layout into the current directory:

AGENTS.md base instruction block, between <!-- claudex:base --> markers
CLAUDE.md -> AGENTS.md
.agents/skills/ session-summary, skill-creator, write-document
.claude/skills -> ../.agents/skills

AGENTS.md and .agents/skills/ are the real files, following the Agent Skills layout that Cursor and Codex read on their own, and the two symlinks exist because Claude Code looks for the other names.

An existing AGENTS.md keeps everything outside the markers: the base block is inserted or replaced in place. The same four paths also go into .git/info/exclude, which is local to your clone, so the layout never appears in git status and never gets pushed.

Nothing is written when any of those paths already holds something ClaudeX did not put there. Every conflict is reported at once so you can clear them in one pass rather than one run per path.

apply-preset

A preset is a directory under ~/.config/claudex/presets/ holding a preset.yaml, an optional AGENTS.partial.md, and a skills/ directory. Applying one symlinks its skills into .agents/skills/ and writes its partial as its own marked section of AGENTS.md, keyed by preset name, so re-applying replaces that section instead of appending a second copy. It needs claudex apply to have run first.

claudex apply-preset # multi-select picker
claudex apply-preset private # by name; several names apply in order

--skills links only the skills and leaves AGENTS.md alone. --agents writes only the section and links no skills. Neither flag applies the whole preset; passing one narrows the run to that half.

One preset ships in the binary. private carries 31 skills covering Go and Node conventions, containers, release workflows, and testing, plus the author's development, pull request, and operating rules as an AGENTS.md section.

The manifest keys:

KeyDefaultDescription
namethe directory nameShown in the picker and used as the AGENTS.md section key
descriptionemptyOne line shown beside the name in the picker
skillsevery directory under skills/ holding a SKILL.mdWhich skills to link

create-preset

Scaffolds ~/.config/claudex/presets/<name>/ with a preset.yaml, an AGENTS.partial.md, and an empty skills/. Names take lowercase letters, digits, and single hyphens.

clean-cwd

Removes what apply and apply-preset wrote: .agents/, both symlinks, the ClaudeX sections of AGENTS.md, and the .git/info/exclude block.

launch

Prompts for new or resume, for the account, and for MCP mode, then execs claude with --dangerously-skip-permissions, a --plugin-dir pointing at the global plugin, and CLAUDE_CONFIG_DIR set to the account you picked. Any inherited CLAUDE_CONFIG_DIR is stripped first so it cannot override that choice. The plugin is rebuilt on every launch, so language servers work without running configure.

The new-or-resume prompt only appears when this project has sessions, and the account prompt only when there is more than one account. Resume lists this project's 10 most recent sessions across every account, and picking one launches under the account that holds it.

FlagEffect
-A/--accountSkip the account picker
--newStart a new session
--resumeResume: the latest session, or a list when there is more than one
--session <id>Resume that session by id
--mcp mcps|connectors|noneSkip the MCP picker

--new, --resume, and --session are mutually exclusive. The MCP modes are mcps for MCP servers on, connectors to add Claude.ai connectors on top, and none for --strict-mcp-config. Launch hands the session to claude, so it errors without an interactive terminal.

status

Per account, the 5h session window and the 7d windows as bars with their reset times. It reads the account's OAuth token from the macOS Keychain or from .credentials.json and queries Anthropic's usage endpoint, so an expired token shows as a prompt to open Claude Code on that account. --json prints the raw numbers, -A limits it to one account.

switch

Moves the current project's session files and history entries out of the account holding them and into another. It needs at least two accounts, and -A/--account is required without an interactive terminal.

The picker lists this project's sessions from every account, under a row that takes all the ones in the account holding the newest. Picking a single session moves only that session, out of whichever account holds it. --session <id> names one directly and skips the picker, and without a terminal there is no picker, so it moves the whole account unless --session narrows it.

oauth-token

Runs the OAuth PKCE flow in a browser and prints an access token to stdout. -p/--port pins the local callback port, which defaults to one the OS picks, and -e/--expires-in sets the requested expiry in seconds, which the server may override. --manual prints the authorize URL instead of opening a browser and takes the code pasted back, for a machine with no browser to hand off to. Status lines and the URL are printed only when stdout is a terminal, so TOKEN=$(claudex oauth-token) still captures the token alone.

Notes

  • Account discovery.~/.claude and every ~/.claudeN directory whose suffix is digits, such as ~/.claude2. Nothing else in your home directory counts as an account.
  • Preset skills are symlinks. They point back into ~/.config/claudex/presets/, so editing a preset changes every project that applied it. The three base skills from apply are real copies extracted from the binary, so re-running apply is what updates them.
  • Built-in presets are refreshed from the binary.~/.config/claudex/presets/private/ is rewritten whenever a preset command runs, so edits to it do not survive. Presets you create yourself are never touched.
  • Language server binaries are yours to install. ClaudeX writes the .lsp.json, and a server whose binary is missing is skipped while the rest still start. Install commands and the typescript@5 pin are in docs/language-servers.md.
  • Another repo's agent files..git/info/exclude only reaches untracked files, so a GEMINI.md or .cursor/ that the repository itself tracks stays in your working tree. docs/foreign-agent-files.md covers the sparse-checkout that removes them.

About

Multi-account CLI companion for Claude Code that tracks usage limits, launches configured sessions, and applies skills & output styles.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - Tanq16/claudex: Multi-account CLI companion for Claude Code that tracks usage limits, launches configured sessions, and applies skills & output styles. · GitHub
Skip to content

Latest commit

History

214 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ClaudeX Logo

ClaudeX

Build WorkflowGitHub Release

CapabilitiesInstallUsageNotes


ClaudeX is a companion CLI for Claude Code that finds every Claude account on the machine and configures them identically, writes an AGENTS.md and skills layout into a project, and launches a session under the account you pick.

It exists for juggling several Claude subscriptions, and everything except the account picker works the same with one. It does not replace claude, which launch execs.

Capabilities

CategoryCommandsDescription
Accountsconfigure, status, switch, oauth-tokenProvision every account, read its usage, move a project between accounts
SessionslaunchPick the account and the session, then exec claude
Project layoutapply, apply-preset, clean-cwdWrite and remove the AGENTS.md and skills layout
Presetscreate-presetScaffold your own bundle of skills and rules

Install

Release binary

# Linux/macOS
curl -sL https://github.com/tanq16/claudex/releases/latest/download/claudex-$(uname -s | tr '[:upper:]''[:lower:]')-$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') -o claudex
chmod +x claudex
sudo mv claudex /usr/local/bin/

Each release carries claudex-linux-amd64, claudex-linux-arm64, claudex-darwin-amd64, and claudex-darwin-arm64.

From source

Needs Go 1.27.

git clone https://github.com/tanq16/claudex.git
cd claudex
make build

make build-all produces all four platform binaries instead.

Usage

--debug is on every command and swaps the styled output for zerolog: a timestamped console line in a terminal, and JSON when stdout is not one. Color and cursor redraws drop automatically off a terminal too, so piping any command gives plain text with no flag. -A/--account takes an account config directory path, and on launch and switch it also matches on just the directory name. Global state lives under ~/.config/claudex/, holding the plugin in global/ and presets in presets/.

configure

Provisions every discovered account, then lays down the global defaults once.

Per account it writes statusline.sh into the account directory and points settings.json at it. The statusline shows the account label, the model, the working directory, the git branch, context used, and the 5h and 7d rate-limit percentages. It also merges these keys into the existing settings.json, leaving every other key alone:

KeyValue
attribution.commit""
effortLevelxhigh
tuifullscreen
autoMemoryEnabledfalse
skipDangerousModePermissionPrompttrue
outputStyleConcise
env.DISABLE_AUTOUPDATER1
env.ENABLE_CLAUDEAI_MCP_SERVERSfalse

An account whose settings.json is not valid JSON is skipped rather than overwritten.

The global defaults are a Claude Code plugin at ~/.config/claudex/global/, carrying an .lsp.json that wires gopls, pyright-langserver, and typescript-language-server, plus the built-in presets extracted into ~/.config/claudex/presets/.

-A configures one account instead of all of them. -l/--label overrides the account label in the statusline and requires -A; without it the label comes from the directory name, where .claude is first, .claude2 is second, .claude3 is third, and anything else uses the numeric suffix.

apply

Writes the layout into the current directory:

AGENTS.md base instruction block, between <!-- claudex:base --> markers
CLAUDE.md -> AGENTS.md
.agents/skills/ session-summary, skill-creator, write-document
.claude/skills -> ../.agents/skills

AGENTS.md and .agents/skills/ are the real files, following the Agent Skills layout that Cursor and Codex read on their own, and the two symlinks exist because Claude Code looks for the other names.

An existing AGENTS.md keeps everything outside the markers: the base block is inserted or replaced in place. The same four paths also go into .git/info/exclude, which is local to your clone, so the layout never appears in git status and never gets pushed.

Nothing is written when any of those paths already holds something ClaudeX did not put there. Every conflict is reported at once so you can clear them in one pass rather than one run per path.

apply-preset

A preset is a directory under ~/.config/claudex/presets/ holding a preset.yaml, an optional AGENTS.partial.md, and a skills/ directory. Applying one symlinks its skills into .agents/skills/ and writes its partial as its own marked section of AGENTS.md, keyed by preset name, so re-applying replaces that section instead of appending a second copy. It needs claudex apply to have run first.

claudex apply-preset # multi-select picker
claudex apply-preset private # by name; several names apply in order

--skills links only the skills and leaves AGENTS.md alone. --agents writes only the section and links no skills. Neither flag applies the whole preset; passing one narrows the run to that half.

One preset ships in the binary. private carries 31 skills covering Go and Node conventions, containers, release workflows, and testing, plus the author's development, pull request, and operating rules as an AGENTS.md section.

The manifest keys:

KeyDefaultDescription
namethe directory nameShown in the picker and used as the AGENTS.md section key
descriptionemptyOne line shown beside the name in the picker
skillsevery directory under skills/ holding a SKILL.mdWhich skills to link

create-preset

Scaffolds ~/.config/claudex/presets/<name>/ with a preset.yaml, an AGENTS.partial.md, and an empty skills/. Names take lowercase letters, digits, and single hyphens.

clean-cwd

Removes what apply and apply-preset wrote: .agents/, both symlinks, the ClaudeX sections of AGENTS.md, and the .git/info/exclude block.

launch

Prompts for new or resume, for the account, and for MCP mode, then execs claude with --dangerously-skip-permissions, a --plugin-dir pointing at the global plugin, and CLAUDE_CONFIG_DIR set to the account you picked. Any inherited CLAUDE_CONFIG_DIR is stripped first so it cannot override that choice. The plugin is rebuilt on every launch, so language servers work without running configure.

The new-or-resume prompt only appears when this project has sessions, and the account prompt only when there is more than one account. Resume lists this project's 10 most recent sessions across every account, and picking one launches under the account that holds it.

FlagEffect
-A/--accountSkip the account picker
--newStart a new session
--resumeResume: the latest session, or a list when there is more than one
--session <id>Resume that session by id
--mcp mcps|connectors|noneSkip the MCP picker

--new, --resume, and --session are mutually exclusive. The MCP modes are mcps for MCP servers on, connectors to add Claude.ai connectors on top, and none for --strict-mcp-config. Launch hands the session to claude, so it errors without an interactive terminal.

status

Per account, the 5h session window and the 7d windows as bars with their reset times. It reads the account's OAuth token from the macOS Keychain or from .credentials.json and queries Anthropic's usage endpoint, so an expired token shows as a prompt to open Claude Code on that account. --json prints the raw numbers, -A limits it to one account.

switch

Moves the current project's session files and history entries out of the account holding them and into another. It needs at least two accounts, and -A/--account is required without an interactive terminal.

The picker lists this project's sessions from every account, under a row that takes all the ones in the account holding the newest. Picking a single session moves only that session, out of whichever account holds it. --session <id> names one directly and skips the picker, and without a terminal there is no picker, so it moves the whole account unless --session narrows it.

oauth-token

Runs the OAuth PKCE flow in a browser and prints an access token to stdout. -p/--port pins the local callback port, which defaults to one the OS picks, and -e/--expires-in sets the requested expiry in seconds, which the server may override. --manual prints the authorize URL instead of opening a browser and takes the code pasted back, for a machine with no browser to hand off to. Status lines and the URL are printed only when stdout is a terminal, so TOKEN=$(claudex oauth-token) still captures the token alone.

Notes

  • Account discovery.~/.claude and every ~/.claudeN directory whose suffix is digits, such as ~/.claude2. Nothing else in your home directory counts as an account.
  • Preset skills are symlinks. They point back into ~/.config/claudex/presets/, so editing a preset changes every project that applied it. The three base skills from apply are real copies extracted from the binary, so re-running apply is what updates them.
  • Built-in presets are refreshed from the binary.~/.config/claudex/presets/private/ is rewritten whenever a preset command runs, so edits to it do not survive. Presets you create yourself are never touched.
  • Language server binaries are yours to install. ClaudeX writes the .lsp.json, and a server whose binary is missing is skipped while the rest still start. Install commands and the typescript@5 pin are in docs/language-servers.md.
  • Another repo's agent files..git/info/exclude only reaches untracked files, so a GEMINI.md or .cursor/ that the repository itself tracks stays in your working tree. docs/foreign-agent-files.md covers the sparse-checkout that removes them.

About

Multi-account CLI companion for Claude Code that tracks usage limits, launches configured sessions, and applies skills & output styles.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - Tanq16/claudex: Multi-account CLI companion for Claude Code that tracks usage limits, launches configured sessions, and applies skills & output styles. · GitHub
Skip to content

Latest commit

History

214 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ClaudeX Logo

ClaudeX

Build WorkflowGitHub Release

CapabilitiesInstallUsageNotes


ClaudeX is a companion CLI for Claude Code that finds every Claude account on the machine and configures them identically, writes an AGENTS.md and skills layout into a project, and launches a session under the account you pick.

It exists for juggling several Claude subscriptions, and everything except the account picker works the same with one. It does not replace claude, which launch execs.

Capabilities

CategoryCommandsDescription
Accountsconfigure, status, switch, oauth-tokenProvision every account, read its usage, move a project between accounts
SessionslaunchPick the account and the session, then exec claude
Project layoutapply, apply-preset, clean-cwdWrite and remove the AGENTS.md and skills layout
Presetscreate-presetScaffold your own bundle of skills and rules

Install

Release binary

# Linux/macOS
curl -sL https://github.com/tanq16/claudex/releases/latest/download/claudex-$(uname -s | tr '[:upper:]''[:lower:]')-$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') -o claudex
chmod +x claudex
sudo mv claudex /usr/local/bin/

Each release carries claudex-linux-amd64, claudex-linux-arm64, claudex-darwin-amd64, and claudex-darwin-arm64.

From source

Needs Go 1.27.

git clone https://github.com/tanq16/claudex.git
cd claudex
make build

make build-all produces all four platform binaries instead.

Usage

--debug is on every command and swaps the styled output for zerolog: a timestamped console line in a terminal, and JSON when stdout is not one. Color and cursor redraws drop automatically off a terminal too, so piping any command gives plain text with no flag. -A/--account takes an account config directory path, and on launch and switch it also matches on just the directory name. Global state lives under ~/.config/claudex/, holding the plugin in global/ and presets in presets/.

configure

Provisions every discovered account, then lays down the global defaults once.

Per account it writes statusline.sh into the account directory and points settings.json at it. The statusline shows the account label, the model, the working directory, the git branch, context used, and the 5h and 7d rate-limit percentages. It also merges these keys into the existing settings.json, leaving every other key alone:

KeyValue
attribution.commit""
effortLevelxhigh
tuifullscreen
autoMemoryEnabledfalse
skipDangerousModePermissionPrompttrue
outputStyleConcise
env.DISABLE_AUTOUPDATER1
env.ENABLE_CLAUDEAI_MCP_SERVERSfalse

An account whose settings.json is not valid JSON is skipped rather than overwritten.

The global defaults are a Claude Code plugin at ~/.config/claudex/global/, carrying an .lsp.json that wires gopls, pyright-langserver, and typescript-language-server, plus the built-in presets extracted into ~/.config/claudex/presets/.

-A configures one account instead of all of them. -l/--label overrides the account label in the statusline and requires -A; without it the label comes from the directory name, where .claude is first, .claude2 is second, .claude3 is third, and anything else uses the numeric suffix.

apply

Writes the layout into the current directory:

AGENTS.md base instruction block, between <!-- claudex:base --> markers
CLAUDE.md -> AGENTS.md
.agents/skills/ session-summary, skill-creator, write-document
.claude/skills -> ../.agents/skills

AGENTS.md and .agents/skills/ are the real files, following the Agent Skills layout that Cursor and Codex read on their own, and the two symlinks exist because Claude Code looks for the other names.

An existing AGENTS.md keeps everything outside the markers: the base block is inserted or replaced in place. The same four paths also go into .git/info/exclude, which is local to your clone, so the layout never appears in git status and never gets pushed.

Nothing is written when any of those paths already holds something ClaudeX did not put there. Every conflict is reported at once so you can clear them in one pass rather than one run per path.

apply-preset

A preset is a directory under ~/.config/claudex/presets/ holding a preset.yaml, an optional AGENTS.partial.md, and a skills/ directory. Applying one symlinks its skills into .agents/skills/ and writes its partial as its own marked section of AGENTS.md, keyed by preset name, so re-applying replaces that section instead of appending a second copy. It needs claudex apply to have run first.

claudex apply-preset # multi-select picker
claudex apply-preset private # by name; several names apply in order

--skills links only the skills and leaves AGENTS.md alone. --agents writes only the section and links no skills. Neither flag applies the whole preset; passing one narrows the run to that half.

One preset ships in the binary. private carries 31 skills covering Go and Node conventions, containers, release workflows, and testing, plus the author's development, pull request, and operating rules as an AGENTS.md section.

The manifest keys:

KeyDefaultDescription
namethe directory nameShown in the picker and used as the AGENTS.md section key
descriptionemptyOne line shown beside the name in the picker
skillsevery directory under skills/ holding a SKILL.mdWhich skills to link

create-preset

Scaffolds ~/.config/claudex/presets/<name>/ with a preset.yaml, an AGENTS.partial.md, and an empty skills/. Names take lowercase letters, digits, and single hyphens.

clean-cwd

Removes what apply and apply-preset wrote: .agents/, both symlinks, the ClaudeX sections of AGENTS.md, and the .git/info/exclude block.

launch

Prompts for new or resume, for the account, and for MCP mode, then execs claude with --dangerously-skip-permissions, a --plugin-dir pointing at the global plugin, and CLAUDE_CONFIG_DIR set to the account you picked. Any inherited CLAUDE_CONFIG_DIR is stripped first so it cannot override that choice. The plugin is rebuilt on every launch, so language servers work without running configure.

The new-or-resume prompt only appears when this project has sessions, and the account prompt only when there is more than one account. Resume lists this project's 10 most recent sessions across every account, and picking one launches under the account that holds it.

FlagEffect
-A/--accountSkip the account picker
--newStart a new session
--resumeResume: the latest session, or a list when there is more than one
--session <id>Resume that session by id
--mcp mcps|connectors|noneSkip the MCP picker

--new, --resume, and --session are mutually exclusive. The MCP modes are mcps for MCP servers on, connectors to add Claude.ai connectors on top, and none for --strict-mcp-config. Launch hands the session to claude, so it errors without an interactive terminal.

status

Per account, the 5h session window and the 7d windows as bars with their reset times. It reads the account's OAuth token from the macOS Keychain or from .credentials.json and queries Anthropic's usage endpoint, so an expired token shows as a prompt to open Claude Code on that account. --json prints the raw numbers, -A limits it to one account.

switch

Moves the current project's session files and history entries out of the account holding them and into another. It needs at least two accounts, and -A/--account is required without an interactive terminal.

The picker lists this project's sessions from every account, under a row that takes all the ones in the account holding the newest. Picking a single session moves only that session, out of whichever account holds it. --session <id> names one directly and skips the picker, and without a terminal there is no picker, so it moves the whole account unless --session narrows it.

oauth-token

Runs the OAuth PKCE flow in a browser and prints an access token to stdout. -p/--port pins the local callback port, which defaults to one the OS picks, and -e/--expires-in sets the requested expiry in seconds, which the server may override. --manual prints the authorize URL instead of opening a browser and takes the code pasted back, for a machine with no browser to hand off to. Status lines and the URL are printed only when stdout is a terminal, so TOKEN=$(claudex oauth-token) still captures the token alone.

Notes

  • Account discovery.~/.claude and every ~/.claudeN directory whose suffix is digits, such as ~/.claude2. Nothing else in your home directory counts as an account.
  • Preset skills are symlinks. They point back into ~/.config/claudex/presets/, so editing a preset changes every project that applied it. The three base skills from apply are real copies extracted from the binary, so re-running apply is what updates them.
  • Built-in presets are refreshed from the binary.~/.config/claudex/presets/private/ is rewritten whenever a preset command runs, so edits to it do not survive. Presets you create yourself are never touched.
  • Language server binaries are yours to install. ClaudeX writes the .lsp.json, and a server whose binary is missing is skipped while the rest still start. Install commands and the typescript@5 pin are in docs/language-servers.md.
  • Another repo's agent files..git/info/exclude only reaches untracked files, so a GEMINI.md or .cursor/ that the repository itself tracks stays in your working tree. docs/foreign-agent-files.md covers the sparse-checkout that removes them.

About

Multi-account CLI companion for Claude Code that tracks usage limits, launches configured sessions, and applies skills & output styles.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' GitHub - Tanq16/claudex: Multi-account CLI companion for Claude Code that tracks usage limits, launches configured sessions, and applies skills & output styles. · GitHub
Skip to content

Latest commit

History

214 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ClaudeX Logo

ClaudeX

Build WorkflowGitHub Release

CapabilitiesInstallUsageNotes


ClaudeX is a companion CLI for Claude Code that finds every Claude account on the machine and configures them identically, writes an AGENTS.md and skills layout into a project, and launches a session under the account you pick.

It exists for juggling several Claude subscriptions, and everything except the account picker works the same with one. It does not replace claude, which launch execs.

Capabilities

CategoryCommandsDescription
Accountsconfigure, status, switch, oauth-tokenProvision every account, read its usage, move a project between accounts
SessionslaunchPick the account and the session, then exec claude
Project layoutapply, apply-preset, clean-cwdWrite and remove the AGENTS.md and skills layout
Presetscreate-presetScaffold your own bundle of skills and rules

Install

Release binary

# Linux/macOS
curl -sL https://github.com/tanq16/claudex/releases/latest/download/claudex-$(uname -s | tr '[:upper:]''[:lower:]')-$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') -o claudex
chmod +x claudex
sudo mv claudex /usr/local/bin/

Each release carries claudex-linux-amd64, claudex-linux-arm64, claudex-darwin-amd64, and claudex-darwin-arm64.

From source

Needs Go 1.27.

git clone https://github.com/tanq16/claudex.git
cd claudex
make build

make build-all produces all four platform binaries instead.

Usage

--debug is on every command and swaps the styled output for zerolog: a timestamped console line in a terminal, and JSON when stdout is not one. Color and cursor redraws drop automatically off a terminal too, so piping any command gives plain text with no flag. -A/--account takes an account config directory path, and on launch and switch it also matches on just the directory name. Global state lives under ~/.config/claudex/, holding the plugin in global/ and presets in presets/.

configure

Provisions every discovered account, then lays down the global defaults once.

Per account it writes statusline.sh into the account directory and points settings.json at it. The statusline shows the account label, the model, the working directory, the git branch, context used, and the 5h and 7d rate-limit percentages. It also merges these keys into the existing settings.json, leaving every other key alone:

KeyValue
attribution.commit""
effortLevelxhigh
tuifullscreen
autoMemoryEnabledfalse
skipDangerousModePermissionPrompttrue
outputStyleConcise
env.DISABLE_AUTOUPDATER1
env.ENABLE_CLAUDEAI_MCP_SERVERSfalse

An account whose settings.json is not valid JSON is skipped rather than overwritten.

The global defaults are a Claude Code plugin at ~/.config/claudex/global/, carrying an .lsp.json that wires gopls, pyright-langserver, and typescript-language-server, plus the built-in presets extracted into ~/.config/claudex/presets/.

-A configures one account instead of all of them. -l/--label overrides the account label in the statusline and requires -A; without it the label comes from the directory name, where .claude is first, .claude2 is second, .claude3 is third, and anything else uses the numeric suffix.

apply

Writes the layout into the current directory:

AGENTS.md base instruction block, between <!-- claudex:base --> markers
CLAUDE.md -> AGENTS.md
.agents/skills/ session-summary, skill-creator, write-document
.claude/skills -> ../.agents/skills

AGENTS.md and .agents/skills/ are the real files, following the Agent Skills layout that Cursor and Codex read on their own, and the two symlinks exist because Claude Code looks for the other names.

An existing AGENTS.md keeps everything outside the markers: the base block is inserted or replaced in place. The same four paths also go into .git/info/exclude, which is local to your clone, so the layout never appears in git status and never gets pushed.

Nothing is written when any of those paths already holds something ClaudeX did not put there. Every conflict is reported at once so you can clear them in one pass rather than one run per path.

apply-preset

A preset is a directory under ~/.config/claudex/presets/ holding a preset.yaml, an optional AGENTS.partial.md, and a skills/ directory. Applying one symlinks its skills into .agents/skills/ and writes its partial as its own marked section of AGENTS.md, keyed by preset name, so re-applying replaces that section instead of appending a second copy. It needs claudex apply to have run first.

claudex apply-preset # multi-select picker
claudex apply-preset private # by name; several names apply in order

--skills links only the skills and leaves AGENTS.md alone. --agents writes only the section and links no skills. Neither flag applies the whole preset; passing one narrows the run to that half.

One preset ships in the binary. private carries 31 skills covering Go and Node conventions, containers, release workflows, and testing, plus the author's development, pull request, and operating rules as an AGENTS.md section.

The manifest keys:

KeyDefaultDescription
namethe directory nameShown in the picker and used as the AGENTS.md section key
descriptionemptyOne line shown beside the name in the picker
skillsevery directory under skills/ holding a SKILL.mdWhich skills to link

create-preset

Scaffolds ~/.config/claudex/presets/<name>/ with a preset.yaml, an AGENTS.partial.md, and an empty skills/. Names take lowercase letters, digits, and single hyphens.

clean-cwd

Removes what apply and apply-preset wrote: .agents/, both symlinks, the ClaudeX sections of AGENTS.md, and the .git/info/exclude block.

launch

Prompts for new or resume, for the account, and for MCP mode, then execs claude with --dangerously-skip-permissions, a --plugin-dir pointing at the global plugin, and CLAUDE_CONFIG_DIR set to the account you picked. Any inherited CLAUDE_CONFIG_DIR is stripped first so it cannot override that choice. The plugin is rebuilt on every launch, so language servers work without running configure.

The new-or-resume prompt only appears when this project has sessions, and the account prompt only when there is more than one account. Resume lists this project's 10 most recent sessions across every account, and picking one launches under the account that holds it.

FlagEffect
-A/--accountSkip the account picker
--newStart a new session
--resumeResume: the latest session, or a list when there is more than one
--session <id>Resume that session by id
--mcp mcps|connectors|noneSkip the MCP picker

--new, --resume, and --session are mutually exclusive. The MCP modes are mcps for MCP servers on, connectors to add Claude.ai connectors on top, and none for --strict-mcp-config. Launch hands the session to claude, so it errors without an interactive terminal.

status

Per account, the 5h session window and the 7d windows as bars with their reset times. It reads the account's OAuth token from the macOS Keychain or from .credentials.json and queries Anthropic's usage endpoint, so an expired token shows as a prompt to open Claude Code on that account. --json prints the raw numbers, -A limits it to one account.

switch

Moves the current project's session files and history entries out of the account holding them and into another. It needs at least two accounts, and -A/--account is required without an interactive terminal.

The picker lists this project's sessions from every account, under a row that takes all the ones in the account holding the newest. Picking a single session moves only that session, out of whichever account holds it. --session <id> names one directly and skips the picker, and without a terminal there is no picker, so it moves the whole account unless --session narrows it.

oauth-token

Runs the OAuth PKCE flow in a browser and prints an access token to stdout. -p/--port pins the local callback port, which defaults to one the OS picks, and -e/--expires-in sets the requested expiry in seconds, which the server may override. --manual prints the authorize URL instead of opening a browser and takes the code pasted back, for a machine with no browser to hand off to. Status lines and the URL are printed only when stdout is a terminal, so TOKEN=$(claudex oauth-token) still captures the token alone.

Notes

  • Account discovery.~/.claude and every ~/.claudeN directory whose suffix is digits, such as ~/.claude2. Nothing else in your home directory counts as an account.
  • Preset skills are symlinks. They point back into ~/.config/claudex/presets/, so editing a preset changes every project that applied it. The three base skills from apply are real copies extracted from the binary, so re-running apply is what updates them.
  • Built-in presets are refreshed from the binary.~/.config/claudex/presets/private/ is rewritten whenever a preset command runs, so edits to it do not survive. Presets you create yourself are never touched.
  • Language server binaries are yours to install. ClaudeX writes the .lsp.json, and a server whose binary is missing is skipped while the rest still start. Install commands and the typescript@5 pin are in docs/language-servers.md.
  • Another repo's agent files..git/info/exclude only reaches untracked files, so a GEMINI.md or .cursor/ that the repository itself tracks stays in your working tree. docs/foreign-agent-files.md covers the sparse-checkout that removes them.

About

Multi-account CLI companion for Claude Code that tracks usage limits, launches configured sessions, and applies skills & output styles.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - Tanq16/claudex: Multi-account CLI companion for Claude Code that tracks usage limits, launches configured sessions, and applies skills & output styles. · GitHub
Skip to content

Latest commit

History

214 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ClaudeX Logo

ClaudeX

Build WorkflowGitHub Release

CapabilitiesInstallUsageNotes


ClaudeX is a companion CLI for Claude Code that finds every Claude account on the machine and configures them identically, writes an AGENTS.md and skills layout into a project, and launches a session under the account you pick.

It exists for juggling several Claude subscriptions, and everything except the account picker works the same with one. It does not replace claude, which launch execs.

Capabilities

CategoryCommandsDescription
Accountsconfigure, status, switch, oauth-tokenProvision every account, read its usage, move a project between accounts
SessionslaunchPick the account and the session, then exec claude
Project layoutapply, apply-preset, clean-cwdWrite and remove the AGENTS.md and skills layout
Presetscreate-presetScaffold your own bundle of skills and rules

Install

Release binary

# Linux/macOS
curl -sL https://github.com/tanq16/claudex/releases/latest/download/claudex-$(uname -s | tr '[:upper:]''[:lower:]')-$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') -o claudex
chmod +x claudex
sudo mv claudex /usr/local/bin/

Each release carries claudex-linux-amd64, claudex-linux-arm64, claudex-darwin-amd64, and claudex-darwin-arm64.

From source

Needs Go 1.27.

git clone https://github.com/tanq16/claudex.git
cd claudex
make build

make build-all produces all four platform binaries instead.

Usage

--debug is on every command and swaps the styled output for zerolog: a timestamped console line in a terminal, and JSON when stdout is not one. Color and cursor redraws drop automatically off a terminal too, so piping any command gives plain text with no flag. -A/--account takes an account config directory path, and on launch and switch it also matches on just the directory name. Global state lives under ~/.config/claudex/, holding the plugin in global/ and presets in presets/.

configure

Provisions every discovered account, then lays down the global defaults once.

Per account it writes statusline.sh into the account directory and points settings.json at it. The statusline shows the account label, the model, the working directory, the git branch, context used, and the 5h and 7d rate-limit percentages. It also merges these keys into the existing settings.json, leaving every other key alone:

KeyValue
attribution.commit""
effortLevelxhigh
tuifullscreen
autoMemoryEnabledfalse
skipDangerousModePermissionPrompttrue
outputStyleConcise
env.DISABLE_AUTOUPDATER1
env.ENABLE_CLAUDEAI_MCP_SERVERSfalse

An account whose settings.json is not valid JSON is skipped rather than overwritten.

The global defaults are a Claude Code plugin at ~/.config/claudex/global/, carrying an .lsp.json that wires gopls, pyright-langserver, and typescript-language-server, plus the built-in presets extracted into ~/.config/claudex/presets/.

-A configures one account instead of all of them. -l/--label overrides the account label in the statusline and requires -A; without it the label comes from the directory name, where .claude is first, .claude2 is second, .claude3 is third, and anything else uses the numeric suffix.

apply

Writes the layout into the current directory:

AGENTS.md base instruction block, between <!-- claudex:base --> markers
CLAUDE.md -> AGENTS.md
.agents/skills/ session-summary, skill-creator, write-document
.claude/skills -> ../.agents/skills

AGENTS.md and .agents/skills/ are the real files, following the Agent Skills layout that Cursor and Codex read on their own, and the two symlinks exist because Claude Code looks for the other names.

An existing AGENTS.md keeps everything outside the markers: the base block is inserted or replaced in place. The same four paths also go into .git/info/exclude, which is local to your clone, so the layout never appears in git status and never gets pushed.

Nothing is written when any of those paths already holds something ClaudeX did not put there. Every conflict is reported at once so you can clear them in one pass rather than one run per path.

apply-preset

A preset is a directory under ~/.config/claudex/presets/ holding a preset.yaml, an optional AGENTS.partial.md, and a skills/ directory. Applying one symlinks its skills into .agents/skills/ and writes its partial as its own marked section of AGENTS.md, keyed by preset name, so re-applying replaces that section instead of appending a second copy. It needs claudex apply to have run first.

claudex apply-preset # multi-select picker
claudex apply-preset private # by name; several names apply in order

--skills links only the skills and leaves AGENTS.md alone. --agents writes only the section and links no skills. Neither flag applies the whole preset; passing one narrows the run to that half.

One preset ships in the binary. private carries 31 skills covering Go and Node conventions, containers, release workflows, and testing, plus the author's development, pull request, and operating rules as an AGENTS.md section.

The manifest keys:

KeyDefaultDescription
namethe directory nameShown in the picker and used as the AGENTS.md section key
descriptionemptyOne line shown beside the name in the picker
skillsevery directory under skills/ holding a SKILL.mdWhich skills to link

create-preset

Scaffolds ~/.config/claudex/presets/<name>/ with a preset.yaml, an AGENTS.partial.md, and an empty skills/. Names take lowercase letters, digits, and single hyphens.

clean-cwd

Removes what apply and apply-preset wrote: .agents/, both symlinks, the ClaudeX sections of AGENTS.md, and the .git/info/exclude block.

launch

Prompts for new or resume, for the account, and for MCP mode, then execs claude with --dangerously-skip-permissions, a --plugin-dir pointing at the global plugin, and CLAUDE_CONFIG_DIR set to the account you picked. Any inherited CLAUDE_CONFIG_DIR is stripped first so it cannot override that choice. The plugin is rebuilt on every launch, so language servers work without running configure.

The new-or-resume prompt only appears when this project has sessions, and the account prompt only when there is more than one account. Resume lists this project's 10 most recent sessions across every account, and picking one launches under the account that holds it.

FlagEffect
-A/--accountSkip the account picker
--newStart a new session
--resumeResume: the latest session, or a list when there is more than one
--session <id>Resume that session by id
--mcp mcps|connectors|noneSkip the MCP picker

--new, --resume, and --session are mutually exclusive. The MCP modes are mcps for MCP servers on, connectors to add Claude.ai connectors on top, and none for --strict-mcp-config. Launch hands the session to claude, so it errors without an interactive terminal.

status

Per account, the 5h session window and the 7d windows as bars with their reset times. It reads the account's OAuth token from the macOS Keychain or from .credentials.json and queries Anthropic's usage endpoint, so an expired token shows as a prompt to open Claude Code on that account. --json prints the raw numbers, -A limits it to one account.

switch

Moves the current project's session files and history entries out of the account holding them and into another. It needs at least two accounts, and -A/--account is required without an interactive terminal.

The picker lists this project's sessions from every account, under a row that takes all the ones in the account holding the newest. Picking a single session moves only that session, out of whichever account holds it. --session <id> names one directly and skips the picker, and without a terminal there is no picker, so it moves the whole account unless --session narrows it.

oauth-token

Runs the OAuth PKCE flow in a browser and prints an access token to stdout. -p/--port pins the local callback port, which defaults to one the OS picks, and -e/--expires-in sets the requested expiry in seconds, which the server may override. --manual prints the authorize URL instead of opening a browser and takes the code pasted back, for a machine with no browser to hand off to. Status lines and the URL are printed only when stdout is a terminal, so TOKEN=$(claudex oauth-token) still captures the token alone.

Notes

  • Account discovery.~/.claude and every ~/.claudeN directory whose suffix is digits, such as ~/.claude2. Nothing else in your home directory counts as an account.
  • Preset skills are symlinks. They point back into ~/.config/claudex/presets/, so editing a preset changes every project that applied it. The three base skills from apply are real copies extracted from the binary, so re-running apply is what updates them.
  • Built-in presets are refreshed from the binary.~/.config/claudex/presets/private/ is rewritten whenever a preset command runs, so edits to it do not survive. Presets you create yourself are never touched.
  • Language server binaries are yours to install. ClaudeX writes the .lsp.json, and a server whose binary is missing is skipped while the rest still start. Install commands and the typescript@5 pin are in docs/language-servers.md.
  • Another repo's agent files..git/info/exclude only reaches untracked files, so a GEMINI.md or .cursor/ that the repository itself tracks stays in your working tree. docs/foreign-agent-files.md covers the sparse-checkout that removes them.

About

Multi-account CLI companion for Claude Code that tracks usage limits, launches configured sessions, and applies skills & output styles.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - Tanq16/claudex: Multi-account CLI companion for Claude Code that tracks usage limits, launches configured sessions, and applies skills & output styles. · GitHub
Skip to content

Latest commit

History

214 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ClaudeX Logo

ClaudeX

Build WorkflowGitHub Release

CapabilitiesInstallUsageNotes


ClaudeX is a companion CLI for Claude Code that finds every Claude account on the machine and configures them identically, writes an AGENTS.md and skills layout into a project, and launches a session under the account you pick.

It exists for juggling several Claude subscriptions, and everything except the account picker works the same with one. It does not replace claude, which launch execs.

Capabilities

CategoryCommandsDescription
Accountsconfigure, status, switch, oauth-tokenProvision every account, read its usage, move a project between accounts
SessionslaunchPick the account and the session, then exec claude
Project layoutapply, apply-preset, clean-cwdWrite and remove the AGENTS.md and skills layout
Presetscreate-presetScaffold your own bundle of skills and rules

Install

Release binary

# Linux/macOS
curl -sL https://github.com/tanq16/claudex/releases/latest/download/claudex-$(uname -s | tr '[:upper:]''[:lower:]')-$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') -o claudex
chmod +x claudex
sudo mv claudex /usr/local/bin/

Each release carries claudex-linux-amd64, claudex-linux-arm64, claudex-darwin-amd64, and claudex-darwin-arm64.

From source

Needs Go 1.27.

git clone https://github.com/tanq16/claudex.git
cd claudex
make build

make build-all produces all four platform binaries instead.

Usage

--debug is on every command and swaps the styled output for zerolog: a timestamped console line in a terminal, and JSON when stdout is not one. Color and cursor redraws drop automatically off a terminal too, so piping any command gives plain text with no flag. -A/--account takes an account config directory path, and on launch and switch it also matches on just the directory name. Global state lives under ~/.config/claudex/, holding the plugin in global/ and presets in presets/.

configure

Provisions every discovered account, then lays down the global defaults once.

Per account it writes statusline.sh into the account directory and points settings.json at it. The statusline shows the account label, the model, the working directory, the git branch, context used, and the 5h and 7d rate-limit percentages. It also merges these keys into the existing settings.json, leaving every other key alone:

KeyValue
attribution.commit""
effortLevelxhigh
tuifullscreen
autoMemoryEnabledfalse
skipDangerousModePermissionPrompttrue
outputStyleConcise
env.DISABLE_AUTOUPDATER1
env.ENABLE_CLAUDEAI_MCP_SERVERSfalse

An account whose settings.json is not valid JSON is skipped rather than overwritten.

The global defaults are a Claude Code plugin at ~/.config/claudex/global/, carrying an .lsp.json that wires gopls, pyright-langserver, and typescript-language-server, plus the built-in presets extracted into ~/.config/claudex/presets/.

-A configures one account instead of all of them. -l/--label overrides the account label in the statusline and requires -A; without it the label comes from the directory name, where .claude is first, .claude2 is second, .claude3 is third, and anything else uses the numeric suffix.

apply

Writes the layout into the current directory:

AGENTS.md base instruction block, between <!-- claudex:base --> markers
CLAUDE.md -> AGENTS.md
.agents/skills/ session-summary, skill-creator, write-document
.claude/skills -> ../.agents/skills

AGENTS.md and .agents/skills/ are the real files, following the Agent Skills layout that Cursor and Codex read on their own, and the two symlinks exist because Claude Code looks for the other names.

An existing AGENTS.md keeps everything outside the markers: the base block is inserted or replaced in place. The same four paths also go into .git/info/exclude, which is local to your clone, so the layout never appears in git status and never gets pushed.

Nothing is written when any of those paths already holds something ClaudeX did not put there. Every conflict is reported at once so you can clear them in one pass rather than one run per path.

apply-preset

A preset is a directory under ~/.config/claudex/presets/ holding a preset.yaml, an optional AGENTS.partial.md, and a skills/ directory. Applying one symlinks its skills into .agents/skills/ and writes its partial as its own marked section of AGENTS.md, keyed by preset name, so re-applying replaces that section instead of appending a second copy. It needs claudex apply to have run first.

claudex apply-preset # multi-select picker
claudex apply-preset private # by name; several names apply in order

--skills links only the skills and leaves AGENTS.md alone. --agents writes only the section and links no skills. Neither flag applies the whole preset; passing one narrows the run to that half.

One preset ships in the binary. private carries 31 skills covering Go and Node conventions, containers, release workflows, and testing, plus the author's development, pull request, and operating rules as an AGENTS.md section.

The manifest keys:

KeyDefaultDescription
namethe directory nameShown in the picker and used as the AGENTS.md section key
descriptionemptyOne line shown beside the name in the picker
skillsevery directory under skills/ holding a SKILL.mdWhich skills to link

create-preset

Scaffolds ~/.config/claudex/presets/<name>/ with a preset.yaml, an AGENTS.partial.md, and an empty skills/. Names take lowercase letters, digits, and single hyphens.

clean-cwd

Removes what apply and apply-preset wrote: .agents/, both symlinks, the ClaudeX sections of AGENTS.md, and the .git/info/exclude block.

launch

Prompts for new or resume, for the account, and for MCP mode, then execs claude with --dangerously-skip-permissions, a --plugin-dir pointing at the global plugin, and CLAUDE_CONFIG_DIR set to the account you picked. Any inherited CLAUDE_CONFIG_DIR is stripped first so it cannot override that choice. The plugin is rebuilt on every launch, so language servers work without running configure.

The new-or-resume prompt only appears when this project has sessions, and the account prompt only when there is more than one account. Resume lists this project's 10 most recent sessions across every account, and picking one launches under the account that holds it.

FlagEffect
-A/--accountSkip the account picker
--newStart a new session
--resumeResume: the latest session, or a list when there is more than one
--session <id>Resume that session by id
--mcp mcps|connectors|noneSkip the MCP picker

--new, --resume, and --session are mutually exclusive. The MCP modes are mcps for MCP servers on, connectors to add Claude.ai connectors on top, and none for --strict-mcp-config. Launch hands the session to claude, so it errors without an interactive terminal.

status

Per account, the 5h session window and the 7d windows as bars with their reset times. It reads the account's OAuth token from the macOS Keychain or from .credentials.json and queries Anthropic's usage endpoint, so an expired token shows as a prompt to open Claude Code on that account. --json prints the raw numbers, -A limits it to one account.

switch

Moves the current project's session files and history entries out of the account holding them and into another. It needs at least two accounts, and -A/--account is required without an interactive terminal.

The picker lists this project's sessions from every account, under a row that takes all the ones in the account holding the newest. Picking a single session moves only that session, out of whichever account holds it. --session <id> names one directly and skips the picker, and without a terminal there is no picker, so it moves the whole account unless --session narrows it.

oauth-token

Runs the OAuth PKCE flow in a browser and prints an access token to stdout. -p/--port pins the local callback port, which defaults to one the OS picks, and -e/--expires-in sets the requested expiry in seconds, which the server may override. --manual prints the authorize URL instead of opening a browser and takes the code pasted back, for a machine with no browser to hand off to. Status lines and the URL are printed only when stdout is a terminal, so TOKEN=$(claudex oauth-token) still captures the token alone.

Notes

  • Account discovery.~/.claude and every ~/.claudeN directory whose suffix is digits, such as ~/.claude2. Nothing else in your home directory counts as an account.
  • Preset skills are symlinks. They point back into ~/.config/claudex/presets/, so editing a preset changes every project that applied it. The three base skills from apply are real copies extracted from the binary, so re-running apply is what updates them.
  • Built-in presets are refreshed from the binary.~/.config/claudex/presets/private/ is rewritten whenever a preset command runs, so edits to it do not survive. Presets you create yourself are never touched.
  • Language server binaries are yours to install. ClaudeX writes the .lsp.json, and a server whose binary is missing is skipped while the rest still start. Install commands and the typescript@5 pin are in docs/language-servers.md.
  • Another repo's agent files..git/info/exclude only reaches untracked files, so a GEMINI.md or .cursor/ that the repository itself tracks stays in your working tree. docs/foreign-agent-files.md covers the sparse-checkout that removes them.

About

Multi-account CLI companion for Claude Code that tracks usage limits, launches configured sessions, and applies skills & output styles.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); GitHub - Tanq16/claudex: Multi-account CLI companion for Claude Code that tracks usage limits, launches configured sessions, and applies skills & output styles. · GitHub
Skip to content

Latest commit

History

214 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ClaudeX Logo

ClaudeX

Build WorkflowGitHub Release

CapabilitiesInstallUsageNotes


ClaudeX is a companion CLI for Claude Code that finds every Claude account on the machine and configures them identically, writes an AGENTS.md and skills layout into a project, and launches a session under the account you pick.

It exists for juggling several Claude subscriptions, and everything except the account picker works the same with one. It does not replace claude, which launch execs.

Capabilities

CategoryCommandsDescription
Accountsconfigure, status, switch, oauth-tokenProvision every account, read its usage, move a project between accounts
SessionslaunchPick the account and the session, then exec claude
Project layoutapply, apply-preset, clean-cwdWrite and remove the AGENTS.md and skills layout
Presetscreate-presetScaffold your own bundle of skills and rules

Install

Release binary

# Linux/macOS
curl -sL https://github.com/tanq16/claudex/releases/latest/download/claudex-$(uname -s | tr '[:upper:]''[:lower:]')-$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') -o claudex
chmod +x claudex
sudo mv claudex /usr/local/bin/

Each release carries claudex-linux-amd64, claudex-linux-arm64, claudex-darwin-amd64, and claudex-darwin-arm64.

From source

Needs Go 1.27.

git clone https://github.com/tanq16/claudex.git
cd claudex
make build

make build-all produces all four platform binaries instead.

Usage

--debug is on every command and swaps the styled output for zerolog: a timestamped console line in a terminal, and JSON when stdout is not one. Color and cursor redraws drop automatically off a terminal too, so piping any command gives plain text with no flag. -A/--account takes an account config directory path, and on launch and switch it also matches on just the directory name. Global state lives under ~/.config/claudex/, holding the plugin in global/ and presets in presets/.

configure

Provisions every discovered account, then lays down the global defaults once.

Per account it writes statusline.sh into the account directory and points settings.json at it. The statusline shows the account label, the model, the working directory, the git branch, context used, and the 5h and 7d rate-limit percentages. It also merges these keys into the existing settings.json, leaving every other key alone:

KeyValue
attribution.commit""
effortLevelxhigh
tuifullscreen
autoMemoryEnabledfalse
skipDangerousModePermissionPrompttrue
outputStyleConcise
env.DISABLE_AUTOUPDATER1
env.ENABLE_CLAUDEAI_MCP_SERVERSfalse

An account whose settings.json is not valid JSON is skipped rather than overwritten.

The global defaults are a Claude Code plugin at ~/.config/claudex/global/, carrying an .lsp.json that wires gopls, pyright-langserver, and typescript-language-server, plus the built-in presets extracted into ~/.config/claudex/presets/.

-A configures one account instead of all of them. -l/--label overrides the account label in the statusline and requires -A; without it the label comes from the directory name, where .claude is first, .claude2 is second, .claude3 is third, and anything else uses the numeric suffix.

apply

Writes the layout into the current directory:

AGENTS.md base instruction block, between <!-- claudex:base --> markers
CLAUDE.md -> AGENTS.md
.agents/skills/ session-summary, skill-creator, write-document
.claude/skills -> ../.agents/skills

AGENTS.md and .agents/skills/ are the real files, following the Agent Skills layout that Cursor and Codex read on their own, and the two symlinks exist because Claude Code looks for the other names.

An existing AGENTS.md keeps everything outside the markers: the base block is inserted or replaced in place. The same four paths also go into .git/info/exclude, which is local to your clone, so the layout never appears in git status and never gets pushed.

Nothing is written when any of those paths already holds something ClaudeX did not put there. Every conflict is reported at once so you can clear them in one pass rather than one run per path.

apply-preset

A preset is a directory under ~/.config/claudex/presets/ holding a preset.yaml, an optional AGENTS.partial.md, and a skills/ directory. Applying one symlinks its skills into .agents/skills/ and writes its partial as its own marked section of AGENTS.md, keyed by preset name, so re-applying replaces that section instead of appending a second copy. It needs claudex apply to have run first.

claudex apply-preset # multi-select picker
claudex apply-preset private # by name; several names apply in order

--skills links only the skills and leaves AGENTS.md alone. --agents writes only the section and links no skills. Neither flag applies the whole preset; passing one narrows the run to that half.

One preset ships in the binary. private carries 31 skills covering Go and Node conventions, containers, release workflows, and testing, plus the author's development, pull request, and operating rules as an AGENTS.md section.

The manifest keys:

KeyDefaultDescription
namethe directory nameShown in the picker and used as the AGENTS.md section key
descriptionemptyOne line shown beside the name in the picker
skillsevery directory under skills/ holding a SKILL.mdWhich skills to link

create-preset

Scaffolds ~/.config/claudex/presets/<name>/ with a preset.yaml, an AGENTS.partial.md, and an empty skills/. Names take lowercase letters, digits, and single hyphens.

clean-cwd

Removes what apply and apply-preset wrote: .agents/, both symlinks, the ClaudeX sections of AGENTS.md, and the .git/info/exclude block.

launch

Prompts for new or resume, for the account, and for MCP mode, then execs claude with --dangerously-skip-permissions, a --plugin-dir pointing at the global plugin, and CLAUDE_CONFIG_DIR set to the account you picked. Any inherited CLAUDE_CONFIG_DIR is stripped first so it cannot override that choice. The plugin is rebuilt on every launch, so language servers work without running configure.

The new-or-resume prompt only appears when this project has sessions, and the account prompt only when there is more than one account. Resume lists this project's 10 most recent sessions across every account, and picking one launches under the account that holds it.

FlagEffect
-A/--accountSkip the account picker
--newStart a new session
--resumeResume: the latest session, or a list when there is more than one
--session <id>Resume that session by id
--mcp mcps|connectors|noneSkip the MCP picker

--new, --resume, and --session are mutually exclusive. The MCP modes are mcps for MCP servers on, connectors to add Claude.ai connectors on top, and none for --strict-mcp-config. Launch hands the session to claude, so it errors without an interactive terminal.

status

Per account, the 5h session window and the 7d windows as bars with their reset times. It reads the account's OAuth token from the macOS Keychain or from .credentials.json and queries Anthropic's usage endpoint, so an expired token shows as a prompt to open Claude Code on that account. --json prints the raw numbers, -A limits it to one account.

switch

Moves the current project's session files and history entries out of the account holding them and into another. It needs at least two accounts, and -A/--account is required without an interactive terminal.

The picker lists this project's sessions from every account, under a row that takes all the ones in the account holding the newest. Picking a single session moves only that session, out of whichever account holds it. --session <id> names one directly and skips the picker, and without a terminal there is no picker, so it moves the whole account unless --session narrows it.

oauth-token

Runs the OAuth PKCE flow in a browser and prints an access token to stdout. -p/--port pins the local callback port, which defaults to one the OS picks, and -e/--expires-in sets the requested expiry in seconds, which the server may override. --manual prints the authorize URL instead of opening a browser and takes the code pasted back, for a machine with no browser to hand off to. Status lines and the URL are printed only when stdout is a terminal, so TOKEN=$(claudex oauth-token) still captures the token alone.

Notes

  • Account discovery.~/.claude and every ~/.claudeN directory whose suffix is digits, such as ~/.claude2. Nothing else in your home directory counts as an account.
  • Preset skills are symlinks. They point back into ~/.config/claudex/presets/, so editing a preset changes every project that applied it. The three base skills from apply are real copies extracted from the binary, so re-running apply is what updates them.
  • Built-in presets are refreshed from the binary.~/.config/claudex/presets/private/ is rewritten whenever a preset command runs, so edits to it do not survive. Presets you create yourself are never touched.
  • Language server binaries are yours to install. ClaudeX writes the .lsp.json, and a server whose binary is missing is skipped while the rest still start. Install commands and the typescript@5 pin are in docs/language-servers.md.
  • Another repo's agent files..git/info/exclude only reaches untracked files, so a GEMINI.md or .cursor/ that the repository itself tracks stays in your working tree. docs/foreign-agent-files.md covers the sparse-checkout that removes them.

About

Multi-account CLI companion for Claude Code that tracks usage limits, launches configured sessions, and applies skills & output styles.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages