agentCLAWHUBUnverified

Codex Account Switcher

Manage multiple OpenAI Codex accounts. Capture current login tokens and switch between them instantly. ⚠️ Reads and writes ~/.codex/auth.json and ~/.codex/accounts/*.json (sensitive authentication tokens). Skill: Codex Account Switcher Owner: odrobnik Summary: Manage multiple OpenAI Codex accounts. Capture current login tokens and switch between them instantly. ⚠️ Reads and writes ~/.codex/auth.json and ~/.codex/accounts/*.json (sensitive authentication tokens). Tags: latest:1.2.3 Version history: v1.2.3 | 2026-02-13T09:22:02.519Z | user Remove invented sensitivity metadata field v1.2.2 | 2026-02-13T09:19:11.196Z | use

OpenClaw

Rank

62

Safety

84

Downloads

2.3k

Updated

Apr 15, 2026

Version

1.2.3

Source

CLAWHUB

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 2.3K downloads reported by the source. Last updated 4/15/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Public facts

Every fact links back to the source it came from.

Vendor
Clawhubvendor · observed Apr 15, 2026
Protocol compatibility
OpenClawcompatibility · observed Apr 15, 2026
Adoption signal
2.3K downloadsadoption · observed Apr 15, 2026
Latest release
1.2.3release · observed Feb 13, 2026
Handshake status
UNKNOWNsecurity

Install and run

Setup complexity: low.

clawhub skill install kn7c7fek4a503rbvj0bxbwx6dx7yw25e:codex-account-switcher
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-odrobnik-codex-account-switcher/snapshot"

Documentation

CLAWHUB

9,773 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

---
name: codex-account-switcher
version: 1.2.3
homepage: https://github.com/odrobnik/codex-account-switcher-skill
description: >
  Manage multiple OpenAI Codex accounts. Capture current login tokens and switch
  between them instantly. ⚠️ Reads and writes ~/.codex/auth.json and
  ~/.codex/accounts/*.json (sensitive authentication tokens).
metadata:
  openclaw:
    emoji: "🎭"
    requires:
      bins: ["python3"]
---

# Codex Account Switcher

Manage multiple OpenAI Codex identities (e.g. personal vs. work) by swapping the authentication token file.

## Usage

### 1. List Accounts
Show saved accounts (active one is marked with `ACTIVE` on the right). Default output is compact.

- `--verbose` includes refresh age + token TTL (debug)
- `--json` outputs the verbose info as JSON
```bash
./codex-accounts.py list
```

To include emails/diagnostics:
```bash
./codex-accounts.py list --verbose
```

### 2. Add an Account
Interactive wizard to capture login(s).

- **Always starts a fresh browser login** (`codex logout && codex login`) so you explicitly choose the identity to capture.
- After each login it saves a snapshot.
- In an interactive terminal it asks if you want to add another.
- When invoked non-interactively (e.g. via Moltbot), it runs **single-shot** (no "add another" prompt).
- When naming an account, **press Enter** to accept the default name (local-part of the detected email, e.g. `oliver` from `oliver@…`).

```bash
./codex-accounts.py add
```

### 3. Switch Account
Instantly swap the active login.
```bash
./codex-accounts.py use work
```

### 4. Auto-Switch to Best Quota
Check all accounts and switch to the one with most weekly quota available.
```bash
./codex-accounts.py auto
./codex-accounts.py auto --json
```

Output:
```
🔄 Checking quota for 2 account(s)...

  → sylvia... weekly 27% used
  → oliver... weekly 100% used

✅ Switched to: sylvia
   Weekly quota: 27% used (73% available)

All accounts:
   sylvia: 27% weekly ←
   oliver: 100% weekly
```

## Setup

See [SETUP.md](SETUP.md) for prerequisites and setup instructions.

_meta.json

{
  "ownerId": "kn7c7fek4a503rbvj0bxbwx6dx7yw25e",
  "slug": "codex-account-switcher",
  "version": "1.2.3",
  "publishedAt": 1770974522519
}

SETUP.md

# Codex Account Switcher - Setup Instructions

## Prerequisites

### Required Software

- **Python 3** — For running the account switcher script
- **Codex CLI** — OpenAI Codex command-line client must be installed and configured
  - The skill manages `~/.codex/auth.json` tokens
  - Requires `codex` binary in PATH for the `add` command (uses `codex logout && codex login`)

No additional Python packages required. The skill uses only Python standard library modules.

### File Permissions

⚠️ **Sensitive:** This skill reads and writes authentication tokens:
- `~/.codex/auth.json` — Active Codex session
- `~/.codex/accounts/*.json` — Saved account tokens

Ensure these files have appropriate permissions:
```bash
chmod 600 ~/.codex/auth.json
chmod 700 ~/.codex/accounts
chmod 600 ~/.codex/accounts/*.json
```

## Configuration

### Directory Structure

The skill automatically creates:
```
~/.codex/
├── auth.json              # Active Codex session (managed by Codex CLI)
└── accounts/              # Saved account tokens (managed by this skill)
    ├── oliver.json
    ├── work.json
    └── ...
```

### Installation (Optional)

For easier access, add the script to your PATH:

```bash
ln -s ~/Developer/Skills/codex-account-switcher/codex-accounts.py ~/bin/codex-accounts
```

Then you can run:
```bash
codex-accounts list
codex-accounts use work
```

## How It Works

- **Account Identification**: Decodes the JWT `id_token` to extract the email address
- **Switching**: Overwrites `~/.codex/auth.json` with the saved account copy
- **Adding**: Runs `codex logout && codex login` to start a fresh browser login, then saves the resulting `auth.json`
- **Auto-Switch**: Queries quota for all saved accounts and switches to the one with the most available weekly quota
Github ReposUpdated 5h agoRank 70

AionUi

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

MCPOPENCLAW
Github ReposUpdated 6mo agoRank 70

activepieces

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

OPENCLAW
Github ReposUpdated 6mo agoRank 70

cherry-studio

AI productivity studio with smart chat, autonomous agents, and 300+ assistants.

MCPOPENCLAW
Github ReposUpdated 7mo agoRank 70

CopilotKit

The Frontend for Agents & Generative UI. React + Angular

OPENCLAW

Machine-readable data

The same record, as JSON, for agents and crawlers.

{
  "facts": [
    {
      "factKey": "vendor",
      "category": "vendor",
      "label": "Vendor",
      "value": "Clawhub",
      "href": "https://clawhub.ai/odrobnik/codex-account-switcher",
      "sourceUrl": "https://clawhub.ai/odrobnik/codex-account-switcher",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-04-15T00:45:39.800Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-odrobnik-codex-account-switcher/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-odrobnik-codex-account-switcher/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-04-15T00:45:39.800Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "2.3K downloads",
      "href": "https://clawhub.ai/odrobnik/codex-account-switcher",
      "sourceUrl": "https://clawhub.ai/odrobnik/codex-account-switcher",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-04-15T00:45:39.800Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "1.2.3",
      "href": "https://clawhub.ai/odrobnik/codex-account-switcher",
      "sourceUrl": "https://clawhub.ai/odrobnik/codex-account-switcher",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-02-13T09:22:02.519Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-odrobnik-codex-account-switcher/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-odrobnik-codex-account-switcher/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 1.2.3",
      "description": "Remove invented sensitivity metadata field",
      "href": "https://clawhub.ai/odrobnik/codex-account-switcher",
      "sourceUrl": "https://clawhub.ai/odrobnik/codex-account-switcher",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-02-13T09:22:02.519Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 9, 2026.

Sponsored

Ads related to Codex Account Switcher and adjacent AI workflows.