Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Use this guide to prepare and submit changes to ProfileDeck.

Install these prerequisites:

- Go 1.26, as declared in `go.mod`
- Go 1.27, as declared in `go.mod`
- Node.js 26 with npm, as used by the CI workflows
- Make
- The `golangci-lint` and `wails3` versions declared in `Makefile` when working on the full Desktop application
Expand All @@ -34,7 +34,7 @@ Desktop builds require platform development libraries. The Linux packages used b
- Keep each change focused on one problem.
- Follow the style and structure of the surrounding code.
- Add tests for meaningful behavior and regressions.
- Update documentation when commands, setup, behavior, or supported workflows change.
- Update relevant docs when workflows or developer contracts change. In user docs, keep each fact in one place and cover only changed tasks, prerequisites, results, limitations, or recovery actions; omit obvious UI navigation.
- Use synthetic or redacted test data. Do not commit credentials, personal data, runtime databases, exports, backups, logs, or local build output.

## Validate Changes
Expand Down
27 changes: 5 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,9 @@

ProfileDeck saves AI Agent logins and settings as reusable **Profiles**. Use the Desktop app or CLI to switch between Profiles and preview the changes before applying them.

## Features

- **Reusable Profiles** — Save separate logins and settings for work, personal, or other contexts.
- **Review before switching** — See which files and login details will change. Sensitive values stay hidden.
- **Usage and limits** — View usage data, cost estimates, and current limits; availability varies by tool.
- **Local data** — Keep data on your machine and create encrypted backups for recovery.

## Supported Agents

ProfileDeck supports multiple AI Agents. See [Agent support](docs/index.md#supported-tools) for the full list and what ProfileDeck can switch for each Agent.
ProfileDeck supports Codex, Claude Code, Antigravity, and Grok Build. See [Supported tools](docs/index.md#supported-tools) for what each Profile includes.

## Install

Expand All @@ -34,27 +27,17 @@ ProfileDeck supports multiple AI Agents. See [Agent support](docs/index.md#suppo
| **Linux portable app** | Desktop | [Install portable Desktop](docs/guide/getting-started.md#portable-desktop) |
| **Build from source** | CLI | [Build and use the CLI](docs/guide/getting-started.md#build-and-use-the-cli) |

## Desktop and CLI

Desktop and CLI use the same local Profiles and switching rules. Use Desktop for visual workflows and `profiledeck-cli` for terminal workflows and automation.

### Desktop

Manage Profiles, preview switches, view usage and limits, and run diagnostics from a visual interface.

![ProfileDeck Desktop showing Profiles and usage limits](docs/images/desktop-codex-profiles-en.png)

### CLI
## CLI example

Use the CLI to list Profiles, switch between them, and view usage. The example below uses Codex:
For a Codex Profile with ID `work`:

```bash
profiledeck-cli codex profile list
profiledeck-cli switch codex <profile-id> --yes
profiledeck-cli switch codex work --yes
profiledeck-cli usage summary --provider codex
```

Add `--json` when a script or tool needs machine-readable output. See the [CLI reference](docs/reference/cli.md) for all commands.
Use `--json` on supported commands when a script needs machine-readable output. See the [CLI reference](docs/reference/cli.md) for common commands, or run `profiledeck-cli --help` for full syntax.

## License

Expand Down
27 changes: 5 additions & 22 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,9 @@

ProfileDeck 将 AI Agent 的登录信息和设置保存为可复用的 **Profile**。你可以通过桌面端或 CLI 在不同 Profile 之间切换,并提前查看变更内容。

## 功能

- **Profile 管理** — 将不同的登录信息和设置分别保存为 Profile,按需切换。
- **切换预览** — 查看即将变更的文件和登录信息,敏感内容始终隐藏。
- **用量与限额** — 查看用量数据、成本估算和当前限额;支持情况因工具而异。
- **本地数据** — 数据保存在本机,并可创建加密备份用于恢复。

## 支持的 Agent

ProfileDeck 支持多种 AI Agent。完整列表及各 Agent 可切换的内容见[支持说明](docs/zh/index.md#支持的工具)。
ProfileDeck 支持 Codex、Claude Code、Antigravity 和 Grok Build。各工具可切换的内容见[支持的工具](docs/zh/index.md#支持的工具)。

## 安装

Expand All @@ -34,27 +27,17 @@ ProfileDeck 支持多种 AI Agent。完整列表及各 Agent 可切换的内容
| **Linux 便携版** | 桌面端 | [安装便携版桌面端](docs/zh/guide/getting-started.md#便携版桌面端) |
| **源码构建** | CLI | [构建并使用 CLI](docs/zh/guide/getting-started.md#构建并使用-cli) |

## 桌面端与 CLI

桌面端提供可视化操作,`profiledeck-cli` 适合终端和自动化任务。两者共用本地 Profile 和切换规则。

### 桌面端

在桌面端管理 Profile、预览切换、查看用量与限额;遇到问题时,还可以运行诊断。

![ProfileDeck 桌面端中的 Profile 与用量限额](docs/images/desktop-codex-profiles-zh.png)

### CLI
## CLI 示例

使用 CLI 列出和切换 Profile,并查看用量。下面以 Codex 为例:
以 ID 为 `work` 的 Codex Profile 为例:

```bash
profiledeck-cli codex profile list
profiledeck-cli switch codex <profile-id> --yes
profiledeck-cli switch codex work --yes
profiledeck-cli usage summary --provider codex
```

脚本或工具需要机器可读的结果时,可添加 `--json`。完整命令见 [CLI 参考](docs/zh/reference/cli.md)。
脚本需要机器可读结果时,可在支持的命令中添加 `--json`。常用命令见 [CLI 参考](docs/zh/reference/cli.md);完整语法运行 `profiledeck-cli --help` 查看

## 许可证

Expand Down
4 changes: 2 additions & 2 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const enGrokBuild = [

const enSafety = [
{ text: 'Review and Switch', link: '/operations/switching' },
{ text: 'Recover or Undo', link: '/operations/recovery' },
{ text: 'Diagnostics and Recovery', link: '/operations/recovery' },
{ text: 'Data and Security', link: '/reference/data-security' }
]

Expand Down Expand Up @@ -69,7 +69,7 @@ const zhGrokBuild = [

const zhSafety = [
{ text: '审核并切换', link: '/zh/operations/switching' },
{ text: '恢复或撤销', link: '/zh/operations/recovery' },
{ text: '诊断与恢复', link: '/zh/operations/recovery' },
{ text: '数据与安全', link: '/zh/reference/data-security' }
]

Expand Down
74 changes: 10 additions & 64 deletions docs/antigravity/profiles.md
Original file line number Diff line number Diff line change
@@ -1,86 +1,32 @@
# Antigravity Profiles

ProfileDeck can save and switch an Antigravity consumer OAuth login stored in the operating system credential store. It does not sign you in to Antigravity.
ProfileDeck saves and switches Antigravity's consumer OAuth login from the operating system credential store. It does not sign you in or manage legacy storage, settings, or separate SSH and container logins.

## Before you start

1. Sign in to Antigravity and confirm that it works.
2. Start ProfileDeck, or run `profiledeck-cli init` if you use the CLI.

Legacy Antigravity storage is not supported.

## Save a Profile in the Desktop app

1. Open **Antigravity** in the ProfileDeck sidebar.
2. Select **New Profile**.
3. Enter a permanent Profile ID and a display name, then select **Save Profile**.

The new Profile becomes the current Antigravity Profile. ProfileDeck never displays its access or refresh tokens.

## Save a Profile from the CLI

Check the current login, then save it:
Sign in to Antigravity and confirm it works. CLI users run `profiledeck-cli init` once. Use `detect` to check whether the current login is supported before creating a Profile:

```bash
profiledeck-cli antigravity detect
profiledeck-cli antigravity profile create work --name Work
```

`detect` reports whether the login is ready without printing it. The create command requires a valid current login.

Review or rename saved Profiles with:

```bash
profiledeck-cli antigravity profile list
profiledeck-cli antigravity profile show work
profiledeck-cli antigravity profile update work --name "Work account"
profiledeck-cli antigravity profile create work
```

## Switch Profiles
The first Profile becomes current. To save another login, sign in to that account in Antigravity and create another Profile.

When practical, close Antigravity before switching so it cannot refresh its login during the change. Reopen it after the switch.
## Switch and save a refreshed login

In the Desktop app, open the Profile you want, select **Use Profile**, review the change, and confirm it.
Close Antigravity before switching when practical so it cannot refresh its login during the change. See [Review and Switch](../operations/switching.md) for the CLI command.

From the CLI, preview the change when needed, then apply it:

```bash
profiledeck-cli switch antigravity work --dry-run
profiledeck-cli switch antigravity work --yes
```

ProfileDeck checks the current login again and creates a private operation recovery point before changing it. If the switch is interrupted, use [Diagnostics and recovery](../operations/recovery.md).

## Save a refreshed login

Antigravity may refresh its login while it runs. The short-lived access-token expiry does not describe how long a saved Profile can be reused, so ProfileDeck does not present it as a login expiry. ProfileDeck saves a valid refreshed login when you switch away from the current Profile. You can also save it explicitly:
Antigravity may refresh its login while running. ProfileDeck saves a valid refreshed login when you switch away; you can save it before signing in to another account with:

```bash
profiledeck-cli antigravity profile save-current
```

In the Desktop app, open the current Profile's **…** menu and select **Save Current Login**.

## Delete a Profile

Open a Profile's action menu in Desktop and choose **Delete Profile**, or run:

```bash
profiledeck-cli antigravity profile delete work --yes
```

This deletes the complete global Profile from every Agent, not only its Antigravity data. A saved login used only by that Profile is deleted, while shared saved logins remain. A current Profile or one with an unfinished operation cannot be deleted. The current Antigravity login in the system credential store does not change.
A short-lived access token's expiry does not tell you how long the saved Profile remains reusable. See [Profiles and settings](../guide/concepts.md) for sharing and deletion effects.

## Check usage limits

The Desktop app checks the current Antigravity Profile once at startup and after a successful switch. Select **Refresh limits** on the current Profile to check again. ProfileDeck does not poll in the background.

These checks send the current Profile's access token to Google's Cloud Code service. The service contract is unpublished, so using it may carry account risk. ProfileDeck does not refresh, save, or write back the token during a check.

The Profile list shows a compact summary. Profile details show each available group, its 5-hour and weekly windows, remaining percentage, reset time, and check time. A non-current Profile can keep a snapshot checked earlier in the same app session, but you must use that Profile before refreshing it.

Limit snapshots are temporary. They are not saved to usage reports, application backups, or the ProfileDeck database, and they do not identify which Profile produced earlier Antigravity activity.

## What is not supported
Desktop checks the current Profile at startup and after switching; further checks are manual. The check sends its access token to an unpublished Google Cloud Code service. This may carry account risk. ProfileDeck does not refresh or write back the token during the check.

ProfileDeck does not manage Antigravity sign-in, settings, legacy-storage migration, Manager data, model-level limit details, usage attribution, or separate login files used by SSH or container sessions. Antigravity limit checks are available only in the Desktop app.
Limit results remain in memory and are not saved to usage reports or backups. They do not identify which Profile produced earlier activity. Limit checks are available only in Desktop.
87 changes: 10 additions & 77 deletions docs/claude-code/profiles.md
Original file line number Diff line number Diff line change
@@ -1,96 +1,29 @@
# Claude Code Profiles

A Claude Code Profile saves one Claude Code account login. ProfileDeck does not change Claude Code settings, MCP servers, plugins, API keys, cloud-provider authentication, or Claude Desktop.
ProfileDeck saves the account login created by Claude Code `/login`. It does not sign you in or manage API keys, Console or cloud-provider authentication, Claude Code settings, or Claude Desktop.

## Before you start

- Desktop initializes ProfileDeck automatically. CLI users must run `profiledeck-cli init` once.
- Run `/login` in Claude Code before saving a Profile.
Run `/login` in Claude Code, then initialize the CLI with `profiledeck-cli init` if needed. On macOS, ProfileDeck may need permission to read the Claude Code Keychain item. macOS asks for your computer login password, not your Claude account password.

ProfileDeck only saves the account login from `/login`. It does not save API keys or Console sign-in, and it does not sign you in.

## Save Profiles in Desktop

1. Select **Claude Code → Profiles**.
2. If macOS permission is required, choose **Authorize** and allow ProfileDeck to read the Claude Code login from Keychain.
3. Choose **New Profile**, then enter a permanent Profile ID and a display name.
4. Run `/login` in Claude Code for another account, return to ProfileDeck, and save another Profile.

The first saved Profile becomes current. Saving another Profile does not change Claude Code settings.

## Save Profiles with the CLI

Sign in to the first account, then run:

```bash
profiledeck-cli claude-code detect
profiledeck-cli claude-code profile create personal --name "Personal"
```

Sign in to the second account with `/login`, then save it separately:
## Save and switch accounts

```bash
profiledeck-cli claude-code profile create work --name "Work"
profiledeck-cli claude-code profile list
profiledeck-cli claude-code profile create personal
```

List and show commands display login status and expiry information without printing token values.
To save another account, run `/login` for that account in Claude Code, then create another Profile. The first saved Profile becomes current. Switching uses the [shared switch command](../operations/switching.md). After switching, start a new Claude Code session and run `/status` to confirm the account; existing processes keep their previous state.

## Switch accounts

In Desktop, choose **Use Profile**, review the login change, and confirm. ProfileDeck creates a private operation recovery point before continuing.

With the CLI, previewing is optional:

```bash
profiledeck-cli switch claude-code personal --dry-run
profiledeck-cli switch claude-code personal --yes
```

Start a new Claude Code session after switching and run `/status` to confirm the account. Already running Claude Code processes do not change.

If Claude Code refreshed the current login, ProfileDeck saves a valid update before switching away. An expired saved Profile can still be selected so Claude Code can renew it through `/login`.

## Save a refreshed login

Open the current Profile's **…** menu and choose **Save Current Login** in Desktop, or run:
ProfileDeck saves a valid refreshed login when you switch away. You can save it before another `/login` with:

```bash
profiledeck-cli claude-code profile save-current
```

When the saved login is shared by multiple Profiles, ProfileDeck shows how many Profiles will change. Review that count before confirming with `--yes` in the CLI.

## Delete a Profile

Open a Profile's action menu in Desktop and choose **Delete Profile**, or run:

```bash
profiledeck-cli claude-code profile delete work --yes
```

This deletes the complete global Profile from every Agent, not only its Claude Code data. A saved login used only by that Profile is deleted, while shared saved logins remain. A current Profile or one with an unfinished operation cannot be deleted. The current Claude Code Keychain item or credential file does not change.

## Allow Keychain access on macOS

Claude Code must create its Keychain login with `/login` before ProfileDeck can save it. Opening the Profiles page, running `detect`, or opening Diagnostics only checks whether the login is available.

When access is required, Desktop shows **Authorize**. macOS may then ask for your macOS login password to grant ProfileDeck access to the existing Claude Code Keychain item. This is not a request for your Claude account password.

Keychain permissions are specific to each item. Another tool working without a prompt does not mean Claude Code should do the same.

## Login files on Linux and Windows

ProfileDeck uses `.credentials.json` below `CLAUDE_CONFIG_DIR`, or `~/.claude/.credentials.json` when that variable is unset. It keeps using the location saved when Claude Code support was first set up.

If a later CLI process sees a different `CLAUDE_CONFIG_DIR`, ProfileDeck warns instead of silently switching to another file. On Linux, ProfileDeck keeps the login file readable only by your user account when it writes the file.

## If Claude Code uses the wrong account

Claude Code settings, `apiKeyHelper`, API-key environment variables, and cloud-provider options can take precedence over the selected account login. ProfileDeck reports the names of supported authentication override variables visible to its own process, but it cannot inspect another terminal or an already running Claude Code process.
If several Profiles share that login, review the affected count before confirming with `--yes`. Sharing and deletion effects are explained under [Profiles and settings](../guide/concepts.md).

Start a new session, run `/status`, and review the [Claude Code authentication documentation](https://code.claude.com/docs/en/authentication) when the selected account is not active.
## Login location and overrides

## What is not included
On Linux and Windows, ProfileDeck uses `CLAUDE_CONFIG_DIR/.credentials.json`, or `~/.claude/.credentials.json` when the variable is unset. It keeps the location chosen during first setup and warns if a later CLI process points elsewhere.

Claude Code Profile support does not include Claude Desktop, quota checks, usage attribution, Console or API-key accounts, Claude Code settings switching, or parallel account sessions.
Claude Code settings, `apiKeyHelper`, API-key environment variables, or cloud-provider options can take precedence over the selected account. If the wrong account is active, start a new session, check `/status`, and consult [Claude Code authentication](https://code.claude.com/docs/en/authentication). ProfileDeck cannot inspect another terminal's environment or an already running Claude Code process.
Loading
Loading