Twitter cli via app authentication.
Straightforward way of sending tweets, supporting multiline messages. Written natively in TypeScript.
npm install chirpchirp --global
- Create a twitter app and generate keys
- Set the environmental variables
export TWITTER_API_KEY="TWITTER_API_KEY" export TWITTER_API_SECRET_KEY="TWITTER_API_SECRET_KEY" export TWITTER_ACCESS_TOKEN="TWITTER_ACCESS_TOKEN" export TWITTER_ACCESS_TOKEN_SECRET="TWITTER_ACCESS_TOKEN_SECRET"
- Tweet
chirpchirp send --message <message>
chirpchirp send --message "Hello, World!"
Command | Explanation |
---|---|
chirpchirp send --message <message> --twitter-api-key "TWITTER_API_KEY" --twitter-api-secret-key "TWITTER_API_SECRET_KEY" --twitter-access-token "TWITTER_ACCESS_TOKEN" --twitter-access-token-secret "TWITTER_ACCESS_TOKEN_SECRET" |
Instead of using the environmental variables |
npx chirpchirp send --message <message> |
Running without installation |
chirpchirp --help |
To get all the available options |
$Message = "Beavers
Squirrels
Bears"
node node_modules/chirpchirp/build/release/index.js send --message $Message
+
: Working
=
: Non applicable
!
: Spaces work, multiline doesn't (workaround above)
-
: Not working (workaround above)
Command used | Global | Local | Not installed |
---|---|---|---|
chirpchirp | + | = | = |
chirpchirp (from script) | ! | ! | = |
npx chirpchirp | - | - | ! |
npx chirpchirp (from script) | - | - | ! |
node index.js | + | + | = |