Giter Site home page Giter Site logo

devhindo / x Goto Github PK

View Code? Open in Web Editor NEW
21.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"

x's People

Contributors

devhindo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

x's Issues

ability to view stream of timeline (ala the old t client)

I think this would be the only feature I request for this application. It is a big ask but that is kinda why I was using t years ago. being able to see real time posts from a terminal interface. If this is a thing that exists somewhere else outside of this repo (and works), feel free to let me know.

multiple accounts feature

x auth -a elon -- continue authentication
x auth -a yoyo -- continue authentication
x switch -a elon >> post from elon
x switch -a yoyo >> post from yoyo

tweet more that tweet by counter

what about tweeting more that tweet like for example x -N 12 "12 tweet with same text "
and what about taking post and reply to with x -r "comment on tweet"
also final thing what about reply with tweet i've wrote or i retweet it for example this reply with the last 12 tweet or retweet i've in this tweet x -r -N 12

add a constrain for tweet limit

don't send a request to the X API if the tweet character count exceeds 280 characters. instead prompt the user to shortage the tweet

x -t "long tweet"

character limit exceeded by 6 characters. make the tweet shorter.

`x thread`

I envision 2 possibilities for threads.

  1. interactive mode.
$ x thread

Hello world

If you press enter it prompts you:

Press `space` to continue with 1/1 and add a new line
Press `enter` to continue with 2/2
Press `shift + enter` to send thread
Press `esc` to restart 1/1

I'd replace the -t command with this functionality and just tweet without any param like currently does but it's not documented btw.

May be feasible to implement color highlight when going above max char.

  1. Reply to last tweet.
    x -r "text"

So you can:
x "Hello"
x -r "world!"

Hello tweet 1/2
world! tweet 2/2

  1. Reply to id
    x -r [id] "text"

Which can be combined with
x "Hello world!" ~> outputing the ID

Tweets with images

Thank you for this project!

Will it be possible in future updates to attach images to tweets?

`x update`

with 2 outputs

  1. no available updates
  2. there's a new version <version number> do you want to update? (y/n)

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.