DEV Community

James McDermott
James McDermott

Posted on

📚 A Command Line Interface!


Larder is a bookmarking tool for developers. It supports categorizing and tagging bookmarks. Categorizing is done by folders. You can make a folder that has child. It will make you easier to organize bookmarks. Beside that, you can search your bookmarked links by tag, title, and URL.

This tool also supports synchronizing your GitHub stars too. So, you can track updates from projects that you starred on GitHub. If you want to bookmark something automatically, Larder extension is available for browsers, Android, and there's also an API.

I decided to make a robust, easy to use command line interface for Larder. I did this mainly because I have a 2012 Macbook Pro with 4GB of RAM that really cannot handle any more browser extensions. I also did this because I know there's a lot of folk who live in their terminals and detest browser extensions.

The Larder CLI

Okay so first off, I am aware a few CLI's for Larder exist, but most of these are Ruby or Node.js based. Go is much more performant and because of this, the Larder CLI, which you can find here is written in Go.

The tool leverages the Cobra library. Cobra has been used to build some of the best CLI's around, being utilized in projects such Kubernetes, Hugo, etcd, Docker and rkt, to name but a few.

The Larder CLI allows for the viewing, adding, removing of a user's folders and/or bookmarks.

Along with this, the tool offers a robust search functionality. The user provides a string of search terms delimited by commas. For example: "texas,bbq". This will search through all folders, for names or tags containing those terms.

The Unique Selling Point

What really makes this new Larder CLI stand out is the ability to refresh your access token. Tokens expire in a month and can be refreshed for a new access token at any time, invalidating the original access and refresh tokens.

This built in functionality does not exist in alternatives to this Larder CLI. This process is automated so the user can continuously use the Larder CLI without having to manually remove and add new access tokens.

You can check out Larder on Github.

Top comments (0)