tweet-cli for Openclaw

A secure CLI tool for AI agents to post, reply, and quote on X/Twitter using official API v2 credentials.

0xmythril
v1.0.0
Feb 16, 2026
0
1.4k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install tweet-cli

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install tweet-cli using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is tweet-cli?

tweet-cli is a specialized interface for X/Twitter that enables Openclaw Skills to perform write operations on the platform. Unlike scraping-based tools, it uses the official API v2 to ensure reliability and compliance. It is built with security in mind, featuring zero-dependency install scripts and pinned release tags to protect your environment.

This skill is optimized for AI agents that need to communicate with an audience or provide updates. Because it operates within API credit limits, it emphasizes explicit user confirmation before any action is taken, making it a responsible addition to any Openclaw Skills collection.

tweet-cli Use Cases

  • Automating brand updates or announcements directly from an AI agent.
  • Responding to specific user mentions or threads in real-time.
  • Quoting relevant research or news for a target audience.
  • Scheduled social media management via cron jobs within Openclaw Skills.

How tweet-cli Works

  1. The agent receives a request to post or reply on X/Twitter.
  2. tweet-cli authenticates using stored credentials in the .env file.
  3. The command is parsed by the official X API client (twitter-api-v2).
  4. The post is published, and the agent receives a confirmation or status error, which it reports back to the user.

tweet-cli Setup

  1. Install the tool using a pinned release tag:
npm install -g github:0xmythril/tweet-cli#v1.0.0
  1. Create the configuration directory and set restricted permissions:
mkdir -p ~/.config/tweet-cli
touch ~/.config/tweet-cli/.env
chmod 600 ~/.config/tweet-cli/.env
  1. Populate the environment file with your API keys from the X Developer Portal:
cat > ~/.config/tweet-cli/.env << 'EOF'
X_API_KEY=your_consumer_key
X_API_SECRET=your_secret_key
X_ACCESS_TOKEN=your_access_token
X_ACCESS_TOKEN_SECRET=your_access_token_secret
EOF
  1. Verify the setup by running tweet-cli whoami to check your authenticated user profile.

tweet-cli Data Schema & Taxonomy

The skill manages configuration and interactions through a simple file-based and argument-driven schema:

Component Type Description
Config File .env Stores API keys and tokens at ~/.config/tweet-cli/.env
Command Input String Accepts raw text for posts or replies
Identifiers String/URL Supports both numeric Tweet IDs and full x.com/twitter.com URLs
Permissions Unix Requires 600 (owner-only read/write) for credential security

tweet-cli Advanced Features

  • Secure credential management with restricted file permissions to protect your Openclaw Skills environment.
  • Zero post-install scripts to ensure a safe, telemetry-free installation.
  • Support for both raw tweet IDs and full status URLs for flexible integration.
  • Specific error handling for CreditDepleted (HTTP 402) scenarios common in API-limited environments.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins tweet-cli
Github Stars: 0
forks: 0

Featured*