Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/vanita5/birdknife

birdknife is a Twitter CLI based on Vorpal inspired by TTYtter.
https://github.com/vanita5/birdknife

babel cli es6 node ttytter tweets twitter twitter-cli vorpal

Last synced: 2 months ago
JSON representation

birdknife is a Twitter CLI based on Vorpal inspired by TTYtter.

Awesome Lists containing this project

README

        



> Twitter CLI

[![Build Status](https://travis-ci.org/vanita5/birdknife.svg)](https://travis-ci.org/vanita5/birdknife) [![NPM Downloads](https://img.shields.io/npm/dt/birdknife.svg)](https://www.npmjs.com/package/birdknife) [![NPM Version](https://img.shields.io/npm/v/birdknife.svg)](https://www.npmjs.com/package/birdknife) [![Dependency Status](https://www.versioneye.com/user/projects/56d83d23d716950040a0f014/badge.svg?style=flat)](https://www.versioneye.com/user/projects/56d83d23d716950040a0f014) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)

birdknife is a Twitter CLI based on [Vorpal](https://github.com/dthree/vorpal) inspired by [TTYtter](http://www.floodgap.com/software/ttytter/).
TTYtter hasn't been updated for some time now and doesn't support new features introduced by Twitter. This project aims to be a completely
functional Twitter client for your CLI.

## Features

* Full featured Twitter CLI
* Cross platform
* Read your timeline and interact with tweets
* Reply, retweet, like (fav), quote,...
* Interact with users
* Follow, block, mute
* Update your status with media and location
* Search on Twitter
* Hashtag and @screen_name autocompletion
* Notifications (Cross platform)

#### In the future

* Work with lists
* Follow, view, create, add/remove users,...
* Manage multiple accounts
* Open/View media and urls (browser or image viewer)

## Installation

Install `birdknife` globally via npm:

```bash
$ npm install birdknife -g
```

## Configuration

After initially calling birdknife, you should find a configuration file in your home directory.

**GNU/Linux, Mac OS X,...**
`~/.birdknife.json`

**Windows**
`C:\Users\user\.birdknife.json`

Example:
```json
{
"version": 5,
"auth": {
"consumer_key": "XXXXXXXXXXXXXXXXXXXXXX",
"consumer_secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"access_token": "00000000-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"access_token_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"preferences": {
"debug": false,
"notifications": true,
"location": false,
"tweet_protection": false,
"timestamp": 5
}
}
```

**Only edit values under the `preferences` section!**

### Preferences


Preference
Description
Values
Default


debug
Enable/Disable debug output for streaming events like limits, disconnects and reconnects.
true, false
false


notifications
Enable/Disable notifications. birdknife can display notifications for mentions, likes, retweets, followings,...

This is a cross platform feature running on GNU/Linux (notify-osd or libnotify),

Mac OS X (NotificationCenter, since 10.8) and Windows 8 (and newer).

Alternatively it supports Growl in case nothing else works.

true, false
true


location
Enable/Disable posting your location. The location can be detected automatically.
Alternatively you can provide coordinations.
false, "auto" (or true),

{ lat: 57.52936, lng: -6.24176 }

false


tweet_protection
If set to true this should prevent accidentally posting a status update. To post a status, enter /tweet first.

This command provides a new prompt where you can enter your status update.
false, true
false

timestamp
Set the time interval in minutes where birdknife will print out timestamps.

To disable timestamps, set timestamp to 0.
0-59
5

#### Edit preferences

_Note: You can also directly edit the config file!_

##### List preferences

```
birdknife [---]> /preferences
|
| debug: false
| notifications: true
| location: "auto"
|
```

##### Set preference

```
birdknife [---]> /set notifications false
notifications is now set to false

birdknife [---]> /set location { "lat": 57.52936, "lng": -6.24176 }
location is now set to [object Object]

birdknife [---]> /preferences
|
| debug: false
| notifications: false
| location: {"lat":57.52936,"lng":-6.24176}
|
```

## Information

##### Tweet prefix

Some tweets have a prefix before the username. Those prefixes indicate characteristics of a tweet.

Example: `b1> <*@username>: What a beautiful day!`


Prefix
Description


*
Indicates that this tweet is a reply to another tweet. It is probably part of a conversation/thread.

Hint: Run /thread to view the thread.



This tweet is either a reply to the tweet above (only in conversations) or has been quoted by the tweet above.

## Usage

##### Login (PIN authorization)

```
birdknife [---]> /login

Login and copy the PIN number: https://twitter.com/oauth/authorize?oauth_token=XXXX-XXXXXXXXXXXXXXXXXXXXXX
PIN:
```

To remove your account from birdknife: `/logout`

##### Tweet

The easy way:
```
birdknife [128]> Hello World!
```

How to post *multiline* tweets:
```
birdknife [...]> /tweet

Enter /send to update your status.
Tweet [136]> This
Tweet [133]> is
Tweet [131]> a
Tweet [121]> multiline
Tweet [114]> tweet!
Tweet [...]> /send

a1> <@_vanita5>: This
is
a
multiline
tweet!
```

How to post tweets with media:
```
birdknife [...]> /tweet /home/vanita5/dog.png /home/vanita5/cat.png

Enter /send to update your status.
Tweet [124]> Look at my pets!
Tweet [123]> /send
-- Uploading file: /home/vanita5/dog.png
-- Uploading file: /home/vanita5/cat.png

ab> <@_vanita5>: Look at my pets! pic.twitter.com/xxxxxxxxx
```
*Note: This command has filesystem autocompletion!*

##### View threads / conversations

```
birdknife [---]> /thread
```

##### Reply to a tweet

```
a1> <@twitter>: #birdknife is kinda nice!

birdknife [124]> /reply a1 FAAAKE!
```
Alias: ```/re```

##### Quote a tweet

```
a1> <@twitter>: #birdknife is kinda nice!

birdknife [109]> /quote a1 FAAAKE!

a2> <@_vanita5>: FAAAKE! https://twitter.com/twitter/status/12345678901234

a3> | <↑@twitter>: #birdknife is kinda nice!
```

##### Retweet

```
birdknife [---]> /retweet
```
Alias: ```/rt```

##### Like / Favorite

```
birdknife [---]> /like
```
Alias: ```/fav```

##### Remove from likes / favorites

```
birdknife [---]> /unlike
```
Alias: ```/unfav```

##### Follow / Unfollow

```
birdknife [---]> /follow _vanita5
```

```
birdknife [---]> /unfollow _vanita5
```

##### Block / Unblock

```
birdknife [---]> /block _vanita5
```

```
birdknife [---]> /unblock _vanita5
```

##### Mute / Unmute

```
birdknife [---]> /mute _vanita5
```

```
birdknife [---]> /unmute _vanita5
```

##### Mentions / Replies

```
birdknife [---]> /replies
```
Show recent mentions.

##### Direct messages

**Note: You can reply to dms directly with the ```/reply ``` command!**

```
birdknife [---]> /dms
```
Display direct messages inbox.

```
birdknife [---]> /dm _vanita5 Hello, this is a test from birdknife.
```
Send DMs to a user.

##### Search

```
birdknife [---]> /search
```
Search for tweets.

##### Quit

```
birdknife [---]> /exit
```

##### Other commands

```
/again [screen_name]
```
Reloads your timeline or loads recent tweets of a user if screen_name is given.

```
/delete
```
Delete a tweet.

```
/user
```
Display user information

```
/show
```
Display a tweet with additional information.

## Development

Fork, clone, `npm install`, code, pull request. :)

## License

```
(The MIT License)

Copyright (c) 2016 vanita5

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```