xmaster

作者 199-biotechnologies已验证

X/Twitter CLI for developers and AI agents — post, reply, search, DM, schedule, analyze. Single Rust binary.

109
Stars
0
Forks
Rust
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/199-biotechnologies/xmaster

快速入门

使用 xmaster 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

XMaster

The X/Twitter CLI for developers and AI agents


Star this repo    Follow @longevityboris


Crates.io License: MIT Homebrew Built with Rust


Post, reply, like, retweet, DM, search, schedule, and analyze -- all from your terminal. XMaster is a single Rust binary that wraps the X API v2, xAI/Grok search, and a web session fallback into one tool. It outputs structured JSON for AI agents and readable tables for humans.

Install | How It Works | Commands | Contributing

Why This Exists

I wanted my AI agents to handle X for me. Find posts in my niche, draft replies in my voice, track what works. Not for spamming -- just a less tedious way to stay engaged when I'd rather be building things.

Most X tools make you pick between the official API and scraping. XMaster gives you both, plus the parts nobody else builds: pre-flight post analysis, engagement scoring, reply bypass, local scheduling, and a bookmarks archive that survives tweet deletions.

Install

One-liner (macOS / Linux):

curl -fsSL https://raw.githubusercontent.com/paperfoot/xmaster-cli/main/install.sh | sh

Homebrew:

brew tap paperfoot/tap
brew install xmaster

Cargo (crates.io):

cargo install xmaster

From source:

cargo install --git https://github.com/paperfoot/xmaster-cli

Quick Start

# 1. Get your X API keys from https://developer.x.com

# 2. Configure credentials
xmaster config set keys.api_key YOUR_API_KEY
xmaster config set keys.api_secret YOUR_API_SECRET
xmaster config set keys.access_token YOUR_ACCESS_TOKEN
xmaster config set keys.access_token_secret YOUR_ACCESS_TOKEN_SECRET

# 3. Verify setup
xmaster config check

# 4. Post
xmaster post "Hello from xmaster"

Optional extras:

xmaster config set keys.xai YOUR_XAI_KEY          # AI-powered search via xAI/Grok
xmaster config web-login                           # Enable reply bypass (auto-captures browser cookies)
xmaster config set style.voice "your style here"   # Agents write in your voice
xmaster config set account.premium true            # 25k char limit instead of 280

How It Works

XMaster has three backends behind one CLI:

BackendAuthUsed for
X API v2OAuth 1.0aPosting, retweets, DMs, search, timelines, Articles
xAI / GrokBearer tokenAI-powered semantic search, trending topics
Web GraphQLBrowser cookiesFallback for replies and quote posts the API restricts

X removed Likes, Follows, and Quote-post writes from all self-serve API tiers on April 20, 2026. like/follow return a clear error on non-Enterprise keys; quote posts fall back to the web session automatically.

Every command returns JSON when piped (or with --json); list commands also support --csv for spreadsheet-ready output. Exit codes are semantic: 0 success, 1 runtime error, 2 config/billing error, 3 auth missing, 4 rate limited. Your agent always knows what happened.

┌─────────────────────────────────────────────┐
│                 CLI Layer                    │
│   clap + comfy-table (--json / human)       │
├─────────────────────────────────────────────┤
│          Command Router + Pre-flight        │
│   Analyze, score, cannibalization guard     │
├──────────┬──────────────┬───────────────────┤
│ X API v2 │  xAI / Grok  │  Web GraphQL      │
│(OAuth1.0a│(Bearer token)│  (Cookie auth +   │
│ Post,Like│ AI search,   │   transaction ID) │
│ RT, DM,  │ Trending,    │  Reply fallback   │
│ Search,  │ Semantic     │  when API blocks  │
│ Timeline)│ search       │  replies          │
├──────────┴──────────────┴───────────────────┤
│  Rate Limiter │ Intel Store │ Scheduler     │
│  (header-based)│  (SQLite)  │  (launchd)    │
├─────────────────────────────────────────────┤
│             Config (figment)                │
│   TOML + env vars + browser cookies         │
└─────────────────────────────────────────────┘

Commands

Posting and Engagement

CommandWhat it doesExample
postPost text, media, replies, quotes, pollsxmaster post "Hello world"
replyReply to a post (auto-bypasses API restrictions)xmaster reply 1234567890 "Great point"
threadPost a multi-tweet threadxmaster thread "First" "Second" "Third"
article previewGenerate an X Articles-style HTML preview from Markdownxmaster article preview draft.md --header-image cover.png -o preview.html
article draftSave a native X Article draft without publishingxmaster article draft draft.md --header-image cover.png
article publishPublish a draft Article via the official API (makes it public)xmaster article publish 1234567890
deleteDelete a postxmaster delete 1234567890
likeLike a tweet (ID or URL) — removed from self-serve API tiers Apr 2026xmaster like 1234567890
unlikeUnlike a tweet — removed from self-serve API tiers Apr 2026xmaster unlike 1234567890
retweetRetweet a tweetxmaster retweet 1234567890
unretweetUndo a retweetxmaster unretweet 1234567890
bookmarkBookmark a tweetxmaster bookmark 1234567890
unbookmarkRemove a bookmarkxmaster unbookmark 1234567890

Post options:

xmaster post "Great point!" --reply-to 1234567890      # Reply
xmaster post "This is big" --quote 1234567890           # Quote tweet
xmaster post "Check this" --media photo.jpg             # Attach media (up to 4)
xmaster post "Best language?" --poll "Rust,Go,Python"   # Create a poll
xmaster like https://x.com/user/status/1234567890       # URLs work too

article preview and article draft are for X Articles, not long posts / Note Tweets. Drafts use Markdown and map to the native Article surface: # title, ##/### headings, **bold**, *italic*, ~~strikethrough~~, indentation/quotes, numbered/bulleted lists, links, images, video/GIF directives, and embedded X posts. Use ::video[Caption](https://github.com/199-biotechnologies/xmaster/blob/main/clip.mp4), ::gif[Caption](https://github.com/199-biotechnologies/xmaster/blob/main/loop.gif), ::post(https://x.com/user/status/123), or ::article(https://x.com/i/article/123) for media and embeds that Markdown does not model directly. Native draft creation uses X's private web Article entity endpoint (ArticleEntityDraftCreate) with browser cookies from xmaster config web-login; it saves a draft and does not publish. Add --api to create the draft through the official X API v2 Articles endpoint instead (added June 2026 — plain OAuth keys, no cookies; cover images stay in the body). xmaster article publish <article_id> then publishes it via the official endpoint and returns the created post ID.

Reading and Discovery

CommandWhat it doesExample
readFull post lookup (text, author, metrics, media)xmaster read 1234567890
repliesGet replies on a postxmaster replies 1234567890 -c 30
metricsDetailed engagement metricsxmaster metrics 1234567890
timelineHome or user timelinexmaster timeline --user elonmusk --since 24h
mentionsYour mentionsxmaster mentions -c 20
userUser profile infoxmaster user elonmusk
meYour own profilexmaster me

Search

CommandWhat it doesExample
searchX API v2 search (structured, filterable; supports min_likes:/min_replies:/min_reposts: operators)xmaster search "rust lang min_likes:100"
search-aiAI-powered search via xAI/Grokxmaster search-ai "latest AI news"
trendingTrending topics by regionxmaster trending --region US

Social Graph

CommandWhat it doesExample
followFollow a user — removed from self-serve API tiers Apr 2026xmaster follow elonmusk
unfollowUnfollow a user — removed from self-serve API tiers Apr 2026xmaster unfollow elonmusk
followersList followersxmaster followers elonmusk -c 50
followingList who a user followsxmaster following elonmusk -c 50

Direct Messages

CommandWhat it doesExample
dm sendSend a DMxmaster dm send alice "Hey!"
dm inboxView DM inboxxmaster dm inbox -c 20
dm threadView a DM conversationxmaster dm thread CONV_ID

Scheduling

CommandWhat it doesExample
schedule addSchedule a post for laterxmaster schedule add "text" --at "2026-03-24 09:00"
schedule add --at autoAuto-pick best posting timexmaster schedule add "text" --at auto
schedule listList scheduled postsxmaster schedule list --status pending
schedule cancelCancel a scheduled postxmaster schedule cancel sched_abc123
schedule fireExecute due posts (for cron)xmaster schedule fire
schedule setupInstall launchd auto-schedulerxmaster schedule setup

Posts are stored in local SQLite. No X Ads API needed. The launchd daemon fires every 5 minutes on macOS. Use --at auto to pick the best time from your engagement history.

Bookmark Intelligence

CommandWhat it doesExample
bookmarks listList recent bookmarksxmaster bookmarks list -c 20
bookmarks syncArchive bookmarks locally (survives deletions)xmaster bookmarks sync -c 200
bookmarks searchSearch your archivexmaster bookmarks search "longevity"
bookmarks exportExport as markdownxmaster bookmarks export -o bookmarks.md
bookmarks digestWeekly summaryxmaster bookmarks digest -d 7

bookmarks sync archives content in SQLite. If the original tweet gets deleted, your copy survives.

Engagement Intelligence

CommandWhat it doesExample
engage inboxAudit replies, quote tweets, and comments under quote tweets for a postxmaster engage inbox 123 --json
engage recommendFind high-ROI reply targetsxmaster engage recommend --topic "AI" -c 10
engage feedFresh posts from large accountsxmaster engage feed "AI agents" --min-followers 5000
engage watchlist addTrack accounts without followingxmaster engage watchlist add elonmusk
engage watchlist listList watched accountsxmaster engage watchlist list

engage inbox is the post-launch check: it pulls root replies, quote tweets, and replies under those quote tweets, then ranks likely reply-back opportunities as a reciprocity heuristic.

The opportunity scorer ranks targets by reciprocity, reply ROI, size fit (adaptive to your follower count), topicality, and freshness.

Pre-Flight Analysis

CommandWhat it doesExample
analyzeScore a post before publishingxmaster analyze "your text" --goal replies
suggest best-timeBest posting time from historyxmaster suggest best-time
suggest next-postCannibalization guardxmaster suggest next-post
report dailyDaily performance digestxmaster report daily
report weeklyWeekly performance digestxmaster report weekly
track runSnapshot recent post metricsxmaster track run
track followersTrack follower changesxmaster track followers
track growthFollower growth historyxmaster track growth -d 30
inspireBrowse your discovered posts libraryxmaster inspire --topic "longevity"
inspire --longSurface long-form / Article-candidate exemplars (>=500 chars)xmaster inspire --long --topic "biotech"

analyze estimates 9 proxy signals aligned with the 2026 X algorithm and scores per goal (replies, quotes, shares, follows, impressions). For drafts above 500 chars it also runs long-form heuristics (preview-card hook on the first 280 chars, scannability, payoff density, dwell sweet-spot 500–2000 chars) — informed by the Jan 2026 $1M Article Contest results. Run xmaster agent-info for the full long-form pattern set including timing, structure, and a nanaban pointer for cover-image generation.

Lists

CommandWhat it doesExample
lists createCreate a listxmaster lists create "AI Builders"
lists addAdd user to a listxmaster lists add LIST_ID username
lists timelineView a list timelinexmaster lists timeline LIST_ID
lists mineView your listsxmaster lists mine

Moderation

CommandWhat it doesExample
block / unblockBlock or unblock a userxmaster block spammer123
mute / unmuteMute or unmute a userxmaster mute username
hide-reply / unhide-replyHide replies on your postsxmaster hide-reply 1234567890

System

CommandWhat it doesExample
config showView config (keys masked)xmaster config show
config checkValidate credentialsxmaster config check
config web-loginCapture browser cookies for reply bypassxmaster config web-login
agent-infoMachine-readable capabilities for AI agentsxmaster agent-info --json
rate-limitsCheck API quota statusxmaster rate-limits
updateSelf-update from GitHub releasesxmaster update

For AI Agents

XMaster is built for AI agents from day one. Every command supports --json and returns structured envelopes with semantic exit codes.

# JSON output (auto-enabled when piped)
xmaster --json post "Hello from my agent"
xmaster post "Hello" | jq '.data.id'

Response envelope:

{
  "version": "1",
  "status": "success",
  "data": { "..." },
  "metadata": {
    "elapsed_ms": 342,
    "provider": "x_api"
  }
}

Exit codes: 0 = success, 1 = runtime error, 2 = config error, 3 = auth missing, 4 = rate limited.

Agent discovery:

xmaster agent-info --json
# Returns: 64 commands, 18 capabilities, 15 algorithm weights,
# measurement coverage, workflow handoffs, writing style config

Pre-flight analysis:

xmaster analyze "your tweet" --goal replies --json
# Returns per-signal scores and per-goal scores (0-100)

Works with: Claude Code, OpenClaw, or any agent that can shell out and parse JSON.

Configuration

Config lives at ~/.config/xmaster/config.toml on all platforms. Override with XMASTER_CONFIG_DIR.

xmaster config show       # View current config (keys masked)
xmaster config check      # Validate credentials
xmaster config set K V    # Set a value
xmaster config get K      # Read a value

Environment variables override the config file. Use XMASTER_ prefix with double underscore for nesting:

export XMASTER_KEYS__API_KEY=your-api-key
export XMASTER_KEYS__API_SECRET=your-api-secret
export XMASTER_KEYS__ACCESS_TOKEN=your-access-token
export XMASTER_KEYS__ACCESS_TOKEN_SECRET=your-access-token-secret
export XMASTER_KEYS__XAI=your-xai-key

Building from Source

git clone https://github.com/paperfoot/xmaster-cli
cd xmaster
cargo build --release
# Binary at target/release/xmaster

Contributing

Contributions are welcome. See CONTRIBUTING.md for guidelines.

License

MIT


Built by Boris Djordjevic at 199 Biotechnologies | Paperfoot AI


If this is useful to you:

Star this repo    Follow @longevityboris

常见问题

What is xmaster?

xmaster is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by 199-biotechnologies. X/Twitter CLI for developers and AI agents — post, reply, search, DM, schedule, analyze. Single Rust binary. It has 109 GitHub stars.

Is xmaster safe to use?

Yes. xmaster passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install xmaster?

Clone the repository with "git clone https://github.com/199-biotechnologies/xmaster" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is xmaster written in?

xmaster is primarily written in Rust. It is open-source under 199-biotechnologies on GitHub, so you can review or fork the full source.

Are there alternatives to xmaster?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh xmaster against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情