Skip to content

v0.3.0

Choose a tag to compare

@Leuconoe Leuconoe released this 03 Apr 02:53
· 33 commits to main since this release

v0.3.0 — Modular Runtime Refactoring

This release completes a major internal restructuring that separates the runtime into clear, independently testable modules.

What changed

Runtime modularization

  • cc-switch.cjs is now a thin CLI adapter over dedicated modules
  • lib/store/* — account store persistence and live-file sync
  • lib/usage/* — usage API fetch, cache, and formatting
  • lib/output/* — account line rendering, usage block rendering, and user-facing messages
  • lib/actions/* — list, sync, switch, remove, and usage action handlers

Installer updates

  • Installer now copies all new module directories to the installed runtime
  • package.json includes all new module files for npm packaging

Behavior preserved

  • All existing commands remain unchanged: cc-switch, ccs, cc-sync-oauth, ccso
  • Windows, Git Bash, and WSL wrappers continue to work as before
  • Usage display, account removal, and restart notice behavior unchanged

Internal structure

cc-switch.cjs              # Thin CLI adapter
lib/
  store/
    io.cjs                 # File I/O, backup rotation, live file writes
    accounts.cjs           # Store normalization, sync, selection, removal
  usage/
    cache.cjs              # Rate-limit reset caching and settings
    fetch.cjs              # Claude OAuth usage API client
    format.cjs             # Usage formatting and snapshot refresh
  output/
    accounts.cjs           # Display name, plan type, account line rendering
    usage.cjs              # Relative time, reset estimate, usage block formatting
    messages.cjs           # User-facing guidance text
  actions/
    list.cjs               # List accounts action
    sync.cjs               # Sync action
    switch.cjs             # Switch action
    remove.cjs             # Remove action
    usage.cjs              # Usage-only action

Installation

# Recommended
npx claude-code-multi-accounts install

# Manual
git clone https://github.com/Leuconoe/ClaudeCodeMultiAccounts.git
cd ClaudeCodeMultiAccounts
./install.sh  # or install.cmd on Windows

Notes

  • npm registry publish is pending
  • This is a structural refactoring release with no user-facing behavior changes