Skip to content

FidStyle/change_codex_api_anywhere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ccaa

ccaa is a small Go CLI that switches Codex between saved base_url + OPENAI_API_KEY profiles.

It stores its own state in one file:

  • ~/.ccaa/config.toml

It patches these Codex files directly:

  • ~/.codex/config.toml
  • ~/.codex/auth.json

Build

go build ./...
./ccaa install

Quick Start

./ccaa init
./ccaa add -n main -p vendor-a -u https://example.com/v1 -k sk-xxx -d "monthly route"
./ccaa list
./ccaa use main
./ccaa current
./ccaa help add
./ccaa install

Config Shape

version = 1
current_profile = "main"

[codex]
config_path = "~/.codex/config.toml"
auth_path = "~/.codex/auth.json"

[[profiles]]
name = "main"
provider = "vendor-a"
description = "monthly route"
base_url = "https://example.com/v1"
api_key = "sk-xxx"

Notes

  • use only updates the base_url under the active model_provider section inside Codex's config.toml
  • use only updates OPENAI_API_KEY inside Codex's auth.json
  • install copies the current binary into a PATH location appropriate for the current OS
  • before writing, ccaa creates timestamped backups next to both Codex files

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages