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

xeet

v0.1.0

Published

X Platform CLI for AI Agents

Downloads

10

Readme

xeet — X (Twitter) in your terminal.

Fast, agent-friendly CLI for the X platform. JSON-first output, OAuth 2.0 PKCE auth, and zero runtime dependencies beyond Node.js.

Features

  • Post — create, reply, quote, thread, delete
  • Read — get any post by ID with full metadata
  • Timeline — home feed or any user's posts
  • Search — recent posts with sort control
  • Interact — like, repost, bookmark (OAuth 2.0 exclusive)
  • Users — profile lookup, followers, following
  • Mentions — posts mentioning the authenticated user
  • Dual auth — OAuth 2.0 PKCE (recommended) with OAuth 1.0a fallback
  • Auto token refresh — authenticate once, use indefinitely
  • Agent-first — structured JSON on stdout, errors on stderr, meaningful exit codes

Installation

From source

git clone https://github.com/wangwalk/xeet.git
cd xeet
npm install
npm run build

Run:

node bin/xeet.js --help

Or link globally:

npm link
xeet --help

Quick Start

1. Get OAuth 2.0 Credentials

  1. Go to X Developer Portal
  2. Create or open your App
  3. In User authentication settings, enable OAuth 2.0
  4. Type: Native App (public client, no secret needed)
  5. Callback URL: http://127.0.0.1:8477/callback
  6. Copy your Client ID

2. Authenticate

xeet auth login --client-id <your-client-id>

This opens a browser for authorization. After approving, tokens are saved to ~/.config/xeet/credentials.json.

3. Verify

xeet auth status

4. Use

xeet post "Hello from xeet"
xeet user @XDevelopers
xeet bookmark <tweet-id>

Authentication

OAuth 2.0 PKCE (recommended)

xeet auth login --client-id <id> [--client-secret <secret>] [--port 8477]

Tokens auto-refresh via offline.access scope. Supports all endpoints including OAuth 2.0 exclusive features like Bookmarks.

OAuth 1.0a (legacy)

xeet auth setup

Interactive prompt for API Key, API Secret, Access Token, and Access Token Secret.

Environment Variables

For CI/agent environments, set credentials via env vars:

# OAuth 2.0
export XEET_ACCESS_TOKEN=<token>
export XEET_REFRESH_TOKEN=<refresh-token>    # optional
export XEET_CLIENT_ID=<client-id>            # optional

# OAuth 1.0a (all four required)
export XEET_API_KEY=<key>
export XEET_API_SECRET=<secret>
export XEET_ACCESS_TOKEN=<token>
export XEET_ACCESS_TOKEN_SECRET=<token-secret>

Detection priority: OAuth 1.0a (all four keys present) > OAuth 2.0 (access token only) > config file.

Auth Status

xeet auth status

Shows auth type, credential source, user info, and for OAuth 2.0: token expiry and granted scopes.

Commands

Posts

xeet post "Hello world"                  # Create a post
xeet reply <id> "Nice post!"             # Reply to a post
xeet quote <id> "Check this out"         # Quote a post
xeet thread "First" "Second" "Third"     # Post a thread
xeet delete <id>                         # Delete a post
xeet read <id>                           # Get a post by ID

Timeline

xeet timeline                            # Home timeline
xeet timeline @username                  # User's posts
xeet timeline --limit 50                 # Control result count
xeet timeline --since 2h                 # Filter by time (2h, 30m, 1d, ISO date)

Search

xeet search "query"                      # Search recent posts
xeet search "from:user" --limit 10       # With limit
xeet search "query" --sort relevancy     # Sort by relevancy (default: recency)

Interactions

xeet like <id>                           # Like a post
xeet repost <id>                         # Repost (retweet)
xeet bookmark <id>                       # Bookmark (OAuth 2.0 only)

Users

xeet user @username                      # Get user profile
xeet followers @username --limit 50      # Get followers
xeet following @username --limit 50      # Get following

Mentions

xeet mentions                            # Recent mentions
xeet mentions --limit 10 --since 1d     # With filters

Output Format

All output is structured JSON on stdout. Errors go to stderr.

Success

{
  "ok": true,
  "data": {
    "id": "123456",
    "text": "Hello world"
  }
}

Error

{
  "ok": false,
  "error": {
    "code": "AUTH_MISSING",
    "message": "No credentials found."
  }
}

Exit Codes

| Code | Meaning | |------|---------| | 0 | Success | | 1 | General error | | 2 | Auth error | | 3 | Rate limited | | 4 | Invalid arguments |

Pretty Print

xeet --pretty user @XDevelopers          # Human-friendly indented JSON

Piping

xeet timeline @user --limit 10 | jq '.data.posts[].text'

Development

git clone https://github.com/wangwalk/xeet.git
cd xeet
npm install

npm run build          # Build with tsup
npm run typecheck      # Type check without emitting
npm run dev            # Watch mode

Stack

  • TypeScript + tsup (ESM, Node 18+)
  • Commander.js for CLI parsing
  • @xdevplatform/xdk for X API client
  • Zero runtime dependencies beyond the above

License

MIT