# sferik/x-cli

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/sferik-x-cli).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

5,595 stars · 400 forks · Ruby · MIT

## Links

- GitHub: https://github.com/sferik/x-cli
- Homepage: https://sferik.github.io/t
- awesome-repositories: https://awesome-repositories.com/repository/sferik-x-cli.md

## Description

x-cli is a command-line client for Twitter (X) that lets you post, search, stream and manage accounts from the terminal. It is written in Ruby and built for scripting: results come out as column-aligned text or CSV, and commands return meaningful exit codes, for example when checking whether one account follows another, so they fit into shell pipelines alongside tools such as grep, awk and xargs.

Requests are signed with OAuth 1.0a or 2.0 credentials. Several account profiles can be kept in a single YAML configuration file, and you can list them, switch the active one and remove accounts. The client works against both the v1.1 and v2 API versions and falls back to the other when one is unavailable. It retries temporary errors with increasing delays and sends independent requests concurrently, so operations touching many items finish faster than sequential calls.

Beyond posting and account management, it can hold a persistent connection open to stream sampled or filtered posts live from searches, users, lists and timelines, with an optional cap on events. It can also search up to 3,200 recent posts with regular-expression filtering, and work with lists. Commands are organised as a tree with aliases and options, and completion definitions for Bash, Zsh and fish are included.

## Tags

### Networking & Communication

- [Social Media Command-Line Clients](https://awesome-repositories.com/f/networking-communication/social-media-command-line-clients.md) — Provides a terminal client for posting, searching, streaming and managing Twitter accounts, with exit codes that suit shell scripting.
- [Twitter API Clients](https://awesome-repositories.com/f/networking-communication/twitter-api-clients.md) — Talks to Twitter's v1.1 and v2 APIs from the terminal to post, search, stream and manage accounts, signing requests with OAuth.
- [Live Post Streams](https://awesome-repositories.com/f/networking-communication/live-post-streams.md) — Keeps a persistent connection open to stream sampled or filtered posts live from searches, users, lists and timelines. ([source](https://github.com/sferik/x-cli#readme))
- [Social Post Streaming](https://awesome-repositories.com/f/networking-communication/social-post-streaming.md) — Keeps a continuous connection open to deliver sampled or filtered posts from searches, users, lists and timelines into the terminal, with an optional event cap. ([source](https://github.com/sferik/x-cli/blob/main/CHANGELOG.md))
- [Account Profile Switching](https://awesome-repositories.com/f/networking-communication/communication-platforms-services/messaging-notification-systems/messaging-automation/account-authentication-gateways/account-authentication/google-account-authenticators/account-switching-and-aliasing/account-profile-switching.md) — Stores several account profiles in one file, lists them, switches the active profile and removes accounts no longer needed. ([source](https://github.com/sferik/x-cli#readme))
- [HTTP Event Streams](https://awesome-repositories.com/f/networking-communication/http-event-streams.md) — Holds a long-lived connection open and prints sampled or filtered posts continuously until stopped or a cap is reached.
- [Real-Time Message Streaming](https://awesome-repositories.com/f/networking-communication/real-time-message-streaming.md) — Holds a persistent HTTP connection open to receive sampled or filtered posts live from searches, users, lists and timelines, with an optional event cap.
- [Social Post Searching](https://awesome-repositories.com/f/networking-communication/social-post-searching.md) — Fetches up to 3,200 recent posts through the REST API and filters each against a regular expression, reaching further back than standard search. ([source](https://sferik.github.io/t))

### Content Management & Publishing

- [Social Status Updates](https://awesome-repositories.com/f/content-management-publishing/blog-post-publishing/social-status-updates.md) — Publishes short status updates from the terminal and quotes special characters so the shell leaves the text intact. ([source](https://sferik.github.io/t))

### Development Tools & Productivity

- [Scriptable Command-Line Interfaces](https://awesome-repositories.com/f/development-tools-productivity/scriptable-command-line-interfaces.md) — Produces column-aligned or CSV output and meaningful exit codes so commands slot into shell pipelines with grep, awk and xargs.
- [Parallel Request Executors](https://awesome-repositories.com/f/development-tools-productivity/api-request-executors/parallel-request-executors.md) — Sends independent API requests concurrently so operations touching many items finish much faster than sequential calls. ([source](https://sferik.github.io/t))
- [Command Aliasing](https://awesome-repositories.com/f/development-tools-productivity/cli-command-frameworks/command-aliasing.md) — Organises commands as a tree of subcommands and options, with shorthand aliases for faster use.
- [CLI Pipe Integration](https://awesome-repositories.com/f/development-tools-productivity/cli-pipe-integration.md) — Produces plain text output and meaningful exit codes that flow into grep, cut, awk and xargs inside shell scripts. ([source](https://sferik.github.io/t))

### Business & Productivity Software

- [CSV Data Exports](https://awesome-repositories.com/f/business-productivity-software/csv-data-exports.md) — Converts any command's output to CSV with a flag so results open directly in a spreadsheet. ([source](https://sferik.github.io/t))

### Data & Databases

- [Plain-Text Data Handlers](https://awesome-repositories.com/f/data-databases/plain-text-data-handlers.md) — Emits column-aligned or CSV text and meaningful exit codes so output flows into grep, awk and xargs.

### DevOps & Infrastructure

- [Configuration Profiles](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/file-based-configuration/configuration-profiles.md) — Stores credentials and settings for multiple accounts in one YAML file with an active profile and legacy fallback.

### Security & Cryptography

- [OAuth 1.0 Authenticators](https://awesome-repositories.com/f/security-cryptography/access-authentication/oauth-1-0-authenticators.md) — Signs every API request with OAuth 1.0a or OAuth 2.0 credentials so the tool can act securely on a user's behalf.
- [Multi-Account Profiles](https://awesome-repositories.com/f/security-cryptography/file-based-configuration/local-configuration-files/email-account-configurations/multi-account-profiles.md) — Stores several account profiles in one config file, lists them, switches the active one and removes accounts. ([source](https://github.com/sferik/x-cli/blob/main/README.md))
- [OAuth Authentication](https://awesome-repositories.com/f/security-cryptography/oauth-authentication.md) — Signs API requests with OAuth 1.0a or 2.0 credentials so users can securely act on their account. ([source](https://github.com/sferik/x-cli#readme))
- [Outgoing Request Signing](https://awesome-repositories.com/f/security-cryptography/signature-verification-tools/outgoing-request-signing.md) — Signs every outgoing API call with OAuth 1.0a or 2.0 credentials so the tool acts on a user's behalf.

### User Interface & Experience

- [Terminal Output Formatting](https://awesome-repositories.com/f/user-interface-experience/terminal-output-formatting.md) — Formats results as column-aligned text so terminal output stays readable and works well with other command-line tools. ([source](https://github.com/sferik/x-cli/blob/main/README.md))

### Web Development

- [API Versioning](https://awesome-repositories.com/f/web-development/api-versioning.md) — Calls both v1.1 and v2 API versions and falls back between them so commands keep working. ([source](https://github.com/sferik/x-cli/blob/main/README.md))
- [Fallback API Routers](https://awesome-repositories.com/f/web-development/public-api-exposure/fallback-api-routers.md) — Routes requests to the older or newer API endpoint and switches automatically when one is unavailable.
