npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gitbook-plugin-terminal

v0.3.2

Published

Change code blocks to look more like a terminal

Downloads

71

Readme

Terminal plugin for GitBook

Take it easy. This is not a real terminal. The aim of this plugin is to simulate a terminal in which there is a line for the prompt and the command, and multiple lines for the output.

So... why you should use it? It's way easier to catch the attention of your users when the code block looks fancy, isn't it?

Cool, can I see it working?

The next animated gif shows all the styles you can use:

terminal themes

How can I use this plugin?

You only have to edit your book.json and modify it adding something like this:

"plugins" : [ "terminal" ],

This will set up everything for you. If you want some more control over the behaviour or the style of your terminal, just add this section too:

"pluginsConfig": {
  "terminal": {
    "copyButtons": false,
    "fade": false,
    "style": "classic",
  }
}

Now, to define your terminal you will have to create a Markdown code block where the first line will contain the token **[terminal] and after that, the text for the terminal.

The whole list of tokens is defined here:

  • command: Command "executed" in the terminal.
  • delimiter: Sequence of characters between the prompt and the command.
  • error: Error message.
  • path: Directory path shown in the prompt.
  • prompt: Prompt of the user.
  • warning: Warning message.

The next example shows how to use all of them:

So, as you can see, a token will be something like **[token value] where value can be any text.

So, what is the actual list of styles?

Terminal has 5 styles:

  • black: Just that good old black terminal everybody loves.
  • classic: Looking for green color font over a black background? This is for you.
  • flat: Oh, flat colors. I love flat colors. Everything looks modern with them.
  • ubuntu: Admit it or not, but Ubuntu have a good looking terminal.
  • white: Make your terminal to blend in with your GitBook.

Is there anything else I can customize?

Sure! As you can see in the previous examples, there are two more options:

  • copyButtons: If enabled, handy copy button will appear next to the commands. On click, the command will be copied to the clipboard.
  • fade: When enabled, every time the cursor is over the terminal, the text will be fade out to highlight the command.

Anything else I should know?

Not much. Just a quick note about the plugin parameters:

  • copyButtons: Adds button to copy the commands (defaults to true).
  • fade: If true, the text will fade to highlight the command (defaults to true).
  • style: Style for the terminal (defaults to flat).