how-much-claude
v1.1.0
Published
Secure local OAuth pairing helper for Claude Code and How Much AI
Readme
How Much Claude connection helper
This small MIT-licensed helper connects a Claude Code subscription to How Much Usage or another How Much AI deployment without printing or pasting OAuth credentials.
The dashboard gives you a single-use command such as:
npx [email protected] connect ABCD-EFGH-JKLM --provider anthropic --url="https://howmuchusage.ai"This package is provider-locked to Anthropic. It rejects an OpenAI provider flag before reading any
credential, and its destination defaults to https://howmuchclaude.com. --url <origin> (or
--url=<origin>) takes precedence over HMC_URL and that default, which makes a generated command
portable across POSIX shells, PowerShell, and cmd.exe. The URL 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 destination;
- reads the existing Claude Code OAuth credential on this machine;
- sends it only to the displayed How Much AI origin; and
- reports display metadata without printing the credential.
On macOS it first reads Claude Code's Keychain entry, then falls back to
~/.claude/.credentials.json. On Linux and Windows it uses that credential file. Pairing codes
expire after ten minutes and work once.
Requirements: Node.js 20 or newer and Claude Code signed in on the same machine.
Security
Treat a Claude OAuth credential like a password. Do not paste it 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, gives the upload a 15-second deadline, and sends only to the origin displayed before confirmation.
Claude Code may rotate a shared local refresh token. For always-on hosted monitoring, prefer the private Claude authorization flow offered in the dashboard when it is available.
Source code is included in the npm package under the MIT License.
