A few months ago, I left my role as the chief of engineering for Chartmetric, and switched into a technical advisory role. Stepping out of day-to-day operating responsibilities afforded me some rare free time to finally hack on a few projects.

Most of the projects thus far have been AI/ML-related projects (LLM fine-tuning, retrieval-augmented generation applications, vector databases, experimental prompt engineering, a few ETL pipelines, and some analysis of two large public datasets).

But a desire to take a closer look at the Go Programming Language (aka Golang) coupled with an interest to build a modern CLI application drove me to double-click on a project I've been wanting to build for quite some time — a CLI tool for the Chartmetric API.

Introducing the Chartmetric CLI

As of this writing, the Chartmetric CLI is still a work-in-progress.

But the tool has reached a point now where it is more or less stable to use, and it's a good time to share the current state of the project to solicit some user feedback.

You can download and play around with the Chartmetric CLI here.

Functionality

The Chartmetric CLI enables querying the Chartmetric API from the command line. It runs from any terminal window on Linux, MacOS, and Windows and supports both x86 and ARM architectures.

As long as you have a valid refresh token, you will be able to query almost all of the available Chartmetric API endpoints.

Future versions may support additional functionality — such as the ability to edit and save information back to your Chartmetric account, or perhaps compound commands (where one command may chain together a sequence of actions). For now, I'm keeping it simple.

Documentation

The Chartmetric CLI is designed to be intuitive enough to use immediately. CLI help screens highlight available commands as well as supporting flags to customize the commands.

Nevertheless, documentation for the Chartmetric CLI is available online (and mirrors the documentation from the CLI help screens).

It's important (to me) that the online documentation matches the CLI help screens, which enables a single source of truth and will minimize a lot of future headaches from version mismatches or outdated information.

Markdown files were autogenerated using the existing usage information in the codebase, for every command. These files were further customized to insert some "front matter" into each file, which enabled them to be served as statically rendered web pages through an existing web site running Jekyll.

As the tool evolves, this will ensure the online documentation stays current with the tool's built-in help screens.

Motivation

I've long appreciated the ease of using many popular CLI applications. The Stripe CLI, for example, is one such inspiration.

We use the Stripe API on Chartmetric, and their SDK is integrated pretty heavily into our codebase. Nevertheless, I found the Stripe CLI to be quite helpful and complementary to our use of the API.

For instance, I regularly use the Stripe CLI to do quick and efficient lookups. It is extremely fast to drop into a shell and run a command vs booting up a development environment and/or loading a GUI tool such as Postman.

The Chartmetric CLI is intended to make it easier to build applications powered by the Chartmetric API.

Feedback

If you give the Chartmetric CLI a go, I would be keen to learn how you get on with it. Opinions and suggestions are welcome at jay@jayhung.com.