Twitter CLI is a high-performance, open-source command-line tool and agent interface designed for searching and scraping Twitter/X data using Apify's trusted actor infrastructure. Maintained under the SpaceCorps open-source engineering collective, the project provides developers and autonomous AI agents with a single, standalone binary capable of operating seamlessly across macOS, Linux, and Windows without runtime dependencies or managed interpreter overhead.
The original prototype CLI (Twitter.Console) was designed and implemented as a .NET tool by Niels Bosma to deliver YAML-first Twitter search results to LLM agents. While an effective prototype, autonomous agent environments, shell pipelines, and containerized workflows benefit immensely from static Rust binaries that cold-start in 1 to 3 milliseconds without requiring the .NET runtime. In 2026, SpaceCorps engineered a native Rust 2024 port to provide native speed, minimal memory footprint, and hardened multi-account safety.
Twitter CLI adheres to the SpaceCorps architectural tenets: zero runtime bloat, blocking HTTP over ureq without async tokio runtime overhead, deterministic multi-account safety with explicit account scoping, and cryptographic integration with native OS keystores (macOS Keychain, Windows DPAPI, and Linux Secret Service).
Every search and scrape command provides dual-mode output: human-friendly YAML by default for terminal and LLM readability, and structured JSON with --json for jq and programmatic tool calling. Errors are emitted as structured JSON envelopes to stderr with stable exit codes and actionable remediation guidance.