GitHub Readme Stats Tutorial: Boost Your Profile吸引力

Logan Jul 13, 2026

Creating an engaging and informative README on GitHub isn't just helpful, it's crucial. A well-documented README can attract contributors, provide users with clear instructions, and even improve your project's visibility on search engines. Today, we're diving into how you can add Stats to your README to make it look polished and professional. Let's get started!

a web page with an image of two people and one is giving the thumbs up
a web page with an image of two people and one is giving the thumbs up

By the end of this tutorial, you'll be able to display interesting facts about your project, such as your GitHub stats, your cư bonus's activity, and more. Ready to amplify your README game? Great! Let's dive in.

Github Profile 2
Github Profile 2

Integrating GitHub Stats

One of the simplest ways to make your README stand out is by incorporating your GitHub stats. This not only provides users with insights into your activity but also adds a personal touch to your profile. Here's how you can do it.

How to Count Total Lines of Code in a GitHub Repository
How to Count Total Lines of Code in a GitHub Repository

To begin, you'll need to use the GitHub API to fetch your stats. We'll be using a reputable third-party library called 'simple-github' for this purpose. Let's start by installing it using npm:

Installing 'simple-github'

Master Git Fast: 2-Hour Step-by-Step Cheat Sheet
Master Git Fast: 2-Hour Step-by-Step Cheat Sheet

Open your terminal, navigate to your project directory, and run the following command:

npm install simple-github

Now that we've installed the library, let's move on to fetching and displaying your stats.

Fetching and Displaying Your Stats

GitHub for Beginners 🧑‍💻 What You Must Know (2026 Guide)
GitHub for Beginners 🧑‍💻 What You Must Know (2026 Guide)

In your README, you can use the following snippet to fetch and display your stats:

const simpleGitHub = require('simple-github');

const gh = new simpleGitHub({
  // Your GitHub username goes here
  username: 'your-username',
  token: 'your-personal-access-token',
});

gh.repos.list(() => {
  console.log(gh.repos.list());
});

Note: You'll need to replace 'your-username' and 'your-personal-access-token' with your actual GitHub username and a personal access token respectively.

Displaying Contributor Activity

Git & GitHub Cheat Sheet 🔥 | Commands, Workflow, Branching & Version Control (Beginner to Pro)
Git & GitHub Cheat Sheet 🔥 | Commands, Workflow, Branching & Version Control (Beginner to Pro)

Another great way to make your README more engaging is by displaying your collaborators' activity. This not only shows that your project is active but also encourages more contributions. Let's see how we can achieve this.

For this, we'll be using the 'contributor-calendar' npm package. Let's start by installing it:

the github chat sheet is displayed in this screenshote screen graber
the github chat sheet is displayed in this screenshote screen graber
GitHub Quick Guide: Essential Tips for Developers & Teams 📖
GitHub Quick Guide: Essential Tips for Developers & Teams 📖
Level Up Your Portfolio with These Beginner-Friendly GitHub Projects
Level Up Your Portfolio with These Beginner-Friendly GitHub Projects
Github Cheatsheet
Github Cheatsheet
GitHub - anuraghazra/github-readme-stats: :zap: Dynamically generated stats for your github readmes
GitHub - anuraghazra/github-readme-stats: :zap: Dynamically generated stats for your github readmes
How to Add Your Recently Published Medium Articles to Your GitHub Readme
How to Add Your Recently Published Medium Articles to Your GitHub Readme
Git & GitHub Explained for Beginners (2026)
Git & GitHub Explained for Beginners (2026)
the github chat sheet is displayed in pink and black
the github chat sheet is displayed in pink and black
the differences between github and git is shown in this graphic above it
the differences between github and git is shown in this graphic above it
TOP GITHUB REPOSITORIES EVERY DEVELOPER SHOULD KNOW
TOP GITHUB REPOSITORIES EVERY DEVELOPER SHOULD KNOW
the git chatsheet screen is lit up with orange and green text on it
the git chatsheet screen is lit up with orange and green text on it
Beginner's Guide to GIT | GitHub
Beginner's Guide to GIT | GitHub
TOP GITHUB PROJECT IDEAS FOR BEGINNERS
TOP GITHUB PROJECT IDEAS FOR BEGINNERS
the book cover for git & github a - z the complete beginner - to - pro guide
the book cover for git & github a - z the complete beginner - to - pro guide
the gif versus github diagram
the gif versus github diagram
an image of a computer screen with many different things on it
an image of a computer screen with many different things on it
the ultimate guide to creating an awesome cst chart
the ultimate guide to creating an awesome cst chart
Github repos every software developer must know
Github repos every software developer must know
How to Clone a Repository Using GitHub Desktop
How to Clone a Repository Using GitHub Desktop
5 Free Websites to Learn Git and GitHub in 2026
5 Free Websites to Learn Git and GitHub in 2026

Installing 'contributor-calendar'

Run the following command in your terminal:

npm install contributor-calendar

Now, let's use this library to display your contributors' calendar in your README.

Displaying the Contributors' Calendar

In your README, you can use the following snippet to display your contributors' calendar:

const ContributorCalendar = require('contributor-calendar');

const calendar = new ContributorCalendar({
  // Your GitHub repository's full name goes here
  repo: 'owner/repo',
  token: 'your-personal-access-token',
});

calendar.render((err, svg) => {
  if (err) throw err;
  console.log(svg);
});

Note: You'll need to replace 'owner/repo' and 'your-personal-access-token' with your actual repository's full name and your personal access token respectively.

And there you have it! You've now learned how to add engaging stats to your README, making it more attractive and informative. Now go ahead and impress the world with your GitHub skills!