https://github.com/rmedranollamas/x.git
This is a command-line tool to manage your X (formerly Twitter) account using a collection of specialized agents.
The framework is designed to be extensible, allowing for the easy addition of new agents to perform various tasks on your X profile. It uses the X API, automatically handles rate limiting, and saves progress in a local SQLite database for resumable operations.
asyncio for concurrent API interactions.insights agent can automatically email reports via SMTP.X_AGENT_ENV.--dry-run mode.Typer with clear visibility into which database/environment is active.git clone https://github.com/rmedranollamas/x.git
cd x
uv:uv for dependency management.
pip install uv
uv sync
.env.example file to a new .env file: cp .env.example .env.env file and fill in your X API credentials and SMTP settings for email reporting.# X API
X_API_KEY="..."
X_API_KEY_SECRET="..."
X_ACCESS_TOKEN="..."
X_ACCESS_TOKEN_SECRET="..."
# Optional: Environment (defaults to development)
X_AGENT_ENV=production
# Email (Required for --email flag)
SMTP_HOST="smtp.gmail.com"
SMTP_PORT=587
SMTP_USER="your-email@example.com"
SMTP_PASSWORD="your-app-password"
REPORT_SENDER="sender@example.com"
REPORT_RECIPIENT="recipient@example.com"
uv run x-agent insights [--email]
uv run x-agent unblock [--user-id ID] [--refresh]
uv run x-agent unfollow
uv run x-agent blocked-ids
You can set up a daily automated report using the included cron setup helper:
python3 scripts/setup_cron.py
This will install a daily cronjob (default 9:00 AM) that runs the insights agent with email reporting enabled.
Use --dry-run to simulate actions without applying them (available for unblock and unfollow):
uv run x-agent unblock --dry-run
Use --debug with any command for detailed logging:
uv run x-agent insights --debug
For more information, use the --help flag:
uv run x-agent --help