Skip to main content
Use the CLI when you want deterministic terminal commands, JSON output, dry-run previews, and saved credential profiles for TwexAPI REST workflows without writing application code.

Install

Requires Node.js 18 or newer. Source: twexapi-dev/x-api-scraper-cli

Authenticate

Get your API key from the TwexAPI dashboard.
For write actions, save a profile with a Twitter cookie or auth_token:

Basic example

Workflow: post a tweet with dry-run

Preview write actions before sending:
Local file upload is not supported. Use a public --media-url.

Workflow: send a DM

Workflow: publish Markdown as an X Article

Raw API requests

Call any TwexAPI path directly:

Use as a skill

Install from a GitHub skill installer:
Or install from ClawHub:

Security notes

  • The CLI reads X_API_SCRAPER_KEY, X_API_SCRAPER_BASE_URL, and X_API_SCRAPER_CONFIG_DIR from the environment.
  • Saved app configs and profiles are stored as plain JSON in ~/.x-api-scraper/config.json by default.
  • Use --dry-run before any write action in agent workflows.

References