@uvaits/aigw
v0.6.6
Published
Connect Claude Code and Codex to the UVA AI Gateway with your Entra identity. No API keys on your machine.
Maintainers
Readme
@uvaits/aigw
Use the University of Virginia's AI Gateway from Claude Code and Codex, signed in with your UVA (Entra) identity. No API key is ever created, copied, or stored on your machine.
npm install -g @uvaits/aigw
aigw connect --portal <portal-url> --client-id <id> --tenant-id <id> \
--portal-scope api://<portal-app-id>/Launcher.AccessCopy that full command from the Connect tab of your gateway portal — it
fills in the values for your institution. After the first run, aigw connect on
its own is enough.
What it does
connect signs you in through your browser, shows the allocations you are
rostered on, and writes an isolated tool config that points Claude Code or Codex
at the gateway. Your personal ~/.claude and ~/.codex are never read or
written.
From then on the tools handle their own credentials: they run aigw token every
few minutes and immediately after any 401, and it returns a short-lived Entra
access token from your operating system's protected credential store. Nothing
long-lived is written to disk.
| Command | What it does |
| --- | --- |
| aigw connect | Sign in, choose an allocation, write the tool config |
| aigw launch claude / codex | Start a tool against that config |
| aigw status [--check] | What this machine is set up to do; --check asks the gateway whether your traffic actually arrived |
| aigw disconnect | Sign out and remove what connect wrote |
| aigw token | Print a gateway token — the tools call this, you rarely do |
Requirements
- Node.js 20 or newer
- An allocation on the gateway (ask on the portal if you have none —
connectwill link you there) - A working OS credential store: Keychain on macOS, DPAPI on Windows, libsecret
on Linux (
apt install libsecret-1-0 gnome-keyring). Tokens are never written to a plain file, soconnectstops with instructions rather than falling back.
Security
No provider API keys and no gateway keys exist on your machine. The only stored credential is an Entra refresh token inside the OS credential store; access tokens live 60–90 minutes and are fetched on demand. Losing a laptop is handled by disabling the account — there is no key inventory to chase. Every file this tool writes contains endpoints and an allocation id, never a secret.
Full design: docs/npm-connect.md
