Releasing ascii-themes, a Node.js CLI Interface to Generate VSCode Themed ASCII Art

Alex Lakatos
2 min readSep 29, 2019

--

I’ve built a Node.js CLI interface this weekend to generate themed ASCII art. It supports 287 fonts from Figlet and 18 themes from VS Code.

This all started because of a tweet Wassim did, and I tried to replicate that. I’ve managed to do a passable version using online tools but it was a manual process. So I tried recreating it in Node.js using Figlet, and the Monokai Dimmed theme from VS Code. I should have stopped here, it was good enough.

But I went too deep down the rabbit hole, so I built a customizable CLI with more than 5000 options to generate ASCII art in the terminal. Enjoy! And do comment below with whatever cool thing you end up generating with it.

Usage

npx ascii-themes generate medium
npx ascii-themes generate medium

Optional flags:

  • --font The Figlet Font to use. Defaults to 'Slant Relief'.
  • --themeName The VS Code theme to use. Defaults to 'Monokai Dimmed'.
  • --horizontalLayout The horizontal layout to use for the Figlet Font. Defaults to 'default'.
  • --verticalLayout The vertical layout to use for the Figlet Font. Defaults to 'default'.

Interactive Mode

The CLI has 2 interactive modes:

npx ascii-themes -i

Will allow you to select from the available commands (generate, support, interactive) and input the flags for them via text prompts.

npx ascii-themes interactive

Will allow you to input the text and select from a list of the available fonts, themes, and layouts.

Options

To see supported fonts and themes run npx ascii-themes support.

Or you can watch this video tweet I did while building the CLI, it shows you all available fonts in one minute.

Originally published at https://dev.to on September 29, 2019.

--

--

Alex Lakatos
Alex Lakatos

Written by Alex Lakatos

Leading technology @interledger by day, @mozillareps & @moztechspeakers by night. I do things for T-Shirts. Made http://puns.dev. 1/2 @DevRelAvocados

No responses yet