X Analytics CLI for Openclaw

A robust read-only command-line interface for retrieving and analyzing X (Twitter) data via the v2 API.

bin-huang
v1.0.0
Apr 8, 2026
0
632
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install x-analytics-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 x-analytics-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 X Analytics CLI?

X Analytics CLI is a developer-centric tool designed to bridge the gap between AI agents and the X (Twitter) platform. As part of the ecosystem of Openclaw Skills, it provides a structured way to query tweet data, user profiles, and engagement metrics without leaving the terminal. It utilizes the X API v2 and supports OAuth 1.0a authentication, ensuring secure and reliable access to real-time social data.

By integrating this skill, developers can automate the gathering of social signals, perform sentiment analysis, and monitor brand mentions. This skill for Openclaw Skills is essential for anyone building data-driven workflows that require precise X platform metrics and programmatic access to social media timelines.

X Analytics CLI Use Cases

  • Monitor real-time brand mentions or hashtags for market research.
  • Analyze competitor follower growth and engagement metrics.
  • Track tweet volume trends over time to identify viral topics.
  • Retrieve authenticated user timelines to archive or audit social activity.
  • Perform deep-dive lookups on specific tweet IDs for programmatic reporting.

How X Analytics CLI Works

  1. The user provides a query or command such as searching for specific keywords or looking up a user profile.
  2. The CLI authenticates the request using stored OAuth 1.0a credentials including API keys and access tokens.
  3. The tool interfaces with the X API v2 endpoints to fetch the requested data, supporting various expansions and specific fields.
  4. Results are returned as structured, pretty-printed JSON, including data, includes, and metadata objects for pagination.
  5. The AI agent or user parses this output to derive insights or trigger further automated actions within the Openclaw Skills framework.

X Analytics CLI Setup

# Install the CLI globally via npm
npm install -g x-analytics-cli

# Verify availability
x-analytics-cli --help

# Configure credentials at ~/.config/x-analytics-cli/credentials.json
# or set environment variables: X_API_KEY, X_API_SECRET, X_ACCESS_TOKEN, X_ACCESS_TOKEN_SECRET

X Analytics CLI Data Schema & Taxonomy

The skill organizes data based on the X API v2 response convention for consistency and easy parsing.

Component Description
data Primary results such as individual tweets, user objects, or count arrays.
includes Expanded objects like author details, pinned tweets, or media metadata.
meta Metadata including pagination tokens (next_token) and result counts.
public_metrics Engagement data: likes, retweets, replies, quotes, and impressions.

X Analytics CLI Advanced Features

  • Granular time-series analysis using the tweet-counts command with minute, hour, or day buckets.
  • Advanced search query syntax support including boolean operators, language filters, and user exclusions.
  • Automated pagination management via next-token flags for large-scale data retrieval tasks.
  • Flexible output formatting with a compact mode specifically designed for shell piping and automation.
  • Support for complex expansions to retrieve associated media, polls, and place details in a single request.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*