惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
Martin Fowler
Martin Fowler
Last Week in AI
Last Week in AI
罗磊的独立博客
阮一峰的网络日志
阮一峰的网络日志
博客园 - 【当耐特】
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
V
Visual Studio Blog
Hugging Face - Blog
Hugging Face - Blog
雷峰网
雷峰网
博客园_首页
人人都是产品经理
人人都是产品经理
量子位
美团技术团队
The Cloudflare Blog
小众软件
小众软件
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
Microsoft Security Blog
Microsoft Security Blog
D
DataBreaches.Net
博客园 - Franky

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - allenhack638/cchost: Run multiple isolated Claud...
allenbenny03 · 2026-05-15 · via Hacker News: Show HN

cchost

Host multiple isolated Claude Code accounts on one machine via a single cc command. cc is a plain Node CLI on your PATH, so it runs the same from PowerShell, cmd, bash, zsh, or fish — there are no shell scripts or rc-file edits involved. Tested on Windows and Linux; macOS is expected to work but is not yet verified.

Each profile is a complete, isolated CLAUDE_CONFIG_DIR — credentials, session history, project state, plugins, and settings. Create one with cc add <name>; launch under it with cc use <name>.

Install

npm install -g cchost

Requires Node.js 18+ and Claude Code 2.1.140+ already installed. Get Claude Code from https://code.claude.com (npm install -g @anthropic-ai/claude-code).

Commands

Command What it does
cc add <profile> [--email=] [--org=] [--name=] Create a profile directory. Optional alias flags (EXPERIMENTAL, see below).
cc use <profile> [...args] Launch Claude under that profile. Profile must already exist. Args after the name are forwarded verbatim to claude.
cc list [--original] [--json] Show every profile: login state, account email, and storage mode (shared / isolated).
cc migrate <src> <dest> Copy projects from default|shared to shared|<profile>. Skip-on-collision; credential files never copied.
cc link <profile> [<profile>...] Link a profile's projects/ to ~/.claude-shared/projects. Migrates existing content; renames on collision.
cc unlink <profile> Restore a profile to its own private projects/ (copies shared content back).
cc remove <profile> Delete a profile. Requires typing the profile name to confirm.
cc help [command] Print usage (top-level, or for a single command).

Examples

cc add work                            # create the profile, do not launch
cc use work                            # first launch: Claude prompts for login
cc use work --resume                   # resume last conversation under "work"
cc use personal -p "summarize"         # one-shot prompt under "personal"
cc list
cc remove old-profile

cc list output:

Profile   LoggedIn  Email                 Storage
personal  true      personal@example.com  isolated
scratch   false     -                     isolated
work      true      work@example.com      shared

Migrating existing projects

If you've been using Claude Code without profiles, your history lives in ~/.claude/projects/. Pull it into a profile or the shared pool:

cc migrate default work        # copy ~/.claude/projects → ~/.claude-profiles/work/projects
cc migrate default shared      # copy ~/.claude/projects → ~/.claude-shared/projects
cc migrate shared personal     # copy ~/.claude-shared/projects → ~/.claude-profiles/personal/projects

This is a copy — the source is left untouched. If an entry already exists at the destination, the source entry is skipped (no overwrite). Credential files (.credentials.json, .claude.json) are never copied: each profile keeps its own auth state.

Shared history across profiles

If you want each profile to keep separate credentials but share project history (e.g. rotate accounts on the same project when usage limits hit):

cc link work
cc link personal

work/projects and personal/projects become links to ~/.claude-shared/projects. On Windows this uses directory junctions (no admin/Developer Mode required); on macOS/Linux, regular symlinks.

Only projects/ is shared. That's the directory Claude Code uses for resumable conversation transcripts (projects/<project>/<session>.jsonl). The sibling sessions/ folder holds transient per-process registry state — PID, working directory, status, timestamps — and is never linked, migrated, or copied across profiles. Sharing it would corrupt Claude's running-process bookkeeping. sessions/ stays per-profile under ~/.claude-profiles/<name>/sessions/.

cc link a b c links several profiles at once; per-profile failures are reported but don't abort the rest of the batch.

If two profiles share history and you launch them against the same project at the same time, both will write to the same session files (last write wins). Don't do that.

cc remove is safe with shared profiles — it deletes only the link, never recursing into the shared target.

Aliases (cc add flags) — EXPERIMENTAL

cc add work --email=work@example.com --org=Acme --name="Work Account" stores those values in ~/.claude-profiles/work/.cc-alias.json. On every cc use, they're written into the profile's .claude.json oauthAccount so cc list and Claude's own UI display them instead of the real underlying account.

EXPERIMENTAL. Claude Code may overwrite oauthAccount on server re-sync; we re-apply on the next cc use, but masking across all of Claude's UI surfaces has not been verified. Use cc list --original to see the real values from .claude.json.

How it works

cc is a Node CLI with zero runtime dependencies. For cc use it:

  1. Resolves the profile directory under ~/.claude-profiles/<name>/
  2. Applies any stored alias to .claude.json oauthAccount (best-effort)
  3. Sets CLAUDE_CONFIG_DIR in its own spawn environment
  4. Spawns claude with stdio: 'inherit' so the TUI works correctly
  5. Forwards the child's exit code

The env var is set on the child process only — that's all claude needs.

Sensitive data

~/.claude-profiles/<profile>/ holds real OAuth credentials. Treat it like SSH keys: don't commit it, don't share it, don't sync it to public cloud storage. The .gitignore shipped with this project excludes profile directories from anywhere they might land. cc migrate and cc link never copy .credentials.json or .claude.json across profiles.

Troubleshooting

Claude Code does not appear to be installed Install it (npm install -g @anthropic-ai/claude-code) and make sure claude --version runs in a fresh terminal.

warning: Claude Code <version> is older than 2.1.140 Earlier versions had bugs where Windows read .claude.json from %USERPROFILE% regardless of CLAUDE_CONFIG_DIR, breaking isolation. Run claude update.

Profile "<name>" does not exist. Create it with: cc add <name> cc use does not auto-create profiles — that prevents typos like cc use wokr from silently creating a new, blank one. Run cc add <name> first.

Profile name rejected Names must be free of path separators, whitespace, .., leading dots, and reserved DOS names (CON, PRN, COM1…). Stick to letters, digits, dashes, underscores.

Old shell-script version was leaking keystrokes / leaking use work into the prompt That was a known bug in the cmd-based predecessor (%* ignored shift). This package forwards only the argv after <profile> to claude; the action and profile name themselves are consumed by cc.

License

MIT