npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tvps/agw-client-cli

v0.2.3

Published

Interactive Agent Gateway client CLI for virtual-key Claude Code and Codex CLI setup.

Readme

agw-client-cli

Interactive npm/npx setup for Claude Code CLI and Codex CLI using an existing Agent Gateway virtual key.

This package is intentionally smaller than the Electron agw-client app:

  • virtual-key only; it does not sign in with Google SSO
  • Claude Code CLI and Codex CLI only; no Claude Cowork support
  • no shell rc snippets, OTel config, MDM baggage headers, or helper session
  • full replacement writes with one-time .egw-backup sibling backups

Install

npm install -g @tvps/agw-client-cli
agw-client-cli setup

Or run without installing:

npx @tvps/agw-client-cli setup

setup, switch, and uninstall require an interactive terminal.

Package Details

This package is published as @tvps/agw-client-cli (scoped under the @tvps organization). The scoped name is required when installing globally or running via npx.

Setup

agw-client-cli setup

The wizard asks for:

  • gateway URL, for example https://gateway.example.com
  • virtual key copied from the AGW Admin virtual-key screen
  • targets to enable: Claude Code CLI, Codex CLI, or both
  • provider/model choices fetched live from the gateway

Setup blocks if the selected target binary is missing from PATH. It then fetches Kiro and Codex model lists and sends tiny generation probes with the prompt Reply with OK. through all four paths:

  • /kiro/anthropic/v1/messages
  • /kiro/openai/v1/responses
  • /codex/anthropic/v1/messages
  • /codex/openai/v1/responses

Those probes verify that the key works through the gateway. They are real model requests, so they can consume upstream quota and create gateway audit rows.

Commands

agw-client-cli switch
agw-client-cli status
agw-client-cli models
agw-client-cli uninstall

switch interactively changes one target to Kiro, Codex, or official/direct mode. Official/direct mode restores the .egw-backup file if it exists; if no backup exists, it deletes the gateway-managed config so the upstream client can fall back to its normal official configuration. The stored virtual key is kept so you can switch back later.

status prints local config paths, binary status, and always runs the model list plus tiny generation probes. This is useful for diagnosis but can consume upstream quota.

models fetches both Kiro and Codex every time and prints grouped model lists for verbose, OpenAI, and Anthropic formats.

uninstall restores or deletes Claude and Codex configs, then deletes the CLI state file and stored virtual key.

Files

State is stored as plaintext JSON:

  • macOS: ~/Library/Application Support/agw-client-cli/state.json
  • Linux: ${XDG_CONFIG_HOME:-~/.config}/agw-client-cli/state.json
  • Windows: %LOCALAPPDATA%\agw-client-cli\state.json

Config files are full replacements:

  • Claude Code CLI: ~/.claude/settings.json
  • Codex CLI: ~/.codex/config.toml

On first write, an existing config is moved to a sibling backup:

  • ~/.claude/settings.json.egw-backup
  • ~/.codex/config.toml.egw-backup

Files containing secrets are written with 0600 permissions where the platform supports POSIX modes.

Codex Config Contract

Codex CLI uses the OpenAI Responses-compatible gateway routes. Provider blocks use:

base_url = "https://gateway.example.com/kiro/openai/v1"
experimental_bearer_token = "<virtual-key>"
wire_api = "responses"

The Codex provider uses /codex/openai/v1. The CLI does not use env_key, shell exports, OTel sections, or custom baggage headers.

Development

npm install
npm run typecheck
npm run lint
npm run test
npm run build
npm pack --dry-run