Available for macOS, Linux & Windows

shell Twitter/X from your terminal

No API keys required. Log in with your browser cookies and control Twitter/X from the command line.

40+
Commands
50+
MCP Tools
~50ms
Startup
xsh — zsh
scroll
0+
CLI Commands
0+
MCP Tools
0x
Faster
0x
Throughput
Features

Everything You Need

A complete toolkit for Twitter/X automation with 40+ commands covering all major features.

Lightning Fast

20x faster startup than Python. ~50ms cold start. Built for speed with Go.

$ xsh feed

AI-Ready

52 MCP tools for seamless AI agent integration. Full Model Context Protocol support.

$ xsh mcp

Media Support

Upload up to 4 images per tweet. Download media with a single command.

$ xsh tweet post --image

Advanced Search

Search tweets with filters for Top, Latest, Photos, and Videos.

$ xsh search

User Profiles

View profiles, tweets, likes, followers, and following lists.

$ xsh user

List Management

Create, manage, and browse Twitter lists with full CRUD operations.

$ xsh lists

Direct Messages

Send and manage DMs directly from your terminal.

$ xsh dm

Scheduled Tweets

Schedule tweets for future posting with Unix timestamps.

$ xsh schedule

Job Search

Search job listings on X/Twitter with location and remote filters.

$ xsh jobs

Batch Operations

Fetch multiple tweets or users in a single command. Perfect for data processing.

$ xsh tweets id1 id2 id3

AI-Optimized Output

Compact mode with essential fields only. Perfect for AI agents and scripting.

$ xsh feed --compact

JSON/YAML Output

Structured output formats for scripting and automation. Perfect for pipes and CI/CD pipelines.

$ xsh feed --json
MCP Server

AI Agent Integration

Full Model Context Protocol implementation with 50 tools for seamless AI agent connectivity.

// mcp_server

What is MCP?

Model Context Protocol is an open protocol that standardizes how AI agents connect to external tools. xsh implements a full MCP server with 50 built-in tools.

// quick_start
$ xsh mcp # start
$ configure agent # connect
50 tools ready
available_tools
read: 10 write: 8 admin: 6
read
get_feed
read
search
read
get_tweet
read
get_user
read
get_tweets_batch
read
get_user_tweets
read
get_followers
read
get_following
read
list_bookmarks
read
get_trending
write
post_tweet
write
delete_tweet
write
like
write
unlike
write
retweet
write
follow
write
dm_send
write
bookmark
admin
create_list
admin
delete_list
admin
schedule_tweet
admin
add_list_member
admin
search_jobs
admin
download_media
read
get_feed
read
search
read
get_tweet
read
get_user
read
get_tweets_batch
read
get_user_tweets
read
get_followers
read
get_following
read
list_bookmarks
read
get_trending
write
post_tweet
write
delete_tweet
write
like
write
unlike
write
retweet
write
follow
write
dm_send
write
bookmark
admin
create_list
admin
delete_list
admin
schedule_tweet
admin
add_list_member
admin
search_jobs
admin
download_media
Technical

Built for Performance

Advanced security and resilience features that keep xsh running smoothly.

Security

TLS Fingerprinting

Chrome impersonation using uTLS to bypass bot detection and mimic real browser behavior.

Resilience

Dynamic Endpoints

Automatic GraphQL endpoint discovery from X.com JavaScript. Self-healing configuration that adapts to API changes.

Crypto

Transaction Security

HMAC-SHA256 transaction ID generation for secure write operations and replay protection.

LLM Context

AI Skill Integration

xsh provides a complete skill definition for AI agents. 52 MCP tools, structured JSON schemas, and semantic understanding.

SKILL.md
loaded
# Authentication
xsh auth login # Browser extraction
xsh auth import cookies.json
# Timeline Operations
xsh feed --json
xsh search "query" --type Latest
# Tweet Actions
xsh tweet post "text"
xsh tweet like <id>
xsh tweet retweet <id>
# MCP Server (52 tools)
get_feed, search, post_tweet
get_user, follow, like
+ 46 more tools...
# User Operations
xsh user <handle> --json
xsh follow <handle>
xsh unfollow <handle>
# Bookmarks
xsh bookmarks --count 50
# Lists
xsh lists --json
xsh lists create "My List"
# Jobs
xsh jobs search "engineer"
# Scheduled Tweets
xsh schedule "text" --at "2026-01-01"
# Direct Messages
xsh dm inbox --json
xsh dm send <handle> "message"
# Configuration
~/.config/xsh/config.toml
default_count = 20
timeout = 30
# JSON Schema
{{
id: "string",
text: "string",
engagement: {{
likes: 0,
retweets: 0
}}
}}
# Authentication
xsh auth login # Browser extraction
xsh auth import cookies.json
# Timeline Operations
xsh feed --json
xsh search "query" --type Latest
# Tweet Actions
xsh tweet post "text"
xsh tweet like <id>
xsh tweet retweet <id>
# MCP Server (52 tools)
get_feed, search, post_tweet
get_user, follow, like
+ 46 more tools...
# User Operations
xsh user <handle> --json
xsh follow <handle>
xsh unfollow <handle>
# Bookmarks
xsh bookmarks --count 50
# Lists
xsh lists --json
xsh lists create "My List"
# Jobs
xsh jobs search "engineer"
# JSON Schema
{{
id: "string",
text: "string",
engagement: {{
likes: 0,
retweets: 0
}}
}}
# Scheduled Tweets
xsh schedule "text" --at "2026-01-01"
# Direct Messages
xsh dm inbox --json
xsh dm send <handle> "message"
# Configuration
~/.config/xsh/config.toml
default_count = 20
timeout = 30

Structured Output

JSON, YAML, and Compact modes. Perfect for piping and programmatic use.

xsh feed --json | jq '.[].text'

Semantic Understanding

Rich data models: Tweets, Users, Lists, Jobs with full engagement metrics.

• Tweet objects
• User profiles
• Engagement data
• Media attachments
Download SKILL.md
Installation

Get Started

Multiple ways to install xsh. Choose the one that works best for your system.

go install
go install github.com/benoitpetit/xsh@latest Requires Go 1.25+ ↗
install script (Linux/macOS)
curl -sSL https://raw.githubusercontent.com/benoitpetit/xsh/main/core/scripts/install.sh | bash Auto-detect platform and install binary
powershell (Windows)
iwr -useb https://raw.githubusercontent.com/benoitpetit/xsh/main/core/scripts/install.ps1 | iex Run in PowerShell as Administrator
from source
git clone https://github.com/benoitpetit/xsh && cd xsh/core && go build -o xsh . Any platform with Go
quick_start
1
$ xsh auth login

Authenticate with your browser cookies

2
$ xsh feed

View your timeline

3
$ xsh tweet post "Hello!"

Post your first tweet