DEV Community

Cover image for Adding badges to your open source project in 2 seconds
technikhil314
technikhil314

Posted on • Edited on

1 1

Adding badges to your open source project in 2 seconds

Are you a open sourcer or maintainer for open source project?? Have you automated adding badges to your repo?? Let me know how you do it.

Adding badges to your readme file is such a pathetic and robotic feel job. I have seen people doing following

  1. Everytime go to shields.io or badgen.net
  2. Search for your badge by name e.g. travis
  3. Copy the url paste to your readme
  4. and format it to add links to proper destination etc etc

damn it took 45 seconds for me to type the process and may be 15 seconds for you to read all the steps. Imagine how much time it will take to add 10 badges.

I thought there must be some tool out there to do this but I did not find one (Please comment if you know of any such tool)

But I decided to created one such tool which will

  1. See for all files through your current working directory
  2. and add badges accordingly

Here is the demo of it running

How can you use it

  1. npm i -g git-auto-badger
  2. add a placeholder in your readme to tell where to add badges check the repo for more info
  3. run auto-badger

Done. All the necessary badges for any OSS project are addeddto your markdown. Commit and push. Njoy.

By necessary badges I mean following

Build status, Code coverage, NPM package version, Dependancies monitor, all contributors count, star on github, fork on github

visit https://github.com/technikhil314/auto-badger for more details. Feel free to give feedback or leave comment.

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay