Terminal Charts with Victory CLI

August 29, 2016

> 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

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.

Third-party Packages in Sanity Studio V2

November 15, 2022
To get around our "modern language features" issue, we can tweak the Sanity Webpack configuration so that it uses babel to transpile the library files for our third-party libraries that are causing us problems.