agentleFS
kimrgreykimrgrey/claudini/CLAUDE.md

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

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
  1. Distinctive:

    All credentials stored in macOS Keychain (never as plain text files on disk)

    line 41
  2. Very specific:

    All errors use anyhow for context-rich error chains

    line 52
  3. Distinctive:

    Do not add Claude as a co-author to commit messages and PR descriptions

    line 59
  4. Distinctive:

    Do not push branches unless explicitly asked to

    line 61
  5. Distinctive:

    Never force push (git push --force / git push -f) branches to GitHub

    line 62
  6. Very specific:

    Always ask before using --admin flag when merging PRs — it bypasses branch protection checks

    line 64
  7. Distinctive:

    Always remove previously added but now unused code

    line 66
  8. Distinctive:

    Do not include test plans in PR descriptions or commit messages

    line 67

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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 profiles

CLI

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 list

Architecture

  • Profiles stored under ~/.claudini/profiles/<name>/ with claude.json
  • Backups stored under ~/.claudini/backups/<name>/ with claude.json and claude/ 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>"
  • ~/.claude.json is a symlink to the active profile's claude.json
  • Keychain entry Claude Code-credentials is swapped on profile switch
  • Shared fields (non-account-specific) are synced from outgoing to incoming profile on switch
  • Legacy plain text credentials files are auto-migrated to Keychain on access or via claudini init

Key conventions

  • All errors use anyhow for context-rich error chains
  • Two output modes: human (colored, spinners, tables) and JSON (--json flag)
  • Claude home directory overridable via --claude-home flag or CLAUDINI_CLAUDE_HOME env 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 main instead of git rebase (rebase requires force push)
  • Always ask before using --admin flag 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 parsing
  • serde + serde_json — JSON handling
  • dirs — home directory resolution
  • anyhow — error handling
  • keyring (apple-native) — macOS Keychain access
  • console — terminal colors/styling
  • indicatif — progress spinners
  • comfy-table — formatted table output

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.