claudini
CLAUDE.md9 starsChanged 9 months agoMITView on GitHub
CLI tool for switching between multiple Claude Code accounts on macOS.
- Deletes or force-pushes
- Commits and pushes
In this repository4 other files it gives its agents.
- build-rust-cliSkill
- create-pull-requestSkill
- merge-pull-requestSkill
- releaseSkill
The file
We split this CLAUDE.md into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 41
All credentials stored in macOS Keychain (never as plain text files on disk)
- Very specific: line 52
All errors use anyhow for context-rich error chains
- Distinctive: line 59
Do not add Claude as a co-author to commit messages and PR descriptions
- Distinctive: line 61
Do not push branches unless explicitly asked to
- Distinctive: line 62
Never force push (git push --force / git push -f) branches to GitHub
- Very specific: line 64
Always ask before using --admin flag when merging PRs — it bypasses branch protection checks
- Distinctive: line 66
Always remove previously added but now unused code
- Distinctive: line 67
Do not include test plans in PR descriptions or commit messages
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
claudini
CLI tool for switching between multiple Claude Code accounts on macOS.
Project structure
claudini/
Cargo.toml
src/
main.rs # CLI entry point (clap derive), subcommand enums, output formatting
config.rs # Path helpers, Config struct, directory layout
keychain.rs # macOS Keychain read/write/delete via keyring crate
profile.rs # Profile operations: init, add, add --login, use, list, remove, rename, current
backup.rs # Backup operations: create, restore, list
sync.rs # Shared field sync between profilesCLI
claudini init
claudini <name> # switch and launch claude
claudini use <name> [--launch] # shortcut for profile use
claudini profile add <name> [--login]
claudini profile use <name> [--launch]
claudini profile list
claudini profile remove <name>
claudini profile rename <old> <new>
claudini profile current
claudini backup create <name>
claudini backup restore <name>
claudini backup delete <name>
claudini backup listArchitecture
- Profiles stored under
~/.claudini/profiles/<name>/withclaude.json - Backups stored under
~/.claudini/backups/<name>/withclaude.jsonandclaude/dir - All credentials stored in macOS Keychain (never as plain text files on disk)
- Active credential: service
"Claude Code-credentials"(read directly by Claude Code) - Profile credentials: service
"claudini-profile-<name>" - Backup credentials: service
"claudini-backup-<name>"
- Active credential: service
~/.claude.jsonis a symlink to the active profile'sclaude.json- Keychain entry
Claude Code-credentialsis swapped on profile switch - Shared fields (non-account-specific) are synced from outgoing to incoming profile on switch
- Legacy plain text
credentialsfiles are auto-migrated to Keychain on access or viaclaudini init
Key conventions
- All errors use
anyhowfor context-rich error chains - Two output modes: human (colored, spinners, tables) and JSON (
--jsonflag) - Claude home directory overridable via
--claude-homeflag orCLAUDINI_CLAUDE_HOMEenv var - Account-specific fields listed in
sync.rs::ACCOUNT_SPECIFIC_FIELDS
Git & PR conventions
- Do not add Claude as a co-author to commit messages and PR descriptions
- NEVER commit or push unless the user explicitly asks to — this is a hard rule, no exceptions
- Do not push branches unless explicitly asked to
- Never force push (
git push --force/git push -f) branches to GitHub - To resolve conflicts with main, use
git pull origin maininstead ofgit rebase(rebase requires force push) - Always ask before using
--adminflag when merging PRs — it bypasses branch protection checks - Try to keep branch names short but readable
- Always remove previously added but now unused code
- Do not include test plans in PR descriptions or commit messages
Build & run
cargo build
cargo run -- <command>Dependencies
clap(derive) — CLI parsingserde+serde_json— JSON handlingdirs— home directory resolutionanyhow— error handlingkeyring(apple-native) — macOS Keychain accessconsole— terminal colors/stylingindicatif— progress spinnerscomfy-table— formatted table output
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

