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

aihubs-cli

v1.3.9

Published

Local multi-account manager for AI CLI providers

Readme

aihubs-cli

Node.js TypeScript npm GitHub Actions Multi-Provider License

aihubs-cli is a local multi-account manager for supported AI CLI providers. It stores account metadata locally, switches authentication files, and displays available usage information without printing credentials.

Supported providers:

  • codex
  • grok
  • agy
  • claude
  • freebuff

Install

Requirements: Node.js 20+, the CLI for the provider you want to use, and Windows, macOS, or Linux.

npm install -g aihubs-cli
aihubs-cli --help

The selected provider CLI must be installed and available on PATH.

Welcome screen

Running the command without arguments shows the quick-start screen for the current version:

PS C:\Users\YourName> aihubs-cli

    █████╗ ██╗██╗  ██╗██╗   ██╗██████╗ ███████╗
   ██╔══██╗██║██║  ██║██║   ██║██╔══██╗██╔════╝
   ███████║██║███████║██║   ██║██████╔╝███████║
   ██╔══██║██║██╔══██║██║   ██║██╔══██╗╚════██║
   ██║  ██║██║██║  ██║╚██████╔╝██║  ██║███████║
   ╚═╝  ╚═╝╚═╝╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═╝╚══════╝
                 ──  C L I  ──

  Welcome to aihubs-cli v0.0.0
  A simple local manager for your AI provider accounts and sessions.

  GET STARTED
  aihubs-cli login             Sign in and save an account
  aihubs-cli list              View your saved accounts
  aihubs-cli switch            Change the active account
  aihubs-cli status            Check authentication status

  Run aihubs-cli --help for all commands and options.

Common commands

# Sign in
aihubs-cli login codex
aihubs-cli login grok
aihubs-cli login freebuff
aihubs-cli login agy
aihubs-cli login claude

# List accounts
aihubs-cli list
aihubs-cli list codex
aihubs-cli list grok
aihubs-cli list agy
aihubs-cli session codex
aihubs-cli continue
aihubs-cli continue grok
aihubs-cli continue codex
aihubs-cli continue claude
aihubs-cli grok
aihubs-cli codex
aihubs-cli agy
aihubs-cli current codex

# Inspect and switch accounts
aihubs-cli current
aihubs-cli status
aihubs-cli doctor
aihubs-cli clean --all --yes
aihubs-cli switch codex 01
aihubs-cli switch grok [email protected]

# Manage accounts
aihubs-cli alias set 01 personal
aihubs-cli alias clear personal
aihubs-cli remove 01 02 --yes
aihubs-cli export accounts.json
aihubs-cli import accounts.json

Account selectors can be row numbers, account IDs, email addresses, or aliases. switch always requires an explicit provider and uses the global row number shown by list, for example aihubs-cli switch codex 04. list can show more than one active account because each provider has its own active session. Account switching is supported only for codex and grok. Provider-specific forms are supported for list, session, continue, and current. continue resumes a conversation within the selected provider; cross-provider continuation is not supported. status always shows all providers. Without a provider, other commands use the configured default provider. Use aihubs-cli --help for the complete command list.

Account list

The human-readable list includes the row ID, provider, plan, token usage, reset date, and last activity:

An asterisk (*) marks the active account. Because providers maintain separate sessions, list may show one active * for Codex and another for Grok, Agy, or other providers.

 ID   PROVIDER    ACCOUNT                         PLAN      TOKEN USAGE    RESET AT         LAST ACTIVITY
-------------------------------------------------------------------------------------------------------------------------
  01 codex       [email protected]             Go        9%             Sep 22, 2026      Aug 24, 2026
  02 codex       [email protected]             Free      Auth expired    -                Aug 23, 2026

For Codex accounts, usage is retrieved independently for every account from the authenticated Codex backend. The CLI reads the primary and secondary rate-limit windows and treats server-provided reset timestamps as authoritative.

Codex accounts are discovered from the active auth file and the per-account files in:

~/.codex/accounts/*.auth.json

On Windows, ~ means the current user profile directory. Auth expired, Access denied, Rate limited, and Unknown are status messages, not usage percentages. Missing usage is displayed as -.

Provider login

Login delegates to the selected provider CLI:

aihubs-cli login <provider>

Freebuff login URLs open automatically in the default browser. Other providers use their own installed CLI login flow.

Agy

Use the Antigravity CLI through the agy command. Install agy, then sign in and manage it with:

agy --version
aihubs-cli login agy
aihubs-cli list agy
aihubs-cli current agy

Agy account emails are discovered from the provider account file under ~/.gemini/google_accounts.json and recent Agy authentication logs. Agy does not expose separate switchable OAuth profiles, so switch agy ... is not supported; use Agy's own sign-out and Google authentication flow to change accounts. Agy quota is shown as Unknown because its quota panel is interactive and has no supported non-interactive billing endpoint.

JSON output

Use --json for scripts and integrations:

aihubs-cli --json list
aihubs-cli --json list codex
aihubs-cli --json status
aihubs-cli --json doctor

doctor checks installed provider CLIs, saved account counts, and basic authentication metadata. Use --no-update-check to skip the daily npm update notification for a command, for example: aihubs-cli --no-update-check list.

Normal JSON output redacts access tokens, refresh tokens, API keys, cookies, authorization headers, and other sensitive values. Credential export requires both explicit flags:

aihubs-cli export accounts.json --include-credentials --confirm-sensitive-export

Storage

The manager stores registry metadata, protected account snapshots, usage cache, and backups in:

~/.provider-auth

Provider authentication remains in the provider's own home. Override locations when needed:

$env:PROVIDER_HOME = "D:\\path\\to\\provider-home"
$env:PROVIDER_AUTH_HOME = "D:\\path\\to\\aihubs-auth"

Never commit authentication files, exports, backups, or tokens. See SECURITY.md.

Development

npm install
npm run build
npm test

TypeScript source is under src/, tests are under test/, and compiled files are written to dist/.

Troubleshooting

Verify the provider CLI is installed and available on PATH:

codex --version
grok --version
agy --version
claude --version
freebuff --version

If a Codex account displays 401, authenticate that account again:

aihubs-cli login codex

When developing locally, run the local build directly:

node .\\dist\\cli.js list

License

Copyright © 2026. MIT License; see LICENSE.