devhindo / x

post tweets from terminal
https://x-blush.vercel.app
MIT License
27 stars 2 forks source link
cli go golang twitter twitter-api twitter-api-v2 twitter-app twitter-application twitter-cli twitter-client x
CLI tool to post tweets on x (twitter) from terminal


preview

Table of Contents

Usage

Main Usage

x "first tweet from terminal!"

Full Docs


interact with x (twitter) from terminal.

USAGE
  x <command>

Main usage (posting a tweet)
  x <tweet-text>
    Examples:
      one word tweet (no spaces)  x hi
      multiple words tweet        x "hi from terminal"
      with optional arg:          x -t "hi there"
      extended optional arg:      x --tweet "hi x"

Commands
  -h             show this help
  auth           start authorizing your X account
  auth --url     get auth url if it didn't open browser after running 'x auth'
  auth -v        verify authorization after running 'x auth'
  -t "text"      post a tweet
  -v             show version
  -c             clear authorized account

Installation

Linux

sudo rm -rf /usr/local/x
sudo tar -C /usr/local -xzf x_Linux_x86_64.tar.gz
# opening the file
nano $HOME/.profile

# and add this line at the end of the file
export PATH=$PATH:/usr/local/x
source $HOME/.profile 
x version

Windows

Mac

Authentication

Note: running x auth -v windows might flag the tool as a threat this is because it reads a config file that was previously generated here to identify the user by a random string that's unique for your device. you can check the function here. so if the threat shows up, allow it and continue.

Posting tweets

x -t "tweet text" or x --tweet "tweet text"