This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Persona - CLI tool to switch Claude CLI between different model providers (DeepSeek, Zhipu GLM, Kimi, MiniMax, OpenAI, Ollama, etc.)
bun run dev # Development mode
bun run build # Build executable (dist/persona)| File | Purpose |
|---|---|
src/index.ts |
CLI entry, command routing |
src/commands/*.ts |
Command implementations (add, switch, list, rm, edit, ping, theme, env, sync) |
src/config/store.ts |
ConfigStore singleton - all persistence |
src/tui/ |
React/OpenTUI TUI components |
src/utils/theme.ts |
Theme system (persona, gruvbox, dracula, nord) |
templates/ |
Provider templates by category |
- Switch provider: Call both
applyProviderToClaude()andsetActiveProvider()insrc/config/store.ts - TUI: Theme loaded via
loadThemeFromConfig()before rendering - Config locations:
~/.persona/config.json- provider config~/.claude/settings.json- Claude settings (written by this tool)
- Command: Add to
src/commands/<name>.ts, import insrc/index.ts - Template: Add JSON to
templates/<category>/<name>.jsonwith name, baseUrl, apiFormat, models - Theme: Add to
src/utils/theme.tsthemes object