Skip to main content

Manage multiple Claude Code accounts with full directory isolation

Project description

textaccounts

Manage multiple Claude Code accounts with full directory isolation. Each profile is a complete ~/.claude/ config directory — sessions, memory, settings, and auth stay separate.

Why?

Claude Code stores everything in a single directory tree (~/.claude/). If you use multiple accounts (work + personal), you need separate directories. textaccounts registers and switches between them by setting CLAUDE_CONFIG_DIR.

Install

pip install textaccounts

Then install shell integration:

textaccounts install

This writes a fish function and completions to ~/.config/fish/. Open a new shell to activate.

Quick start

# Register existing directories — nothing is moved or copied
textaccounts adopt work ~/.claude-work
textaccounts adopt personal ~/.claude-personal

# Switch profile (sets CLAUDE_CONFIG_DIR in your shell)
textaccounts switch work

# Check status
textaccounts status

# Interactive view
textaccounts view

Commands

textaccounts list                        # show all profiles
textaccounts status                      # active profile + sync state
textaccounts adopt <name> <path>         # register an existing dir
textaccounts create <name>               # snapshot current config dir
textaccounts create <name> --worker \
  --from <parent>                        # auth-only copy for parallel work
textaccounts create <name> \
  --clone-from <src>                     # clone setup (auth+settings+agents+hooks+plugins),
                                         # strip state (sessions/projects/history/caches)
textaccounts switch <name>               # switch profile (sets CLAUDE_CONFIG_DIR)
textaccounts show <name>                 # print shell command without executing
textaccounts rename <old> <new>          # rename a profile
textaccounts alias <profile> <alias>     # add a shorthand alias
textaccounts describe <name> [text]      # set/clear a per-profile description (omit text to clear)
textaccounts desc                        # print current profile's description (for statuslines)
textaccounts view                        # interactive profile view
textaccounts install [--shell fish]      # install shell integration

Per-profile descriptions

Each profile can carry a free-text description (a one-liner like "day job" or "hobby + paperworlds"). It shows up:

  • In the interactive view bottom bar when a profile is highlighted (n to edit)
  • In your Claude Code statusline via textaccounts desc, which resolves the description for the current CLAUDE_CONFIG_DIR — so subprocesses launched by tools like textsessions show the right description automatically

Wire it into your statusline script:

ta_desc=$(textaccounts desc 2>/dev/null)
[ -n "$ta_desc" ] && parts+=("$ta_desc")

Interactive view

textaccounts view provides a Textual TUI for managing profiles:

Key Action
s Switch to selected profile
a Adopt a new directory
r Rename selected profile
l Edit aliases
n Edit description (shown in bottom bar)
q Quit

Auto-discovers unregistered ~/.claude*/ directories and shows them as adoption suggestions.

Config

Profiles are stored in ~/.textaccounts/profiles.yaml:

version: '1.0'
active: work

profiles:
  work:
    path: /Users/you/.claude-work
    email: yo***@company.com
    adopted: 2026-04-12T10:00:00Z
    worker: false
    description: day job
  personal:
    path: /Users/you/.claude-personal
    email: y***@gmail.com
    adopted: 2026-04-12T10:00:00Z
    worker: false
    description: hobby projects
    aliases:
      - p

defaults:
  profiles_dir: ~/.textaccounts/profiles

New profiles created with textaccounts create go into ~/.textaccounts/profiles/.

How it works

textaccounts switch sets CLAUDE_CONFIG_DIR in your shell via a fish function that evals the output of textaccounts show. A Python subprocess can't modify the parent shell's environment directly — the fish function bridges that gap.

Claude Code reads CLAUDE_CONFIG_DIR natively. No patches, no wrappers around claude itself.

Public API

textaccounts.api is the stable import surface for tools that integrate with textaccounts (see textsessions for an example consumer). Functions: available, list_profiles, active_profile, profile_dir, env_for_profile, profile_description. Full contract: docs/specs/textaccounts-api.md.

Roadmap

  • Publish to PyPI (under Paperworlds org — account TBD)
  • Upgrade to Python 3.13
  • d key in view to remove/unregister a profile
  • Bash/zsh shell integration (currently fish only)

[!NOTE] Part of Paperworlds

textaccounts is part of Paperworlds — an open org building tools and games around AI agents and text interfaces.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

textaccounts-0.4.1.tar.gz (44.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

textaccounts-0.4.1-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file textaccounts-0.4.1.tar.gz.

File metadata

  • Download URL: textaccounts-0.4.1.tar.gz
  • Upload date:
  • Size: 44.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for textaccounts-0.4.1.tar.gz
Algorithm Hash digest
SHA256 aef6bdf2138d7831c2051e37163cb0163d025df8336f7c3040691273018fe8ed
MD5 d08214f10ad1a017b0546c5596603368
BLAKE2b-256 da4d858dd1ef784f0dc8e33e0bf2f5dd23da2645cb6779453207856c1d73620d

See more details on using hashes here.

File details

Details for the file textaccounts-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: textaccounts-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for textaccounts-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1884a001b6ba032a198ffde2103873b35d937efaa663a2df31db44475ac302f0
MD5 d84185995de7f84301b4b57f741b0714
BLAKE2b-256 2de5534bff082e94f2286e5c2075024678a5f021eede52729e39bb244cfa697b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page