xpoz-cli is a command-line tool designed to interact with the Xpoz platform for social media intelligence. It provides programmatic access to all features of the Xpoz Python SDK via CLI subcommands across platforms like Twitter, Instagram, Reddit, TikTok, and others.
Key Features:
Cross-platform support: Works on Linux, macOS, and Windows.
Persistent authentication: Stores API keys securely.
CSV export: Exports data directly to CSV files.
Paginated result handling: Manages large datasets efficiently.
Integration across social media platforms: Supports Twitter/X, Instagram, Reddit, TikTok, etc.
Audience & Benefit:
Ideal for developers, data analysts, researchers, and businesses needing to automate social media data collection. It streamlines workflows, enables efficient analysis of social media trends, and simplifies integration with Xpoz's API.
Installation is available via winget, making it easy to integrate into your workflow.
Get data and insights from Twitter/X, Instagram, TikTok, Reddit and others social media with paginated result handling, CSV export, and persistent auth.
Install
One-liner (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/XPOZpublic/xpoz-cli/main/install.sh | sh
Auto-detects your OS and CPU architecture, downloads the matching binary from GitHub Releases, verifies its SHA256, and drops it in ~/.local/bin/xpoz-cli. Override the install dir with XPOZ_INSTALL_DIR=/usr/local/bin, or pin a version with XPOZ_VERSION=v0.2.0.
macOS Intel is not currently shipped as a prebuilt binary — use pip install xpoz-cli instead.
Quick start
Authenticate once — your API key is stored at ~/.config/xpoz/config.json (or %APPDATA%\xpoz\config.json on Windows) with mode 0600:
xpoz-cli auth login
# Get your API key from: https://www.xpoz.ai/settings
# Open in browser? [Y/n]: y
# Paste your API key: xpz_...
xpoz-cli auth status
xpoz-cli auth logout
Try it without signing up
Want to kick the tires first? Mint a free trial token — no sign-in required, valid for 5 days. It returns a limited set of results so you can see the CLI in action:
# Get a trial token (starts with "TRIAL")
curl -X POST https://api.xpoz.ai/api/trial/token
# -> { "success": true, "data": { "accessKey": "TRIAL...", "expiresInSeconds": 432000 }, ... }
export XPOZ_API_KEY=TRIAL... # the token from the response above
xpoz-cli twitter get_user --identifier elonmusk
The CLI is generated by reflecting on the installed SDK, so every method the SDK exposes is automatically a subcommand. Use --help at any level to explore:
xpoz-cli --help # global options and platforms
xpoz-cli twitter --help # available methods on twitter
xpoz-cli twitter search_posts --help # flags, types, and an example
Each method's help screen shows a synthesized example built from its required parameters.
Global options
Flag
Purpose
--api-key KEY
Override stored key (env: XPOZ_API_KEY)
--server-url URL
Custom MCP server (env: XPOZ_SERVER_URL)
--output json|pretty
JSON output format (default json)
--all-pages
Walk every page of a paginated result
--max-pages N
Safety cap for --all-pages
--page N
Jump to a specific page
--export-csv-url
Return a CSV download URL instead of rows
--timeout SECS
Operation timeout (default 300)
API key precedence: --api-key flag → XPOZ_API_KEY env → stored config.