xcom-rs
xcom-rs is an experimental, agent-friendly CLI for X.com-style operations.
The project is designed around predictable, machine-readable responses (JSON/YAML/NDJSON) while still supporting a human-readable text mode.
Features
- Output envelope with consistent
ok/error/metafields - Output formats:
text,json,yaml,ndjson - Introspection helpers:
commands,schema,help - Tweet operations:
tweets create,tweets list,tweets like,tweets unlike,tweets retweet,tweets reply,tweets thread,tweets show,tweets conversation - Search:
search recent,search users - Timeline:
timeline home,timeline mentions,timeline user - Media:
media upload - Bookmarks:
bookmarks add,bookmarks remove,bookmarks list - Auth and billing helpers (local state):
auth status,auth import,auth export - Diagnostics:
doctor(with optional--probefor API connectivity check) - Embedded skill installer for agent toolchains (
install-skills)
Install
Prerequisites
- Rust (1.70+)
From crates.io
Homebrew
This repository includes a Homebrew formula at Formula/xcom_rs.rb.
To install via a tap (recommended for now):
Notes:
- The formula name is
xcom_rs, but the installed binary isxcom-rs. - If you don't have a tap yet, copy
Formula/xcom_rs.rbinto your tap repo underFormula/.
From Source
For development setup and Makefile workflows, see CONTRIBUTING.md.
Quick Start
# 1. Install
# 2. Authenticate — import a base64-encoded bearer token
# 3. Verify setup with doctor
# 4. Create your first tweet
# 5. Browse your home timeline
Usage
Global Flags
--output {text|json|yaml|ndjson}--log-format {text|json}--trace-id <id>--non-interactive--dry-run--max-cost-credits <n>--budget-daily-credits <n>
Authentication
xcom-rs currently supports importing/exporting a bearer token for local use. OAuth login flows are
not implemented yet.
Check current auth status:
Import credentials (expects a base64-encoded JSON token):
XCOM_AUTH_DATA=""
By default, credentials are stored at $XDG_DATA_HOME/xcom-rs/auth.json or
~/.local/share/xcom-rs/auth.json.
Security note: the export/import payload is base64 (not encrypted). Treat it like a secret.
Examples
List agent-facing command metadata:
Get a JSON schema for a command response envelope:
Create a tweet (demo):
List tweets (demo):
Install embedded skills:
Shell Completions
xcom-rs can generate shell completion scripts for Bash, Zsh, and Fish.
Bash
# Generate and source immediately
# Or persist to a file (reload your shell afterwards)
Zsh
# Generate and source immediately
# Or add to your fpath (e.g. ~/.zsh/completions/)
# Ensure the directory is in your fpath (add to ~/.zshrc if not already present)
fpath=(/.zsh/completions )
&&
Fish
xcom-rs completion --shell fish | source
# Or persist to the completions directory
xcom-rs completion --shell fish > ~/.config/fish/completions/xcom-rs.fish
Contributing
For developer setup, workflows, and repository layout, see CONTRIBUTING.md.
Docs
- CLI examples: docs/examples.md
- Implementation notes:
docs/implementation/ - Validation reports:
docs/validation/
License
MIT