@doguyilmaz/aims

中文文档
0.4.2发布于 2026/11/01MIT零依赖构建来源已验证

Several Claude Code and Codex accounts on one machine: instant switching, shared history, failover.

原始使用文档
文档目录6 节
  1. Install
  2. Start
  3. How it works
  4. Development
  5. Fair use
  6. License

aims logo: a prompt whose cursor is coral and ivory

aims

Several Claude Code and Codex accounts on one machine.
Switch instantly, share history, fail over when one hits its limit.

Documentation · Install · Quick start


aims stands for AI multi-session. It lets you use a personal and a work account (or more) for Claude Code and Codex on one computer, without logging out and in to switch.

  • Log in once per account. Each account keeps its own login in its own folder. Nothing is copied.
  • Sessions move on their own. A session starts on your first account. At a usage limit it moves to the next one and continues the conversation, and it moves back once the first works again.
  • One history. Conversations, settings, skills and MCP servers are shared, so a conversation started on one account continues on the other. Or keep an account's history separate.
  • Your AI can use it. An MCP server and a skill let Claude Code and Codex check accounts, fail over, and hand a task to another account.
$ aims status
Claude Code
  order of this project (~/code/client-app); elsewhere personal → work
  ● personal  pro       login expired  7d 37%
    work      team      ready          7d 84%  standing in for personal
  new sessions start on work

Codex
  ● personal  plus      ready          7d 31%
    work      business  ready

Open sessions
  Claude Code  work      ~/code/client-app · 12h59m ago
  Claude Code  work      ~/code/api · 2h4m ago
  Codex        personal  ~/code/blog · 6m ago

Next
  → claude/personal is not logged in  aims login claude personal
  → codex/personal keeps 51 MB of unused database copies  aims doctor --fix

Every limit and when it resets, also for Antigravity, Grok, Kiro and OpenCode: aims usage

aims status is what is going on: each account's state, what a session does now, the sessions open now and, under Next, what is left to set up, each with the command that does it. aims usage has every number:

$ aims usage
Claude Code
  personal       pro       5h     ━━━━━━    –                 7d     ━━━━━━  37%  resets 4d
  work           team      5h     ━━━━━━   2%  resets 4h10m   7d     ━━━━━━  84%  resets 4d

Codex
  personal       plus      5h     ━━━━━━   9%  resets 2h5m    7d     ━━━━━━  31%  resets 5d
  work           business  5h     ━━━━━━    –                 7d     ━━━━━━    –

Antigravity
  Gemini Models            5h     ━━━━━━   0%  resets 5h      7d     ━━━━━━   5%  resets 3d

Grok  x premium
  credits                  7d     ━━━━━━  26%  resets 47h

Kiro  pro
  credits                  month  ━━━━━━  42%  resets 12d     420 of 1000 credits

OpenCode
  my-team                  budget ━━━━━━  67%  resets 9d      $33.50 of $50

aims alone opens a dashboard with both views (tab switches) and keys for everything else.

Install

brew install --cask doguyilmaz/tap/aims                                          # macOS, Linux
curl -fsSL https://raw.githubusercontent.com/doguyilmaz/aims/main/scripts/install.sh | sh
npm install -g @doguyilmaz/aims
go install github.com/doguyilmaz/aims/cmd/aims@latest

On Windows: irm https://raw.githubusercontent.com/doguyilmaz/aims/main/scripts/install.ps1 | iex, or Scoop. See Installation.

Start

aims init

The setup finds Claude Code and Codex, turns the login you already have into your first account, creates the second, asks which one sessions start on, and connects the tools to aims. Then start sessions the way you always do:

claude                     # or codex: aims picks the account and watches the session

With the shell integration (aims setup offers it), plain claude and codex go through aims. Without it, type aims claude and aims codex. Each session says what aims does with it when it starts, and Claude Code's status line shows it while it runs:

› claude: personal (auto → work)
personal ▰▱▱▱▱  12% · 7d 31% · auto → work
Start a session withIt starts onAt a limit
claude, aims claudeyour first accountmoves to the next account, and back once the first works again
aims claude@workworkstays on work (pinned)

aims alone shows your accounts, the sessions open now and anything left to set up. aims order changes which account comes first (in this project; --global for every folder), and aims doctor checks everything.

How it works

Claude Code and Codex read their state from one folder (CLAUDE_CONFIG_DIR, CODEX_HOME). aims gives each account its own folder holding only its login, and links everything else to your normal ~/.claude and ~/.codex. aims claude sets the variable and starts the real claude; aims is not a proxy and never sees your prompts. Details in How it works.

Development

go test ./...                     # unit and end-to-end tests (stand-ins for claude and codex)
go run ./cmd/aims status
hugo server --source docs         # the documentation site

Each supported CLI is an adapter in internal/tool/<name>; adding one is described in Adding a tool.

Fair use

aims exists to keep work and personal apart. Many people have a work account and a personal one, and want each project to use the right one without logging in and out. aims runs only your own accounts, on your own machine. It starts sessions with the official Claude Code and Codex CLIs, and reads the limits of Antigravity, Grok, Kiro and OpenCode through each tool's own CLI and login (for Kiro, the same usage request kiro-cli makes). It is not a service: no one else's account passes through it, and it never shares, pools or resells access. It doesn't disguise itself or send the providers anything their own CLIs wouldn't. Each account stays under its provider's terms, and aims is not meant for stacking accounts to get around a plan's limits. aims is not affiliated with Anthropic, OpenAI, Google, xAI, Amazon or OpenCode.

License

MIT

版本与发布记录

@doguyilmaz/aims 共发布 16 个版本,首次发布于 2026/10/07;过去 12 个月发布了 16 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.4.2latest2026/11/012 天前
0.4.12026/11/012 天前
0.4.02026/11/012 天前
0.3.42026/10/286 天前
0.3.32026/10/286 天前
0.3.22026/10/268 天前

关于 @doguyilmaz/aims 的常见问题

@doguyilmaz/aims 是什么?

一台机器上有几个Claude Code和Codex帐户:即时切换,共享历史记录,故障转移。

如何安装 @doguyilmaz/aims?

在项目目录运行 npm install @doguyilmaz/aims,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 aims,可以用 npx aims 直接运行。

@doguyilmaz/aims 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/doguyilmaz__aims 是否存在。

@doguyilmaz/aims 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@doguyilmaz/aims 可以商用吗?

@doguyilmaz/aims 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@doguyilmaz/aims 还在维护吗?

最新版本 0.4.2 发布于 2026/11/01(2 天前);至今共发布 16 个版本,其中过去 12 个月发布了 16 个;首次发布于 2026/10/07。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。