codex-tokens
0.0.7
dotnet tool install --global codex-tokens --version 0.0.7
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local codex-tokens --version 0.0.7
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=codex-tokens&version=0.0.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package codex-tokens --version 0.0.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Codex Auth Manager ποΈ
A batteries-included .NET global tool for wrangling every Codex auth token you ownβsafely, versioned, and with zero guesswork.
β¨ Why youβll love it
- All tokens, one brain β import every
*auth.json, inspect metadata, and switch identities in seconds. - Immutable history β every refresh becomes a new version, so rolling back feels like using Git for tokens.
- Automated safety nets β encrypted backups, environment separation, and guarded destructive actions.
- Developer-friendly β human-readable CLI, rich logs, and first-class Windows paths.
- Shipping confidence β GitHub Actions builds, tests, publishes NuGet, and cuts GitHub releases on every
masterpush.
π Install (global .NET tool)
# Fresh install
dotnet tool install --global codex-tokens
# Upgrade to the latest release
dotnet tool update --global codex-tokens
Need a local build? Run dotnet pack src/CodexAuthManager.Cli/CodexAuthManager.Cli.csproj -c Release and install from the produced .nupkg.
β‘ Quick start (TL;DR)
- Scan & import every Codex token that lives under
%USERPROFILE%\.codexcodex-tokens import - List the identities that were discovered (email, plan, last refresh, active flag).
codex-tokens list - Activate the identity you want to work withβthis rewrites your live
auth.jsonsafely.codex-tokens activate user@example.com - Rollback if a token stops working; previous versions are kept forever.
codex-tokens rollback user@example.com --version 2
π― Every dangerous operation automatically snapshots the SQLite database to %APPDATA%\CodexManager\backups so you can undo mistakes.
π§ Command cheatsheet
| Command | What it does |
|---|---|
codex-tokens import |
Scans for *auth.json, extracts JWT metadata, and versions each identity. |
codex-tokens list |
Prints every identity with plan, environment, and last updated timestamp. |
codex-tokens show [id|email] |
Displays the active identity by default or a specified one with all historical versions. |
codex-tokens activate [id|email] |
Makes the chosen identity live by writing its current token to %USERPROFILE%\.codex\auth.json. |
codex-tokens remove <targets> |
Deletes identities after taking a backup. |
codex-tokens rollback [target] [--version N] |
Creates a brand-new version using an older token payload. |
codex-tokens --dev <command> |
Runs every operation against the development storage paths listed below. |
ποΈ Storage layout & environments
| Scope | Codex folder | Database | Backups |
|---|---|---|---|
| Production | %USERPROFILE%\.codex |
%APPDATA%\CodexManager\tokens.db |
%APPDATA%\CodexManager\backups |
Development (--dev) |
%APPDATA%\CodexManager-Dev\.codex |
%APPDATA%\CodexManager-Dev\tokens-dev.db |
%APPDATA%\CodexManager-Dev\backups |
- Backups retain the 10 most recent snapshots.
- Every identity maintains a strictly increasing
VersionNumber; nothing is ever mutated in place. - JWT metadata (email, plan, subscription) is stored alongside tokens so you can search without decrypting anything.
π§ͺ Local development
# Restore dependencies
dotnet restore CodexAuthManager.sln
# Run unit tests
dotnet test CodexAuthManager.sln
# Launch the CLI without global install
dotnet run --project src/CodexAuthManager.Cli -- list
dotnet run --project src/CodexAuthManager.Cli -- --dev import
Project map:
CodexAuthManager/
βββ src/
β βββ CodexAuthManager.Core/ # database, services, abstractions
β βββ CodexAuthManager.Cli/ # Spectre.Console-powered CLI
βββ tests/
β βββ CodexAuthManager.Tests/ # unit tests for core behaviors
βββ docs/ # design notes, plans, etc.
π€ Automation & releases
- CI (
ci.yml): restores, builds, tests, and packs the CLI on every push/PR. - Release (
release.yml): onmaster, GitVersion calculates semantic versions, the tool is packed, pushed to NuGet, and a GitHub Release is created with the.nupkgartifact attached. - Secrets: the workflow pulls the NuGet API key from Bitwarden via
BW_ACCESS_TOKEN, so no plaintext tokens live in the repo.
Every successful master push creates a new codex-tokens version on NuGet and tags the repo (vX.Y.Z).
π§ Roadmap ideas
- Portable cross-platform path providers.
- Encrypted-at-rest database option.
- Rich TUI dashboards powered by Spectre Console canvases.
- First-class macOS/Linux support (community contributions welcome!).
π€ Contributing
- Fork the repo & create a feature branch.
- Run
dotnet testto keep CI happy. - Open a PRβscreenshots or sample outputs make reviews a breeze.
Bug reports and feature requests are equally appreciated. If the tool saved you time, drop a β!
π License
MIT Β© JKamsker β see LICENSE once added.
Made with β, Spectre.Console, and a love for well-behaved CLIs.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.