npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

twit-cli

v0.0.5

Published

Use twitter from the command line!

Downloads

3

Readme

version: 0.0.5

Intro

Do you love running applications from the command line? Do you love doing everything with your keyboard? I sure do! If you don't then this tool probably isn't for you. The twit-cli tool features all the great things you like to do on twitter, but in the comfort, love, and safety of your terminal.

Requirements

  • node js version >= 0.6.x
  • A twitter api account
  • A love for the terminal and cli tools

Getting started

Install

npm install twit-cli -g

Configuration

Create a .twit-cli dot file in your home directory with the following values that correspond to your Twitter application account. If you haven't created one yet, create it here. In order for twit-cli to work, you must set the application to read, write, and direct messages. Without that setting, twit-cli will fail to work and you will have to using Twitter from some application that is obviously inferior to cli.

Example:

{
	"consumer_key": "KEYZZZ",
	"consumer_secret": "SECRETZZZ",
	"access_token": "SECRET_KEYZZZZ",
	"access_token_secret": "SECRET_TOKENZZZ"
}

Command Reference

List commands

$ twit-cli -h

Usage: twit-cli [options] [command]

  Commands:

    timeline [options] [screenname] Get timeline data
    tweet [options] <status> 140 character message.

  Options:

    -h, --help     output usage information
    -V, --version  output the version number

Tweet

Usage: tweet [options] <status>

  Options:

    -h, --help     output usage information
    -j, --json     Get response as JSON
    -v, --verbose  Verbose logging
    -c, --count    Count characters in Tweet (will not send)

####Examples:

twit-cli tweet "I love #twitcli"
twit-cli tweet "I love #twitcli" -c # outputs 15

Retweet

Usage: retweet [options] <id>

  Options:

    -h, --help     output usage information
    -j, --json     Get response as JSON
    -v, --verbose  Verbose logging
    -d, --delete   Delete a retweet

####Examples:

twit-cli retweet 313334974159917057
twit-cli retweet 313381278290415618 -d // Deletes a retweet. Same as deleting a tweet.

Timeline

If you choose to omit screenname, the tweets displayed will relate to your timeline.

  Usage: timeline [options] [screenname]

  Options:

    -h, --help             output usage information
    -j, --json             Get response as JSON
    -v, --verbose          Verbose logging
    -l, --limit [integer]  Number of statuses to return
    -r, --rt               Show retweets [screenname required]
    -i, --include          Include replies

####Examples:

twit-cli timeline 
twit-cli timeline -l 5 # 5 tweets returned
twit-cli timeline @trevor_landau 
twit-cli timeline @trevor_landau -l 5 -r 

Note: A command's response is cached for ~30 sec. This is to reduce the likelihood of exceeding Twitter's api rate limit. This only defends against identical commands.

Follow

  Usage: follow [options] <user>

  Options:

    -h, --help     output usage information
    -j, --json     Get response as JSON
    -v, --verbose  Verbose logging
    -n, --notify   Receive notifications for this user

####Examples:

twit-cli follow @trevor_landau
twit-cli follow @trevor_landau -n

Delete

Delete a tweet

  Usage: delete [options] <id>

  Options:

    -h, --help     output usage information
    -j, --json     Get response as JSON
    -v, --verbose  Verbose logging

####Examples:

twit-cli delete 312382752102154240

Favorite

Usage: fav [options] <id>

  Options:

    -h, --help     output usage information
    -j, --json     Get response as JSON
    -v, --verbose  Verbose logging
    -d, --delete   Delete a favorite

####Examples:

twit-cli fav 312382752102154240
twit-cli fav 312382752102154240 -d

Tests

Test ensure command line args work and retrieve data. To run tests, clone this project and type npm test.

grunt-cli required.

Change Log

0.0.5

  • Favorite and unfavorite tweets
  • Retweet, Delete retweet

0.0.4

  • Ability to delete and follow

0.0.3

  • Extracted caching into npm module - fscache

0.0.2

  • Success message on tweet
  • Ability to retrieve timeline

0.0.1

  • Supports tweeting