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

xapi-to

v0.1.15

Published

Agent-friendly CLI for xapi - discover and call capabilities and APIs

Readme

xapi-to

Agent-friendly command-line interface for xAPI — discover and call capabilities and APIs from your terminal or AI agent.

Installation

# Via npx (no install needed)
npx xapi-to --help

# Or install globally with npm
npm install -g xapi-to

# Or from source
cd xapi-cli && bun install

The published CLI runs on Node.js 18+. Bun is only required for local source development and tests.

Quick Start

# 1. Register a new account (apiKey saved automatically)
xapi-to register

# 1b. Or register with an inviter's referral code (please replace xapito to your referral code)
xapi-to register --referral-code xapito

# 2. Or set an existing key
xapi-to config set apiKey=sk-xxx

# 3. Or via env var
export XAPI_KEY=sk-xxx

# 4. Verify connectivity
xapi-to config health

Usage

xapi-to <command> [args] [flags]

Action Commands

Unified interface for capabilities (built-in) and APIs (third-party). Use --source capability|api to filter.

xapi-to list                                            # list all actions
xapi-to list --source capability                        # only built-in capabilities
xapi-to list --source api --category DeFi               # filter by source and category
xapi-to list --page 2 --page-size 20                    # pagination
xapi-to list --service-id <id>                          # filter by service

xapi-to search "twitter"                                # search by keyword
xapi-to search "token price" --source api               # search APIs only

xapi-to categories                                      # list all categories
xapi-to categories --source capability                  # categories for capabilities only

xapi-to services                                        # list all services
xapi-to services --category Social --page-size 10       # filter and paginate

xapi-to get twitter.tweet_detail                        # get action schema
xapi-to call twitter.tweet_detail --input '{"tweet_id":"1234567890"}'  # execute

OAuth

Bind third-party OAuth accounts (e.g. Twitter) to your API key.

xapi-to oauth bind --provider twitter                   # bind Twitter account
xapi-to oauth status                                    # list current bindings
xapi-to oauth unbind <binding-id>                       # remove a binding
xapi-to oauth providers                                 # list available providers

Account

xapi-to register                                        # create account, saves apiKey automatically
xapi-to register --referral-code xapito                 # register with an inviter's referral code (please replace xapito to your referral code)
xapi-to register xapito                                 # positional shorthand for --referral-code
xapi-to balance                                         # show USD balance
xapi-to topup                                           # generate payment URL
xapi-to topup --method stripe --amount 10               # stripe, $10
xapi-to topup --method x402                             # x402 (USDC on Base)

Config

xapi-to config show                                     # show current config
xapi-to config set apiKey=sk-xxx                        # save API key
xapi-to config health                                   # check backend connectivity

Workflow: Always GET before CALL

Before calling any action, always read its schema first to understand required parameters:

# 1. Find the action
xapi-to search "twitter"

# 2. Read its schema
xapi-to get twitter.tweet_detail

# 3. Call with correct parameters
xapi-to call twitter.tweet_detail --input '{"tweet_id":"1234567890"}'

Output Formats

All output is JSON by default — designed for agent consumption.

xapi-to list --format json                              # default, machine-readable
xapi-to list --format pretty                            # pretty-printed JSON
xapi-to list --format table                             # human-readable table

Environment Variables

| Variable | Description | |---|---| | XAPI_KEY | API key (overrides config file) | | XAPI_ACTION_HOST | Action service host (default: action.xapi.to) | | XAPI_OUTPUT | Default output format (json|pretty|table) |

Config is stored at ~/.xapi/config.json.

Built-in Capabilities

| ID | Description | |---|---| | twitter.tweet_detail | Get tweet details and replies | | twitter.user_by_screen_name | Get user profile by username | | twitter.user_by_screen_names | Batch get user profiles by usernames | | twitter.user_tweets | Get tweets from a user | | twitter.user_media | Get media posts from a user | | twitter.following | Get user following list | | twitter.followers | Get user followers | | twitter.retweeters | Get tweet retweeters | | twitter.search_timeline | Search tweets, users, photos, videos | | ai.text.chat.fast | Fast AI chat completion | | ai.text.chat.reasoning | Advanced reasoning chat | | ai.text.summarize | Summarize long text | | ai.text.rewrite | Rewrite text with different styles | | ai.embedding.generate | Generate vector embeddings | | web.search | Web search | | web.search.realtime | Realtime web search with time filters | | news.search.latest | Latest news search | | crypto.token.price | Crypto token price and changes | | crypto.token.metadata | Crypto token metadata |

Security

  • NEVER send your API key to any domain other than *.xapi.to
  • The key is stored at ~/.xapi/config.json — do not expose this file
  • topup outputs a payment URL containing the API key — do not share publicly

License

MIT