An open API service indexing awesome lists of open source software.

https://github.com/ichikawayukko/twitter-cmd

Simple CLI Twitter client. May be useful in shell script use ? コマンドライン簡易ツイッタークライアント!
https://github.com/ichikawayukko/twitter-cmd

golang linux-cli twitter-bot twitter-cli twitter-cli-client twitter-client twitter-cmd

Last synced: 2 months ago
JSON representation

Simple CLI Twitter client. May be useful in shell script use ? コマンドライン簡易ツイッタークライアント!

Awesome Lists containing this project

README

        

[日本語](READMEja.md)
# twitter-cmd
Simple CLI Twitter client.

Post something to Twitter from command line :-) May be useful in shell script use ?

## Build
1. Launch build environment

`docker-compose run build-env`

1. Set OAuth CONSUMER_KEY and CONSUMER_SECRET

1. Get your key/secret from Twitter Developpers > Apps page.
1. Set it to consumer_token.go

1. Fetch dependent packages

`make deps`

1. Build

`make` or `make build-windows`

Or you can download pre compiled executable from [releases](https://github.com/IchikawaYukko/twitter-cmd/releases).

## Usage (Get OAuth token)

1. Start OAuth Authentication

`./twitter 1`

This will show Authenticate URL like this

```
Open this URL and login with your Twitter account.
https://api.twitter.com/oauth/authenticate?oauth_token=xxxxxxxxxx
```
2. Open Authenticate URL by browser.

3. Enter PIN

```
Enter PIN: *******
Token saved to .ichikawayukko-twitter_cmd
Erase this file to re-authenticate.
```

# Usage (Tweet)
1. Tweet !!

Linux: `./twitter Hello World!`

Windows: `twitter.exe Hello World!`

1. Tweet with image

`./twitter -m filename1 Hello World?`

`./twitter -m filename1 -m filename?2 Hello World?`

(4 files can be specified at one time)