Giter Site home page Giter Site logo

devhindo / x Goto Github PK

View Code? Open in Web Editor NEW
23.0 6.0 2.0 2.38 MB

post tweets from terminal

Home Page: https://x-blush.vercel.app

License: MIT License

Go 50.63% JavaScript 0.24% CSS 3.98% TypeScript 45.14%
cli go twitter twitter-api x twitter-api-v2 twitter-app twitter-application twitter-cli twitter-client

x's Introduction

preview

CLI tool to interact with x (twitter) from terminal

Table of Contents

Usage

Main Usage

  • post tweets from terminal like this
x -t "first tweet from terminal!"

Full Docs


interact with x (twitter) from terminal.

USAGE
  x <command>

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

  • download the verion that matches computer's operating system from latest release
  • open a terminal in the directory where the file was downloaded
  • for example assume the file name is x_Linux_x86_64.tar.gz
  • remove any previous downloaded version of x
sudo rm -rf /usr/local/x
  • run the following command to extract the file
sudo tar -C /usr/local -xzf x_Linux_x86_64.tar.gz
  • Add /usr/local/x to the PATH environment variable
  • Do this by adding the following line to your $HOME/.profile or /etc/profile (for a system-wide installation):
# opening the file
nano $HOME/.profile

# and add this line at the end of the file
export PATH=$PATH:/usr/local/x
  • run the following command to update the current session
source $HOME/.profile 
  • verify the installation by running the following command
x version
  • if the installation was successful, you should see the version of x that was installed

Windows

  • download the verion that matches your archeticture from latest release
  • extract the file and get the x.exe file and place it in a directory that is in your PATH environment variable. a common one is C:\Windows\system32
  • open a terminal and run x --version to verify the installation
  • if the installation was successful, you should see the version of x that was installed

Mac

  • idk never used it before. but I have darwin binaries in the latest release so you can try it out

Authentication

  • run x auth
  • an auth url will be opened in your browser, if it doesn't run x auth --url to get the url
  • verify X CLI in the opened twitter page
  • after authorizing the app return to the terminal and run x auth -v

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.

  • if the authorization was successful, you should see a verified message
  • now you can post tweets using x -t "tweet text"
  • if anything went wrong run x -c to clear any settings and start over
  • if the problem persists, kindly open an issue here and describe the problem and I'll be happy to help!

Posting tweets

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.