Install
openclaw skills install @yeahjjyy/twexapi-cliUse this skill when the task should be done through the twexapi command-line client, including installing the CLI, configuring app or profile auth, previewing requests, and calling twexapi endpoints through convenience commands or raw paths.
openclaw skills install @yeahjjyy/twexapi-cliUse this skill when the task should be completed by running twexapi commands instead of re-implementing request logic by hand.
twexapi CLIauth_token--dry-runtwexapi <path> formDo not treat this skill as the main interface when the task is to edit the CLI source code itself.
twexapi <path> only when no convenience command fits.--dry-run before real write actions unless the user explicitly asks to execute them.For normal users, prefer the published npm package:
npm install -g twexapi-cli
twexapi --help
When working from this repository:
node ./bin/twexapi.js --help
If a local executable is needed while developing:
npm link
twexapi --help
Requires Node.js 18 or newer.
https://twexapi.io/dashboard.TWEXAPI_KEY or --api-key is acceptable.TWEXAPI_BASE_URL and TWEXAPI_CONFIG_DIR.auth apps add.--cookie or a saved profile.~/.twexapi/config.json.auth_token, or ct0 in plain JSON.--config-dir or TWEXAPI_CONFIG_DIR to isolate credentials.App setup:
twexapi auth apps add --name prod --api-key "twitterx_..."
twexapi auth apps use prod
Profile setup from cookie:
twexapi auth profiles add --name founder --cookie "ct0=...; auth_token=..."
twexapi auth profiles use founder
Profile setup from auth token:
twexapi auth cookie --auth-token "your_auth_token" --save-as founder
Inspect config:
twexapi config show
twexapi config path
Prefer convenience commands such as:
twexapi --app prod about elonmusk
twexapi --app prod users elonmusk sama
twexapi --app prod search users "openai" --count 20
twexapi --app prod tweet lookup 1900000000000000000
Use the generic path form when the endpoint is known but not wrapped:
twexapi /twitter/elonmusk/about
twexapi -X POST -d '["elonmusk","sama"]' /twitter/users
--app, --profile, --api-key, and --dry-run before the command.tweet create, tweet like, user follow, and list create, prefer --dry-run first.auth cookie uses a request path that contains the auth_token, so be careful with logs and traces.--media-url.Use an isolated config directory for local testing:
twexapi --config-dir ./.twexapi-local config show
Recommended order:
twexapi --help or node ./bin/twexapi.js --help.about or users.--dry-run before any real write action.