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

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
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.

Image for post
Image for post
npx ascii-themes interactive

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

Image for post
Image for post

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.

Written by

Developer Avocado 🥑 Manager @fidelhq by day, @mozillareps & @moztechspeakers by night. I do things for T-Shirts. Made http://puns.dev. 1/2 @DevRelAvocados

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store