Terminal Charts with Victory CLI

August 29, 2016
Ken Wheeler

> The ability to collect, analyze, triangulate and visualize vast amounts of data in real time is something the human race has never had before. > -Rick Smolan After pushing out `webpack-dashboard` and seeing how much people enjoy terminal based tooling, I thought perhaps I should see what else I can explore in this space. [Formidable](/)’s ReactJS based data visualization library [Victory](/open-source/victory/) seemed like an awesome candidate for a command line render target. I saw a project, [hyperchart](https://github.com/mathisonian/hyperchart), by Matthew Conlen, that allowed users to generate interactive Victory charts into [hyperterm-window](https://github.com/mathisonian/hyperterm-window). This looked awesome, but I was looking for a way to expand the feature set and operate in a broader range of TERMs. I had also seen some ascii/ansi style visualizations in [blessed-contrib](https://github.com/yaronn/blessed-contrib) while building `webpack-dashboard`, and they seemed super cool, but porting would be too much of a challenge given the differences in APIs. Of course, ascii/ansi style charts didn’t seem practical for the mainstream use case. Then I realized something, Victory outputs valid SVG markup. This, coupled with `ReactDOM.renderToString` actually makes command line chart generation really easy. I got to work on it, and today I’m happy to announce the initial release of [Victory CLI](https://github.com/FormidableLabs/victory-cli)! Victory CLI is an easy to use command line interface for generating and displaying Victory based data visualizations. It can: * Render a variety of chart types * Use built in themes * Render to PNG * Render to SVG * Display PNG renders in iTerm3 * Take a custom JSON data input * Take a custom component script input to render from Check it out in action: ![Victory Command Line Interface displaying Victory based data visualizations](https://res.cloudinary.com/formidablelabs/image/upload/f\_auto,q\_auto/v1675121564/dotcom/assets-uploads-2016-08-cli) If you think this is cool and want to give it a try just `npm install -g victory-cli` and head over to [https://github.com/FormidableLabs/victory-cli\](https://github.com/FormidableLabs/victory-cli) to get started!

Related Posts

Rust vs Go: Which Is Right For My Team?

August 29, 2024
In recent years, the shift away from dynamic, high-level programming languages back towards statically typed languages with low-level operating system access has been gaining momentum as engineers seek to more effectively solve problems with scaling and reliability. Demands on our infrastructure and devices are increasing every day and downtime seems to lurk around every corner.

A Rare Interview With A Designer who Designs Command-line Interfaces

May 13, 2024
For years, terminal and command-line applications have followed a familiar pattern: developers identify a need, code a solution, and release it for free, often as open-source software.

The Evolution of urql

December 6, 2022
As Formidable and urql evolve, urql has grown to be a project that is driven more by the urql community, including Phil and Jovi, than by Formidable itself. Because of this, and our commitment to the ethos of OSS, we are using this opportunity to kick off what we’re calling Formidable OSS Partnerships.