MIT License

项目介绍

burakdede/aisw 是一个托管在 GitHub 上的开源项目,主要使用 Rust 编写,采用 MIT License 许可证,目前获得 78 个 Star、4 次 Fork。

仓库全名
burakdede/aisw
开源许可证
MIT License
Star 数
78
Fork 数
4
未关闭 Issue
4

README 摘要

aisw Switch Claude Code, Codex CLI, Gemini CLI and Antigravity CLI accounts in one command. aisw (AI Switcher) saves each coding-agent login as a named profile and switches between them without logging out, copying auth.json or editing hidden config. It can switch all four agents together and refuse to start an agent in a repository while the wrong account is active. It runs locally, with no account, telemetry or…

完整内容见 GitHub 原始 README 或本页 。

常见问题

aisw 用什么语言开发?

主要使用 Rust 编写,采用 MIT License 许可证,目前有 78 个 Star。

aisw 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 aisw 的源码?

可以直接克隆仓库:git clone https://github.com/burakdede/aisw.git;安装与运行步骤见仓库 README。

aisw 最近还在维护吗?

仓库最近一次更新为 6月12日,当前有 4 个未关闭 Issue;Star 数为 78,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

AI Switcher (aisw) - CLI utility to manage multiple accounts for Claude Code, Codex CLI, and Gemini CLI.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
164
价值分
55
活跃状态
活跃

README

aisw logo

aisw

Switch Claude Code, Codex CLI, Gemini CLI and Antigravity CLI accounts in one command.

Crates.io version CI status Latest release Documentation

aisw (AI Switcher) saves each coding-agent login as a named profile and switches between them without logging out, copying auth.json or editing hidden config. It can switch all four agents together and refuse to start an agent in a repository while the wrong account is active. It runs locally, with no account, telemetry or proxy.

The problem it solves

  • Two accounts, one machine. A work and a personal Claude Code or Codex login overwrite each other, and switching means signing out and back in.
  • Every agent stores auth differently. Claude Code uses the macOS Keychain or .credentials.json, Codex CLI uses CODEX_HOME/auth.json, Gemini CLI uses ~/.gemini. Hand-copying these files breaks token refresh.
  • The wrong account in the wrong repository. Nothing stops a personal login from running in a client repository.

Features

Save and switch accounts

Import the login you already have, add others by OAuth sign-in or API key, and switch with a backup taken first. Each switch rolls back if any write fails. Adding profiles →

aisw saves the current Claude Code login, adds a work API key, lists both profiles and switches to work

Switch every agent at once

A context maps one profile per agent under a single name, even when the profile names differ. aisw context use moves all of them together, or none. Profiles, contexts and workspace rules →

aisw creates a work context across four agents, activates it and shows the exact match

Guard a repository

Bind a folder, repository or GitHub org to a context. With the shell hook, the guard warns or refuses to launch claude, codex, gemini or agy on a mismatch and prints the command that fixes it. Workspace guardrails →

aisw binds a repository to the work context, refuses to start Claude Code with personal accounts, then matches after switching

Install

# Homebrew (macOS, Linux)
brew install burakdede/tap/aisw

# Shell installer (macOS, Linux)
curl -fsSL https://raw.githubusercontent.com/burakdede/aisw/main/install.sh | sh

# Cargo (any platform)
cargo install aisw

Windows binaries and checksums are on the releases page. AI Switcher Desktop and the VS Code and Cursor extension use the same profiles.

Quick start

# Install the shell hook and import the logins you already have
aisw init

# Add accounts by OAuth sign-in or API key
aisw add claude work
aisw add codex work-api-key --api-key "$OPENAI_API_KEY"

# Switch one agent, or every agent in a context
aisw use claude work
aisw context create work --claude work --codex work-api-key
aisw context use work

# See what each agent is using now
aisw status

Antigravity switches its keyring credential and authentication provider while preserving preferences, global integrations, and runtime files. Gemini switching preserves Antigravity’s directories under their shared ~/.gemini parent. Live Antigravity credentials use Go’s platform storage contract, including the macOS security transport; managed secure profiles retain Rust’s native storage.

Start a new agent session after switching; a running process keeps the account it started with. The quickstart walks through each step.

Supported tools

Tool Binary Auth Platforms
Claude Code claude OAuth, API key macOS, Linux, Windows
Codex CLI codex ChatGPT sign-in, API key macOS, Linux, Windows
Gemini CLI gemini Enterprise Google sign-in, Vertex AI, API key macOS, Linux, Windows
Antigravity CLI agy OAuth, API key macOS, Linux, Windows

Per-tool storage, state modes and limits are in Supported tools.

How it works

  • Profiles live under ~/.aisw/, with secrets in the OS keyring (Keychain, Secret Service, Credential Manager) or 0600 files.
  • A switch writes the credentials to where each agent already reads them, after a backup, as one transaction. How it works →
  • Every command takes --json and uses stable exit codes, so aisw verify works as a CI gate. Automation →
  • Nothing leaves the machine. Security →

Documentation

Docs · Commands · Guides · FAQ · Troubleshooting

Community projects

  • aipets: a macOS menu-bar widget (SwiftBar) that shows every aisw profile’s Claude Code / Codex quota as a tamagotchi-style pet, with one-click switching and add/remove.

License

MIT.

评论

暂无评论