+
Skip to content

maraoz/y

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

x.py

A minimal X (Twitter) API v2 CLI tool. Vibe-coded with Claude.

Install

pip install requests requests-oauthlib

Setup

Create a config.py file with your X API credentials:

X_API_KEY = "your_api_key_here"
X_API_SECRET = "your_api_secret_here"
X_ACCESS_TOKEN = "your_access_token_here"
X_ACCESS_TOKEN_SECRET = "your_access_token_secret_here"

Get credentials from the X Developer Portal.

Usage

Interactive menu (recommended):

./x.py

Navigate with arrow keys, press Enter to select.

Direct commands:

./x.py post                         # Post a tweet (prompts for text in TUI)
./x.py post "Hello world"           # Post a tweet directly
./x.py mentions                     # List mentions
./x.py interact                     # Reply to mentions
./x.py thread                       # Build threads
./x.py timeline                     # View timeline
./x.py engagement                   # View engagement metrics

How it works

All commands use TUI with arrow key navigation:

  • mentions: Browse mentions, press ENTER for details (tracks unread)
  • interact: Browse mentions and reply to them
  • thread: Browse your tweets and build threads
  • timeline: Browse tweets from people you follow
  • engagement: Browse your tweets with engagement metrics
  • post: Publish tweets (with optional reply threading)

Navigation:

  • ↑/↓ - Navigate list
  • ENTER - View details (mentions/timeline/engagement) or compose reply (interact/thread)
  • ESC - Back to list (from detail view)
  • q - Quit

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载