scorpiox-codex-fetchtoken AI Provider

Fetch Codex OAuth token from local file, SSH, or HTTP endpoint

linux-x64 linux-arm64 macos-arm64 windows-x64

Flags & Options

Flag Short Description Takes Value
--help -h Show help message and available options Yes
--version -v Print version information No
-config Use configuration file to determine token source and settings No
-http Fetch token from a remote HTTP/HTTPS endpoint No
-local Read token from a local file on disk No
-remote Fetch token from a remote source (auto-detect SSH or HTTP) No
-ssh Fetch token over an SSH connection to a remote host No

Usage Examples

# Fetch token from a local file (default path: ~/.config/scorpiox/codex-token)
$ scorpiox-codex-fetchtoken -local
eyJhbGciOiJSUzI1NiIs...truncated...
# Fetch token over SSH from a remote build server
$ scorpiox-codex-fetchtoken -ssh
Connecting to configured SSH host...
Token retrieved successfully (expires in 3600s)
# Fetch token from an HTTP endpoint (e.g. internal OAuth server)
$ scorpiox-codex-fetchtoken -http
GET https://auth.internal.example.com/oauth/token
Token retrieved successfully (expires in 7200s)
# Auto-detect remote source (SSH or HTTP based on config)
$ scorpiox-codex-fetchtoken -remote
Detected source: HTTPS endpoint
eyJhbGciOiJSUzI1NiIs...truncated...
# Use a custom configuration file
$ scorpiox-codex-fetchtoken -config
Loading config from ~/.config/scorpiox/codex-fetchtoken.json
Source: local
eyJhbGciOiJSUzI1NiIs...truncated...
# Pipe token directly into another command
$ export CODEX_TOKEN=$(scorpiox-codex-fetchtoken -local)
$ scorpiox-codex --token "$CODEX_TOKEN" run task.json
Codex session started with authenticated token
# Check version
$ scorpiox-codex-fetchtoken --version
scorpiox-codex-fetchtoken v1.0.0 (built from scorpiox-codex-fetchtoken.c, 485 LOC)

Source & Build Info

Source File
scorpiox/scorpiox-codex-fetchtoken.c
Lines of Code
485
Dependencies
libsxnet · libsxutil · yyjson

Related Tools