mdbadges-cli
  • 💫Start
    • 🏁Getting Started
  • 🔱Commands
    • ⭐Finding a Badge
    • ⭐Search
    • ⭐Create
    • ⭐Random
    • ⭐Copy
    • ⭐Add
  • ✨Misc. Commands
    • ❄️Documentation
    • ❄️Changelog
    • ❄️Badges
  • ❌Deprecated
    • 🤔What is this section?
    • 🌄Categories
    • 🌄Fund
    • 🌄Version
    • 🌄Update
    • 🌄Lookup
    • 🌄About
Powered by GitBook
On this page
  • Handling multiple badges
  • Additional Options
  • --style / -s
  • --link
  • --html

Was this helpful?

  1. Commands

Finding a Badge

PreviousGetting StartedNextSearch

Last updated 4 months ago

Was this helpful?

Arguments: [category] [badgeName]

Finding commands involves laying out your command like this:

mdb [category] [badgeName]

As an example, if you wanted to find a badge for Discord, you can run the following command:

mdb social discord

In the case seen above, social is the category which Discord is contained in, while discord is the definition name of the badge.

This will output the following in the terminal:

Badge found:
[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?&logo=discord&logoColor=white)](#)

The badge will show up like this in Markdown:

If you aren't sure that mdbadges-cli has the badge you're looking for, use mdb search to search for your badge across all categories.


Handling multiple badges

You can also find more than one badge at the same time, as long as they are all within the same category as each other. This also supports the for this command.

For example, to generate 3 badges for Discord, GitHub and YouTube, which are all from the Social category, run:

mdb social github discord youtube

This will output the following in the terminal:

Badge found:
[![GitHub](https://img.shields.io/badge/GitHub-%23121011.svg?logo=github&logoColor=white)](#)

Badge found:
[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?&logo=discord&logoColor=white)](#)

Badge found:
[![YouTube](https://img.shields.io/badge/YouTube-%23FF0000.svg?logo=YouTube&logoColor=white)](#)

Additional Options

--style / -s

Function: Toggles the style of the badge.

There are 5 styles available to use with badges. These include the following:

  • flat

  • flat-square

  • plastic

  • social

  • for-the-badge

To change the style of the badge, which is by default flat when no style is specified in the Shields.io URL, add this option after the command:

mdb social discord --style for-the-badge

This will output the following in the terminal:

Badge found:
[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?&logo=discord&logoColor=white&style=for-the-badge)](#)

--link

Function: Toggles whether a badge should link to another site.

Adding this option will ask you to enter a prompt with a link that you want to lead people to when they click on it:

mdb social discord --link

From here, enter the link you want to lead a user to when they click on the badge:

│
◇  Enter your link here:
│  https://discord.gg/nextjs

Badge found:
[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?&logo=discord&logoColor=white)](https://discord.gg/nextjs)

Using this option when finding multiple badges will prompt you to enter seperate links for each specified badge.


--html

Function: Toggles the HTML version of a badge.

Getting the HTML version of a badge is also supported.

Adding this option will output the HTML code as an <img> tag, and also surrounded by <a> tags if you use the --link option together with this option.

To get the HTML version of a badge, use the option after your command:

mdb social discord --html

This will output the following in the terminal:

<img src="https://img.shields.io/badge/Discord-%235865F2.svg?&logo=discord&logoColor=white" alt="Discord">

You can now use this code in your HTML to display it on a webpage.

The badges will show up like this in Markdown:

The badge will show up like this in Markdown:

🔱
⭐
additional options
Page cover image