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

aimlapi-cli

v0.3.1

Published

Alias of the aimlapi package: connect any coding agent to AI/ML API with one command

Readme

aimlapi

Connect your coding agent to AI/ML API with one command.

npx aimlapi claude

The first run signs you in through the browser (or a device code over SSH), creates an API key, points the agent at AI/ML API and starts it. Add --dry-run to see what would change without touching anything, and --undo to revert it.

Let your agent set it up

Tell your coding agent (Claude Code, Codex, OpenCode, Cline, OpenClaude, OpenClaw, Hermes Agent, zero or ZCode):

Read https://docs.aimlapi.com/quickstart/cli/aimlapi-setup.md and follow it to connect this agent to AI/ML API.

It signs you in through the browser (you approve; you never paste a key into the chat), shows what it will change with --dry-run, applies it after you confirm, and tells you how to undo it.

In Claude Code you can also install it as a skill and then just ask it to "set up AI/ML API":

mkdir -p ~/.claude/skills/aimlapi-setup
curl -fsSL https://raw.githubusercontent.com/aimlapi/api-docs/main/skills/aimlapi-setup/SKILL.md \
  -o ~/.claude/skills/aimlapi-setup/SKILL.md

Supported agents

| Agent | Command | | ----- | ------- | | Claude Code | npx aimlapi claude | | Codex | npx aimlapi codex | | OpenCode | npx aimlapi opencode | | Cline | npx aimlapi cline | | OpenClaude | npx aimlapi openclaude | | OpenClaw | npx aimlapi openclaw | | zero | npx aimlapi zero | | ZCode (Z.ai, GLM models) | npx aimlapi zcode | | Hermes Agent | npx aimlapi hermes |

If the agent is not installed, aimlapi offers to install it with npm and shows the exact command first (Install it now? npm install -g … [Y/n]); --yes (-y) installs without asking. Without a terminal (or with CI set) and without --yes it only prints the command and exits. It never uses sudo. Hermes Agent and ZCode are installed by hand: aimlapi prints how.

OpenClaw has no per-run provider switch: aimlapi openclaw writes the AI/ML API provider and default model into its openclaw.json (a running Gateway reloads it) and then starts openclaw. That config points at aimlapi's credentials file instead of holding the key, so sign in with aimlapi login (setting AIMLAPI_API_KEY alone is not enough) and run openclaw secrets reload after signing in with a new key. ZCode's terminal agent (zcode) has no published package yet: build it from its repository. aimlapi zcode --config also sets up the ZCode desktop app, which shares the provider config with zcode (and gets its own copy when its settings keep its data in another folder). A provider you add inside an aimlapi zcode session is saved into aimlapi's per-session file, not ZCode's own, and is gone after aimlapi zcode --undo or aimlapi logout: add your providers in a plain zcode session or the desktop app.

Commands

aimlapi <agent> [--model <id>] [--config] [--dry-run] [--undo] [--yes] [-- <agent args>]
aimlapi login [--device]   # sign in explicitly
aimlapi logout             # revoke the CLI's API key
aimlapi status             # balance, key limit and usage
aimlapi models             # models available for an agent
aimlapi update             # update aimlapi to the latest version
aimlapi --version

For a permanent aimlapi command install it globally:

npm install -g aimlapi

aimlapi-cli is the same package under another name (npx aimlapi-cli claude, npm install -g aimlapi-cli); it installs the same aimlapi command. Install only one of the two globally.

Install without Node

macOS and Linux:

curl -fsSL https://aimlapi.com/install.sh | sh

Windows (PowerShell):

irm https://aimlapi.com/install.ps1 | iex

The script downloads the same binary this package installs (from the npm registry), checks its sha512, and puts aimlapi into ~/.local/bin (Windows: %LOCALAPPDATA%\aimlapi\bin, added to your user PATH). No sudo. Set AIMLAPI_INSTALL_DIR for another directory and AIMLAPI_VERSION for a specific version. aimlapi update then updates the binary in place (only ever to a newer release). The scripts install aimlapi 0.3.0 or newer.

Platforms

macOS, Linux and Windows, each on x64 and arm64. All three are tested in CI on every change.

This package is a thin Node.js launcher (Node.js >= 18). The aimlapi binary ships in a platform-specific optional dependency (@ai-ml.api/cli-<os>-<arch>) that npm installs automatically for your OS and CPU; there are no install scripts. If you see "platform package is not installed", reinstall without --omit=optional / --no-optional.

Links