how-much-codex
v1.0.0
Published
Secure local OAuth pairing helper for How Much Codex
Downloads
37
Readme
How Much Codex connection helper
This small MIT-licensed helper connects a ChatGPT/Codex subscription to How Much Codex without printing or pasting OAuth credentials.
The dashboard gives you a single-use command such as:
npx [email protected] connect ABCD-EFGH-JKLM --provider openai --url="https://howmuchcodex.com"This package is provider-locked to OpenAI. It rejects an Anthropic provider flag before reading any
credential, and its destination defaults to https://howmuchcodex.com. --url <origin> (or
--url=<origin>) takes precedence over HMC_URL and that default, which makes a generated command
portable across shells. The value is parsed directly as data: it must be an HTTPS origin with no
credentials, path, query, or fragment. Plain HTTP is accepted only for loopback development.
The helper:
- asks for confirmation and shows the exact HTTPS destination;
- runs the installed official
codex logincommand with a helper-owned temporaryCODEX_HOME; - lets Codex open its normal OpenAI browser sign-in;
- sends the resulting renewable credential only to the displayed How Much Codex origin; and
- stops the child login and removes the exact helper-created temporary directory when finished or
interrupted with
SIGINT/SIGTERM.
It does not read or rotate your normal ~/.codex/auth.json unless you explicitly add
--use-existing-login. That fallback shares a rotating login, so prefer the default isolated browser
login. Pairing codes expire after ten minutes and work once.
Requirements: Node.js 22.18 or newer and the Codex CLI available as codex on your PATH.
Security
Treat any Codex OAuth credential like a password. Do not paste auth.json into chat, support tickets,
or issue trackers. The helper never prints a token, validates the destination as HTTPS (except explicit
loopback development), refuses HTTP redirects instead of forwarding a credential to another origin,
and sends only to the origin displayed before confirmation. If cleanup of its temporary login fails,
the helper stops before upload and prints the exact helper-created directory that you should delete.
SIGKILL, a power loss, or a process crash cannot run cleanup handlers. On its next start, the helper
removes only its exact-name temporary directories that are at least 24 hours old, contain the
helper's owner marker, and belong to a process that is no longer running. Newer or active directories
are left alone. Until then, a residual login may remain under your operating system's temporary
directory with the how-much-codex-login- prefix. Remove only the specific directory after
confirming no connection helper is still using it.
Source code is included in the npm package under the MIT License.
