1.4 KiB
1.4 KiB
name, description
| name | description |
|---|---|
| twitter-cli-cookiefile | Use the local twitter-cli fork with cookies.txt authentication for reading or writing Twitter/X data. Trigger on Twitter/X CLI work, tweet lookups, timeline reads, posting, or account-specific cookie-file auth flows where TWITTER_COOKIE_FILE should be set per command for multi-account use. |
Twitter CLI (cookie-file, multi-account)
Use the local fork in /root/projects/twitter-cli.
Rules
- Prefer
TWITTER_COOKIE_FILE=/path/to/cookies.txtper command. - Do not pin a default account in repo config.
- Keep commands account-specific so switching accounts is just swapping the env var.
- Activate the repo venv before using
twitter.
Basic pattern
cd /root/projects/twitter-cli
. .venv/bin/activate
TWITTER_COOKIE_FILE=/path/to/account.cookies.txt twitter whoami --json
Examples
TWITTER_COOKIE_FILE=/path/to/account.cookies.txt twitter tweet 2051661976330269086 --json
TWITTER_COOKIE_FILE=/path/to/account.cookies.txt twitter user Space_Banane --json
TWITTER_COOKIE_FILE=/path/to/account.cookies.txt twitter post "hello world"
Notes
- The fork already supports Netscape-format
cookies.txtviaTWITTER_COOKIE_FILE. - Repo:
https://gitea.reversed.dev/luna/twitter-cli-cookiefile - If auth fails, verify the cookie file still contains fresh
auth_tokenandct0values for the target account.