X Intelligence CLI — search, monitor, analyze, and engage on X/Twitter. Single Rust binary, 2.5MB, <5ms startup. AI agent skill.
xint-rs — X Intelligence CLI
Single binary, zero runtime dependencies. 2.5MB that starts in under 5ms.
Search X like a pro. Full-text search, real-time monitoring, follower tracking, AI analysis — all from CLI. Built in Rust for speed.
Why Rust?
| | TypeScript | Rust | |---|---|---| | Startup | ~50ms | <5ms | | Binary | ~60MB | 2.5MB | | Memory | ~40MB | ~5MB | | Deploy | Clone + Bun | Copy one file |
Install
curl -fsSL https://raw.githubusercontent.com/0xNyk/xint-rs/main/install.sh | bash
Optional pinned version:
XINTRSINSTALL_VERSION=<version-tag> \
curl -fsSL https://raw.githubusercontent.com/0xNyk/xint-rs/main/install.sh | bash
Homebrew (lightweight prebuilt binary on Apple Silicon):
brew tap 0xNyk/xint
brew install xint
Or install the explicit Rust formula:
brew install xint-rs
Or build from source:
git clone https://github.com/0xNyk/xint-rs.git
cd xint-rs
cargo build --release
Requires: X API access (prepaid credits)
Quick Reference
| Task | Command | |------|---------| | Search | xint search "AI agents" | | Monitor | xint watch "solana" -i 5m | | Stream | xint stream | | Profile | xint profile @elonmusk | | Thread | xint thread 123456789 | | Followers | xint diff @username | | Bookmarks | xint bookmarks | | Lists | xint lists | | Blocks | xint blocks | | Mutes | xint mutes | | Follow | xint follow @username | | Media | xint media <tweet_id> | | Trends | xint trends | | AI Analyze | xint analyze "best?" | | Report | xint report "crypto" | | Reposts | xint reposts <tweet_id> | | User Search | xint users "AI researcher" | | Article | xint article <url> --ai "summarize" | | Capabilities | xint capabilities --json | | TUI | xint tui |
Shorthands
xint s "query" # search
xint w "query" # watch
xint p @user # profile
xint tr # trends
xint bm # bookmarks
TUI Customization
# Built-in themes: classic | neon | minimal | ocean | amber
XINTTUITHEME=ocean xint tui
Disable animated hero line
XINTTUIHERO=0 xint tui
Disable icons in menu rows
XINTTUIICONS=0 xint tui
Optional theme token file
XINTTUITHEME_FILE=./tui-theme.tokens.example.json xint tui
Setup
cp .env.example .env
Add XBEARERTOKEN=your_token
Optional: xAI
For analyze, report --sentiment, article --ai:
XAIAPIKEY=yourxaikey
Optional: OAuth
For bookmarks, likes, follows, lists, blocks/mutes, follower tracking:
XCLIENTID=yourclientid
xint auth setup
Deployment Modes
Self-hosted (OSS default)
- Run this binary against your own local setup.
- Package API features stay local unless cloud env vars are configured.
- Best for development and private operator workflows.
Hosted cloud control plane (xint-cloud)
- Point package API features to your hosted control plane:
XINTPACKAGEAPIBASEURL=http://localhost:8787/v1 (or your deployed URL)
- XINTPACKAGEAPIKEY=<workspaceapi_key>
- XINTWORKSPACEID=<workspace_id>
- Optional billing upgrade URL for quota/plan errors:
XINTBILLINGUPGRADE_URL=https://your-app/pricing
Notes:
- If
XINTPACKAGEAPIBASEURLis unset, package API MCP tools return a setup error. - Keep
xint-cloudprivate;xintandxint-rsremain public OSS clients.
Agent-Native Capabilities Manifest
xint-rs ships a machine-readable manifest for agent allowlists and runtime tool selection:
# Pretty JSON
xint capabilities
Compact JSON for machine ingestion
xint capabilities --compact
Search
# Quick pulse
xint search "AI agents" --quick
High-engagement
xint search "react 19" --since 1h --sort likes --min-likes 50
Full-archive
xint search "bitcoin ETF" --full --pages 3
With sentiment
xint search "solana" --sentiment
Export
xint search "startups" --csv > data.csv
xint search "AI" --jsonl | jq '.text'
Options
| Flag | Description | |------|-------------| | --sort | likes · impressions · retweets · recent | | --since | 1h · 3h · 12h · 1d · 7d | | --full | Search full archive (back to 2006) | | --sentiment | AI sentiment per tweet | | --quick | Fast mode with caching |
Watch
xint watch "solana" -i 5m
xint watch "@user" -i 1m
xint watch "news" -i 30s --webhook https://example.com/webhook
Webhook safety:
- Remote webhooks must use
https:// http://is accepted only for localhost/loopback targets- Optional host allowlist:
XINTWEBHOOKALLOWED_HOSTS=hooks.example.com,*.internal.example
Ctrl+C — shows session stats.
Stream (Official Filtered Stream)
# List current stream rules
xint stream-rules
Add a filtered-stream rule
xint stream-rules add "from:elonmusk -is:retweet" --tag elon
Connect to stream
xint stream
JSONL output and stop after 25 events
xint stream --jsonl --max-events 25
Follower Tracking
xint diff @user # First run: snapshot
xint diff @user # Second run: changes
xint diff @user --following
Requires OAuth.
Lists (OAuth)
xint lists
xint lists create "AI Researchers" --description "High-signal accounts" --private
xint lists members add <list_id> @username
xint lists members remove <list_id> @username
Blocks & Mutes (OAuth)
xint blocks
xint blocks add @username
xint blocks remove @username
xint mutes xint mutes add @username xint mutes remove @username
Follow Actions (OAuth)
xint follow @username
xint unfollow @username
Media Download
# Download media from a tweet ID
xint media 1900100012345678901
Download media from a tweet URL
xint media https://x.com/user/status/1900100012345678901
Custom output directory + JSON summary
xint media 1900100012345678901 --dir ./downloads --json
Download only first video/gif
xint media 1900100012345678901 --video-only --max-items 1
Download only photos
xint media 1900100012345678901 --photos-only
Custom filename template
xint media 1900100012345678901 --name-template "{username}-{created_at}-{index}"
Reposts
# See who reposted a tweet
xint reposts <tweet_id>
xint reposts <tweet_id> --limit 50 --json
User Search
# Find users by keyword
xint users "AI researcher"
xint users "solana dev" --limit 10 --json
Reports & Analysis
xint report "AI agents" --save
xint analyze "What's trending in crypto?"
xint article "https://..." --ai "Summarize"
From X tweet (auto-extract linked article URL)
xint article "https://x.com/user/status/123" --ai "Summarize"
Default analysis model is now grok-4-1-fast.
xAI Features
X Search (no X API needed)
xint x-search --queries-file queries.json --out-md report.md
Collections (Knowledge Base)
xint collections list
xint collections upload --path file.md
xint collections search --query "topic"
AI Agent Skill
Designed for Claude Code, OpenClaw, and other agents:
# Place binary + SKILL.md in agent skills dir
xint search "topic" --quick --json
xint analyze --pipe "Summarize"
xint report "topic" --save
MCP Server
xint mcp
Cost
| Operation | Cost | |-----------|------| | Tweet read | $0.005/tweet | | Full-archive | $0.01/tweet | | Write | $0.01/action |
xint costs # Today
xint costs week # 7 days
xint costs budget 2 # Set $2/day limit
Environment
| Variable | Required | Description | |----------|----------|-------------| | XBEARERTOKEN | Yes | X API v2 bearer | | XAIAPIKEY | No | xAI for analyze/report | | XINTARTICLETIMEOUT_SEC | No | Article fetch timeout seconds (default 30, range 5-120) | | XCLIENTID | No | OAuth for write ops |
Structure
xint-rs/
├── src/
│ ├── main.rs # Entry
│ ├── cli.rs # Commands
│ ├── client.rs # HTTP + rate limit
│ ├── api/ # X, xAI wrappers
│ └── commands/ # 20+ commands
├── data/ # cache, exports, snapshots
└── SKILL.md # Agent instructions
Build
cargo build --release
Output: target/release/xint (2.5MB)
Release Automation
xint-rs delegates releases to the canonical script in xint.
# from xint-rs/
./scripts/release.sh --dry-run --allow-dirty
forwards all flags to the canonical xint script:
./scripts/release.sh 2026.2.18.4
./scripts/release.sh 2026.2.18.4 --no-clawdhub
./scripts/release.sh 2026.2.18.4 --skillsh
./scripts/release.sh 2026.2.18.4 --no-auto-notes
./scripts/release.sh 2026.2.18.4 --report-dir /tmp/xint-release-reports
If xint is not checked out as a sibling directory, set:
XINTRELEASESCRIPT=/absolute/path/to/xint/scripts/release.sh
Notes behavior is controlled by the canonical script:
- Default: GitHub auto-generated notes (
--generate-notes) - Manual override: set
CHANGELOGADDED,CHANGELOGCHANGED,CHANGELOGFIXED, and/orCHANGELOGSECURITY - Default: publishes to ClawdHub when
clawdhubCLI is installed (disable with--no-clawdhub) - Optional: publish to skills.sh with
--skillsh(or--ai-skillfor both) - Release report:
reports/releases/<version>.mdby default (disable with--no-report) - Report is uploaded to both GitHub releases as an asset by default (disable with
--no-report-asset) - Report is embedded in both GitHub release bodies by default (disable with
--no-report-body)
Security
- Tokens from env — never hardcoded
- OAuth tokens:
chmod 600 - No telemetry, no phone-home
Contributing
Contributions welcome. Read the contribution guidelines first.
❤️ Support the Project
If you find this project useful, consider supporting my open-source work.
Solana donations
2k1oq9U99mwy4gm8P2hXPJoZusoXQCpFs35EEf5Ve73y
License
To the extent possible under law, the authors have waived all copyright and related or neighboring rights to this work.
