# x-api CLI Full Reference Use `x-api --help` and `x-api --help` as the source of truth for flags. Current binary and build target: ```bash cargo build -p x-api-cli --all-features --bin x-api ./target/debug/x-api --help ./target/debug/x-api output-schema ``` Authentication is supplied through cookies flags, stdin, environment/profile files, or the command-specific options accepted by the clap parser. Important command coverage: - `dm send --api-version v2 --user-id --text ` - `dm send-batch --api-version v2 --user-ids --text ` - `upload image --file --category tweet-image` - `upload multiple --file --category dm-image --count ` - `inbox updates` - `inbox conversations --max-count ` - `inbox count` - `communities search --query ` - `communities join --community-id ` - `search top|latest|people|media|lists --query ` - `posts get-tweets --user-id ` - `posts get-likes --user-id ` - `posts retweet --id ` — pure Repost (CreateRetweet); check `data.success` / `data.retweet_id`. No promoted engagement_request fields. - `posts unretweet --id ` — DeleteRetweet; original tweet id only. Success needs unretweet result path; GraphQL errors => `data.success=false`. - `user about` - `user public --screen-name ` - `user followers --user-id ` - `user following --user-id ` - `user follow --user-id ` - `user unfollow --user-id ` - `auth token-to-cookies --token [--proxy ] --allow-plaintext-secrets` — exchange a single auth_token for full cookies; runs without `--cookies-file` (no existing cookies needed). Output envelope `data` carries `cookies`/`ct0`/`user_id`/`auth_token`. Without `--allow-plaintext-secrets` it refuses (the command emits plaintext secrets). The legacy CLI binary name is not a supported current entry.