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

tokenopen-config

v0.1.1

Published

One-click TokenOpen configuration for Claude Code, Codex, OpenClaw, Hermes, and OpenAI-compatible developer tools.

Readme

tokenopen-config

TokenOpen one-click client configuration plan for Claude Code, Codex, OpenClaw, Hermes, and other OpenAI-compatible developer tools.

Target host:

https://www.tokenopen.ai

Key behavior:

  • Connectivity verification uses GET {host}/v1/models with Authorization: Bearer sk-xxx.
  • Model and pricing discovery uses GET {host}/api/pricing.
  • Claude Code uses the root host as its Anthropic base URL: {host}.
  • Codex, OpenClaw, Hermes, Factory Droid, Crush, OpenCode, Oh My Pi, CodeBuddy, and most other clients use OpenAI-compatible base URL: {host}/v1.
  • Codex model auto-selection prefers models from /api/pricing where:
    • tags contains LLM;
    • supported_endpoint_types is empty or includes openai;
    • model name starts with gpt-5;
    • non-small variants are preferred over mini, nano, small, lite, or tiny.
  • Codex fallback model is gpt-5.5.

Compatibility

The current codebase already provides the required server-side endpoints:

  • GET /v1/models
  • POST /v1/messages
  • POST /v1/chat/completions
  • POST /v1/responses
  • GET /api/pricing

Authentication compatibility:

  • OpenAI-compatible clients can use Authorization: Bearer sk-xxx.
  • Claude/Anthropic-compatible clients can use x-api-key: sk-xxx; maps it to Bearer auth for /v1/messages and /v1/models.

Pricing compatibility:

  • /api/pricing already returns fields consumed by tokenopen:
    • model_name
    • tags
    • model_ratio
    • completion_ratio
    • cache_ratio
    • supported_endpoint_types

TokenOpen Configuration

Use this host everywhere:

https://www.tokenopen.ai

Use this root URL for Claude Code:

https://www.tokenopen.ai

Use this OpenAI-compatible URL for Codex and most other clients:

https://www.tokenopen.ai/v1

Use this pricing endpoint for model discovery:

https://www.tokenopen.ai/api/pricing

Use this model verification endpoint:

https://www.tokenopen.ai/v1/models

Manual Client Setup

Until tokenopen-config is implemented, use zcf directly.

Claude Code:

npx -y zcf init -s -T cc -f -r merge -t api_key \
  -u https://www.tokenopen.ai \
  -k sk-your-token \
  -m skip -w skip -o skip -x false

Codex:

npx -y zcf init -s -T codex -f -r merge -t api_key \
  -u https://www.tokenopen.ai/v1 \
  -k sk-your-token \
  -M gpt-5.4 \
  -m skip -w skip -o skip -x false

Claude Code environment variables:

export ANTHROPIC_BASE_URL="https://www.tokenopen.ai"
export ANTHROPIC_API_KEY="sk-your-token"
export ANTHROPIC_AUTH_TOKEN="sk-your-token"

OpenAI-compatible tools:

base_url = https://www.tokenopen.ai/v1
api_key  = sk-your-token
model    = gpt-5.4

Hermes provider shape:

providers:
  tokenopen:
    base_url: https://www.tokenopen.ai/v1
    key_env: TOKENOPEN_API_KEY
    kind: openai
model:
  default: tokenopen/gpt-5.4
  provider: tokenopen

Server Requirements

For best compatibility, TokenOpen should ensure:

  • /v1/models is reachable with a valid user API token.
  • /api/pricing is public or accessible without browser session auth.
  • Target coding models have pricing configured.
  • Target coding models are available in user groups.
  • Target coding models include LLM in their tags.
  • OpenAI-compatible models include openai in supported_endpoint_types, or leave the field empty.
  • Claude Code models support /v1/messages.

Recommended model metadata for coding models:

{
  "tags": "LLM",
  "endpoints": {
    "openai": "/v1/chat/completions"
  }
}

tokenopen-config Implementation Plan

Required defaults:

PRIMARY_HOST = "https://www.tokenopen.ai"
FALLBACK_HOSTS = []
DEFAULT_PROVIDER_NAME = "TokenOpen"
DEFAULT_ENV_KEY = "TOKENOPEN_API_KEY"

Required CLI options:

-k, --api-key <key>
--only <client-list>
--model <model>
--base-url <url>
--skip-verify
-v, --verbose
-h, --help
-V, --version

Base URL rules:

  • Claude Code: {host}
  • Codex: {host}/v1
  • OpenClaw: {host}/v1
  • Hermes: {host}/v1
  • Factory Droid: {host}/v1
  • Copilot CLI: {host}/v1
  • nanobot: {host}/v1
  • Crush: {host}/v1
  • OpenCode: {host}/v1
  • Oh My Pi: {host}/v1
  • CodeBuddy: {host}/v1/chat/completions

Verification:

GET https://www.tokenopen.ai/v1/models
Authorization: Bearer sk-your-token

Model discovery:

GET https://www.tokenopen.ai/api/pricing

Recommended model selection order:

  1. Explicit --model.
  2. Best gpt-5* LLM with OpenAI endpoint and non-small tier.
  3. Any gpt-5* LLM with OpenAI endpoint.
  4. Any LLM with OpenAI endpoint and non-small tier.
  5. Configured fallback model.

Recommended fallback model:

gpt-5.4

Usage

Install or run directly with npx:

npx -y tokenopen-config -k sk-your-token --only claude
npx -y tokenopen-config -k sk-your-token --only codex
npx -y tokenopen-config -k sk-your-token --only openclaw
npx -y tokenopen-config -k sk-your-token --only hermes
npx -y tokenopen-config -k sk-your-token --only all

If you already installed the package globally, use this format:

tokenopen-config -k sk-your-token --only claude
tokenopen-config -k sk-your-token --only codex
tokenopen-config -k sk-your-token --only openclaw
tokenopen-config -k sk-your-token --only hermes
tokenopen-config -k sk-your-token --only all
tokenopen-config -k sk-your-token --only claude,codex
tokenopen-config -k sk-your-token --only all --model gpt-5.4

Supported --only values:

claude
codex
openclaw
hermes
all

Non-goals

  • Do not modify protected project identity, package paths, or existing branding.
  • Do not require changes relay routing unless a TokenOpen deployment disables /api/pricing or omits model metadata needed by client discovery.

Current Implementation

This repository now contains a working zero-dependency Node.js CLI.

Local checks:

npm run check
node ./bin/tokenopen-config.js --help

Local usage:

node ./bin/tokenopen-config.js -k sk-your-token
node ./bin/tokenopen-config.js -k sk-your-token --only claude,codex
node ./bin/tokenopen-config.js -k sk-your-token --only all --model gpt-5.4

Supported clients in this initial implementation:

  • claude: uses zcf for Claude Code and writes Anthropic environment variables.
  • codex: uses zcf for Codex with https://www.tokenopen.ai/v1.
  • openclaw: calls local openclaw onboard with TokenOpen OpenAI-compatible settings.
  • hermes: calls hermes config set when available, otherwise writes ~/.hermes/config.yaml and ~/.hermes/.env.