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

medium-cli

v0.0.8

Published

Medium via CLI

Downloads

26

Readme

Medium CLI

Medium from your command line!

Installation

$ npm install -g medium-cli

Usage

There are four commands: medium create, medium login, medium publish, and medium open.

create

$ medium create buzzfeed

  medium · Successfully created your blog!

This command creates a new sub directory in your current directory, with two example articles. The directory looks like this:

.
├── articles
|   ├── 12-classic-love-scenes-improved-by-a-chipotle-burrito
|   |   └── index.md
|   └── 51-corgi-gifs-that-will-change-your-life
|       └── index.md
└── .gitignore

The index.md files are the blog posts. More on this later.

login

$ medium login

  medium · Please open https://medium.com/me/settings in your browser.
         · At the bottom of the page, under `Integration Tokens`, copy
         · this description:

         · "Medium-CLI basic publishing access."

         · Then generate the new token and copy it.

  Paste your Integration Token here: XXXX

         · Authenticating into Medium..

         · Saved!

This command asks you for your Integration Token (which can be retrieved at the bottom of this page). It also auths into Medium to get your user information. Lastly, it saves the token, your userId, and your URL to your ~/.netrc file.

publish

$ medium publish

This command iterates through your index.md files in ./articles and publishes the ones that don't have published: true in the front matter to your Medium account.

Here is an example of an index.md file:

---
title: 12 Classic Love Scenes Improved By A Chipotle Burrito
tags: burrito, gifs, love
canonicalUrl: www.buzzfeed.com/kincairm/12-classic-love-scenes-improved-by-a-chipotle-burr-a4wp#.iab3N1w76
publishStatus: draft
license: all-rights-reserved
---

# 1. Titanic (1997)

![](http://ak-hdl.buzzfed.com/static/2014-04/enhanced/webdr05/28/11/enhanced-21200-1398697731-24.jpg)

# 2. The Notebook (2004)

![](http://ak-hdl.buzzfed.com/static/2014-04/enhanced/webdr06/28/11/enhanced-13907-1398700313-2.jpg)

# 3. Dirty Dancing (1987)

![](http://ak-hdl.buzzfed.com/static/2014-04/enhanced/webdr04/28/11/enhanced-31301-1398697944-9.jpg)

Note that title is the only field that is required in the front matter, with all the other ones optional. For a list of the accepted possible parameters, see Medium's API documentation here. contentFormat and content are not required in the front matter, as they are both added later by the medium publish command.

For each successful post, the medium publish command also adds published: true to the front matter.

open

$ medium open

This directs your browser to your Medium page. You need to have medium login first to set your Medium URL.

License (MIT)

WWWWWW||WWWWWW
 W W W||W W W
      ||
    ( OO )__________
     /  |           \
    /o o|    MIT     \
    \___/||_||__||_|| *
         || ||  || ||
        _||_|| _||_||
       (__|__|(__|__|

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.