Skip to content

IndieHub25/x-cli

x-cli: The Cross-Platform Terminal X/Twitter Client

x-cli is a professional-grade command-line interface for X (formerly Twitter). It provides a rich, interactive experience directly in your terminal, with support for two distinct flavors:

  1. TypeScript Client (Primary): A modern, reactive TUI built with React and Ink. Best for users who want a rich UI with high-fidelity media rendering.
  2. Python Client (Secondary): A lightweight, low-resource client built with Curses. Ideal for minimal environments or older hardware.

Features

  • Cross-Platform: Runs on macOS, Linux, and Windows.
  • Rich TUI: Pane-based navigation, scrollable timelines, and interactive compose.
  • Media Support: View images inline using Sixel, iTerm2, Kitty, or ASCII fallback protocols.
  • Auth: Secure OAuth 2.0 Device Code flow. No hardcoded passwords.
  • Configurable: Extensive configuration via ~/.x-cli/config.yaml.
  • Resilient: Offline read mode, queued tweets, and robust rate-limit handling.

Installation

Node.js (Primary Client)

npm install -g @xcli/cli

Python (Lightweight Client)

pip install x-cli

Homebrew (macOS/Linux)

brew tap xcli/tap
brew install x-cli

Usage

Authentication

First, log in to your account:

x-cli auth login

Follow the on-screen instructions to authorize the device.

Basic Commands

  • View Home Feed: x-cli feed
  • Compose a Tweet: x-cli compose
  • Search: x-cli search "keywords" --media
  • Notifications: x-cli notify
  • Configuration: x-cli config edit

Keybindings (TUI)

  • j / k: Scroll down/up
  • Enter: View details
  • r: Reply
  • l: Like
  • t: Retweet
  • q: Quote
  • c: Compose new tweet
  • ?: Show help

Configuration

The configuration file is located at ~/.x-cli/config.yaml.

theme: "default"
media:
  autoplay: false
  protocol: "auto" # options: kitty, iterm2, sixel, ascii, braille
network:
  backoffBaseMs: 1000
privacy:
  redactHandles: false

Contributing

See CONTRIBUTING.md for details on how to build and contribute.

License

MIT License. See LICENSE.

Disclaimer

This is an unofficial client. Use at your own risk. Comply with X/Twitter Terms of Service.

About

x(Twitter) on CLI

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •