A CLI harness for managing New API instances — the AI API gateway that aggregates 40+ upstream providers behind a unified API.
Built with the cli-anything methodology.
| Path | Description |
|---|---|
cli_anything/new_api/ |
Python CLI tool (Click-based) with --json output |
skills/new-api-manager/ |
Claude Code skill for agent-driven management |
skills/new-api-manager.skill |
Packaged skill (ready to install) |
AGENT_PROMPT.md |
System prompt for teaching agents to use the CLI |
pip install -e .# Environment variables (recommended for agents)
export NEW_API_BASE_URL="https://your-server.com"
export NEW_API_TOKEN="sk-your-admin-token"
# Or interactive
cli-anything-new-api auth set-url https://your-server.com
cli-anything-new-api auth set-token sk-your-admin-token# System health
cli-anything-new-api --json system status
# List channels (provider integrations)
cli-anything-new-api --json channel list --status enabled
# Create a channel
cli-anything-new-api --json channel create \
--name "GPT-4o" --type 1 --key "sk-xxx" --models "gpt-4o,gpt-4o-mini"
# Test connectivity
cli-anything-new-api --json channel test 1
# List API tokens
cli-anything-new-api --json token list
# Model pricing
cli-anything-new-api --json model pricingAll commands support --json for machine-readable output.
# From the packaged file
claude skill install skills/new-api-manager.skill
# Or point Claude Code at the skill directory
claude skill install skills/new-api-manager/Once installed, Claude Code will automatically manage your New API instance when you ask about channels, tokens, models, or system settings.
| Group | Description |
|---|---|
auth |
Login, logout, set URL/token |
channel |
Provider integrations (CRUD, test, balance) |
token |
API key management |
user |
User administration |
model |
Model registry, pricing, sync |
log |
Request logs and statistics |
system |
Health check |
performance |
Runtime metrics, GC |
option |
System settings |
group |
User groups |
redemption |
Redemption codes |
subscription |
Subscription plans |
deployment |
Model deployments |
vendor |
Vendor metadata |
data |
Quota dashboard |
| ID | Provider |
|---|---|
| 1 | OpenAI |
| 3 | Azure OpenAI |
| 14 | Anthropic (Claude) |
| 24 | Google Gemini |
| 33 | AWS Bedrock |
| 40 | SiliconFlow |
| 43 | DeepSeek |
| 48 | xAI (Grok) |
See skills/new-api-manager/references/channel-types.md for the full list of 29 provider types.
pip install pytest
python -m pytest cli_anything/new_api/tests/ -v49 tests covering core modules, CLI commands, and realistic workflows. See cli_anything/new_api/tests/TEST.md for details.
MIT