Convert Figma logo to code with AI

DenverCoder1 logogithub-readme-streak-stats

🔥 Stay motivated and show off your contribution streak! 🌟 Display your total contributions, current streak, and longest streak on your GitHub profile README

4,603
716
4,603
19

Top Related Projects

:zap: Dynamically generated stats for your github readmes

13,603

📊 An infographics generator with 30+ plugins and 300+ options to display stats about your GitHub account and render them as SVG, Markdown, PDF or JSON!

🏆 Add dynamically generated GitHub Stat Trophies on your readme

It counts how many times your GitHub profile has been viewed. Free cloud micro-service.

Better GitHub statistics images for your profile, with stats from private repos too

A tool to generate your github summary card for profile README

Quick Overview

GitHub Readme Streak Stats is a dynamic image generator that displays a user's GitHub contribution streak statistics. It creates customizable SVG images that can be embedded in GitHub profile READMEs, showcasing continuous coding activity and motivating developers to maintain their streak.

Pros

  • Highly customizable with various themes and options
  • Easy to integrate into GitHub profile READMEs
  • Automatically updates to reflect the latest streak data
  • Supports both light and dark modes

Cons

  • Requires a server to generate the images dynamically
  • May encourage unhealthy coding habits by focusing on streaks
  • Limited to GitHub contributions only, not other coding platforms
  • Can be affected by GitHub's contribution counting rules

Code Examples

This project is not a code library, but rather a web service that generates images. Therefore, there are no code examples to provide.

Getting Started

To use GitHub Readme Streak Stats in your GitHub profile README:

  1. Copy the following markdown and replace {your-username} with your GitHub username:
[![GitHub Streak](https://streak-stats.demolab.com/?user={your-username})](https://git.io/streak-stats)
  1. Paste the markdown into your README.md file.

  2. Customize the image by adding query parameters to the URL. For example, to change the theme:

[![GitHub Streak](https://streak-stats.demolab.com/?user={your-username}&theme=dark)](https://git.io/streak-stats)

For more customization options, refer to the project's documentation on GitHub.

Competitor Comparisons

:zap: Dynamically generated stats for your github readmes

Pros of github-readme-stats

  • Offers a wider range of statistics, including top languages, GitHub trophies, and wakatime stats
  • Provides more customization options for colors, themes, and layout
  • Supports private repositories in addition to public ones

Cons of github-readme-stats

  • May be slower to load due to the larger amount of data it processes
  • Can be more complex to set up and configure for specific use cases
  • Requires more frequent updates to maintain compatibility with GitHub's API changes

Code Comparison

github-readme-stats:

[![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats)

github-readme-streak-stats:

[![GitHub Streak](https://streak-stats.demolab.com?user=DenverCoder1)](https://git.io/streak-stats)

Both repositories provide easy-to-use markdown snippets for embedding statistics in GitHub profiles. github-readme-stats offers more comprehensive statistics in a single image, while github-readme-streak-stats focuses specifically on contribution streaks.

github-readme-stats is more versatile and feature-rich, making it suitable for users who want to showcase a wide range of GitHub activities. On the other hand, github-readme-streak-stats is more focused and lightweight, ideal for those who prioritize displaying their contribution consistency.

13,603

📊 An infographics generator with 30+ plugins and 300+ options to display stats about your GitHub account and render them as SVG, Markdown, PDF or JSON!

Pros of metrics

  • Offers a wide range of customizable metrics and visualizations
  • Supports plugins for extended functionality
  • Provides comprehensive GitHub activity insights beyond just streak stats

Cons of metrics

  • More complex setup and configuration process
  • Higher resource usage due to its extensive features
  • May require more frequent updates to maintain compatibility

Code Comparison

metrics:

- uses: lowlighter/metrics@latest
  with:
    token: ${{ secrets.METRICS_TOKEN }}
    config_timezone: America/New_York
    plugin_isocalendar: yes

github-readme-streak-stats:

<img src="https://github-readme-streak-stats.herokuapp.com/?user=DenverCoder1" alt="GitHub Streak" />

The metrics project offers a more comprehensive and customizable approach to displaying GitHub statistics, while github-readme-streak-stats focuses specifically on contribution streaks with a simpler implementation. metrics requires more configuration but provides a wider range of data visualization options. github-readme-streak-stats is easier to set up and use, but has a more limited scope in terms of the information it displays.

🏆 Add dynamically generated GitHub Stat Trophies on your readme

Pros of github-profile-trophy

  • Offers a wider range of achievements and metrics, including stars, commits, and pull requests
  • Provides a visually appealing trophy case layout
  • Allows customization of trophy appearance and layout

Cons of github-profile-trophy

  • May be more complex to set up and customize
  • Could be overwhelming for users with fewer GitHub contributions
  • Limited to displaying only predefined trophy types

Code Comparison

github-profile-trophy:

[![trophy](https://github-profile-trophy.vercel.app/?username=ryo-ma)](https://github.com/ryo-ma/github-profile-trophy)

github-readme-streak-stats:

[![GitHub Streak](https://streak-stats.demolab.com?user=DenverCoder1)](https://git.io/streak-stats)

Both repositories provide easy-to-use markdown snippets for embedding in GitHub profiles. github-profile-trophy offers more customization options through URL parameters, while github-readme-streak-stats focuses on a specific metric (contribution streak) with a simpler implementation.

github-readme-streak-stats excels in providing a clear, focused view of a user's contribution streak, making it ideal for developers who prioritize consistent activity. On the other hand, github-profile-trophy offers a broader overview of a user's GitHub achievements, which may be more suitable for showcasing diverse contributions and milestones.

It counts how many times your GitHub profile has been viewed. Free cloud micro-service.

Pros of github-profile-views-counter

  • Tracks and displays the number of profile views, providing insights into profile visibility
  • Offers customizable badges with different styles and colors
  • Supports multiple programming languages for easy integration

Cons of github-profile-views-counter

  • Limited to tracking profile views, while github-readme-streak-stats offers more comprehensive GitHub activity statistics
  • May require more setup and configuration compared to the straightforward implementation of github-readme-streak-stats
  • Less focus on motivating continuous GitHub activity and contributions

Code Comparison

github-profile-views-counter:

![Profile views](https://komarev.com/ghpvc/?username=yourusername&style=flat-square)

github-readme-streak-stats:

[![GitHub Streak](https://streak-stats.demolab.com/?user=yourusername)](https://git.io/streak-stats)

Both repositories provide easy-to-use markdown snippets for adding badges to GitHub profiles. github-profile-views-counter focuses on displaying view counts, while github-readme-streak-stats showcases contribution streaks and statistics. The choice between the two depends on the specific information a user wants to highlight on their profile.

Better GitHub statistics images for your profile, with stats from private repos too

Pros of github-stats

  • Provides a wider range of GitHub statistics, including top languages, commit activity, and star history
  • Offers more customization options for the generated images
  • Includes a feature to generate a "skyline" 3D contribution graph

Cons of github-stats

  • Requires more setup and configuration compared to github-readme-streak-stats
  • May have slower generation times due to the complexity of the statistics
  • Less focused on the specific "streak" metric, which some users prefer

Code Comparison

github-stats:

def get_stats(username):
    user = g.get_user(username)
    repos = user.get_repos()
    languages = Counter()
    for repo in repos:
        languages.update(repo.get_languages())

github-readme-streak-stats:

function getContributionDates($contributions) {
    $dates = [];
    foreach ($contributions as $contribution) {
        $dates[] = $contribution->date;
    }
    return $dates;
}

Both repositories provide GitHub statistics for user profiles, but they focus on different aspects. github-stats offers a broader range of statistics and customization options, while github-readme-streak-stats specializes in tracking contribution streaks. The choice between the two depends on the specific needs of the user and the desired level of detail in their GitHub profile statistics.

A tool to generate your github summary card for profile README

Pros of github-profile-summary-cards

  • Offers a wider variety of statistics and visualizations, including language usage, commit activity, and issue/PR counts
  • Provides multiple card styles and themes for customization
  • Supports generating cards for organizations as well as individual users

Cons of github-profile-summary-cards

  • More complex setup process, requiring personal access token and GitHub Actions
  • May take longer to generate and update due to the broader range of data it collects
  • Less focused on continuous contribution streaks, which is the primary feature of github-readme-streak-stats

Code Comparison

github-profile-summary-cards:

- name: GitHub-Profile-Summary-Cards
  uses: vn7n24fzkq/github-profile-summary-cards@release
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  with:
    USERNAME: ${{ github.repository_owner }}

github-readme-streak-stats:

[![GitHub Streak](https://streak-stats.demolab.com?user=DenverCoder1)](https://git.io/streak-stats)

The github-profile-summary-cards requires a GitHub Action setup, while github-readme-streak-stats can be implemented with a single line of markdown in the README file.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Github Readme Streak Stats

Display your total contributions, current streak,
and longest streak on your GitHub profile README

⚡ Quick setup

  1. Copy-paste the markdown below into your GitHub profile README
  2. Replace the value after ?user= with your GitHub username
[![GitHub Streak](https://streak-stats.demolab.com/?user=DenverCoder1)](https://git.io/streak-stats)
  1. Star the repo 😄

Next Steps

Deploy to Heroku Deploy to Vercel

⚙ Demo Site

Here you can customize your Streak Stats card with a live preview.

https://streak-stats.demolab.com

Demo Site

🔧 Options

The user field is the only required option. All other fields are optional.

If the theme parameter is specified, any color customizations specified will be applied on top of the theme, overriding the theme's values.

ParameterDetailsExample
userGitHub username to show stats forDenverCoder1
themeThe theme to apply (Default: default)dark, radical, etc. 🎨➜
hide_borderMake the border transparent (Default: false)true or false
border_radiusSet the roundness of the edges (Default: 4.5)Number 0 (sharp corners) to 248 (ellipse)
backgroundBackground color (eg. f2f2f2, 35,d22,00f)hex code without #, css color, or gradient in the form angle,start_color,...,end_color
borderBorder colorhex code without # or css color
strokeStroke line color between sectionshex code without # or css color
ringColor of the ring around the current streakhex code without # or css color
fireColor of the fire in the ringhex code without # or css color
currStreakNumCurrent streak numberhex code without # or css color
sideNumsTotal and longest streak numbershex code without # or css color
currStreakLabelCurrent streak labelhex code without # or css color
sideLabelsTotal and longest streak labelshex code without # or css color
datesDate range text colorhex code without # or css color
excludeDaysLabelExcluded days of the week text colorhex code without # or css color
date_formatDate format pattern or empty for locale formatSee note below on 📅 Date Formats
localeLocale for labels and numbers (Default: en)ISO 639-1 code - See 🗪 Locales
typeOutput format (Default: svg)Current options: svg, png or json
modeStreak mode (Default: daily)daily (contribute daily) or weekly (contribute once per Sun-Sat week)
exclude_daysList of days of the week to exclude from streaksComma-separated list of day abbreviations (Sun, Mon, Tue, Wed, Thu, Fri, Sat) e.g. Sun,Sat
disable_animationsDisable SVG animations (Default: false)true or false
card_widthWidth of the card in pixels (Default: 495)Positive integer, minimum width is 100px per column
card_heightHeight of the card in pixels (Default: 195)Positive integer, minimum height is 170px
hide_total_contributionsHide the total contributions (Default: false)true or false
hide_current_streakHide the current streak (Default: false)true or false
hide_longest_streakHide the longest streak (Default: false)true or false
starting_yearStarting year of contributionsInteger, must be 2005 or later, eg. 2017. By default, your account creation year is used.

🖌 Themes

To enable a theme, append &theme= followed by the theme name to the end of the source URL:

[![GitHub Streak](https://streak-stats.demolab.com/?user=DenverCoder1&theme=dark)](https://git.io/streak-stats)
ThemePreview
defaultdefault
darkdark
highcontrasthighcontrast
More themes!🎨 See a list of all available themes

If you have come up with a new theme you'd like to share with others, please see Issue #32 for more information on how to contribute.

🗪 Locales

The following are the locales that have labels translated in Streak Stats. The locale query parameter accepts any ISO language or locale code, see here for a list of valid locales. The locale provided will be used for the date format and number format even if translations are not yet available.

en - English
English 100%
am - አማርኛ
አማርኛ 100%
ar - العربية
العربية 100%
ca - català
català 100%
ceb - Binisaya
Binisaya 100%
da - dansk
dansk 100%
de - Deutsch
Deutsch 100%
el - Ελληνικά
Ελληνικά 100%
es - español
español 100%
fil - Filipino
Filipino 100%
fr - français
français 100%
gu - ગુજરાતી
ગુજરાતી 100%
he - עברית
עברית 100%
hi - हिन्दी
हिन्दी 100%
hu - magyar
magyar 100%
id - Indonesia
Indonesia 100%
it - italiano
italiano 100%
ja - 日本語
日本語 100%
jv - Jawa
Jawa 100%
kn - ಕನ್ನಡ
ಕನ್ನಡ 100%
ko - 한국어
한국어 100%
mr - मराठी
मराठी 100%
ms - Melayu
Melayu 100%
my - မြန်မာ
မြန်မာ 100%
ne - नेपाली
नेपाली 100%
nl - Nederlands
Nederlands 100%
no - norsk
norsk 100%
pl - polski
polski 100%
ps - پښتو
پښتو 100%
pt_BR - português (Brasil)
português (Brasil) 100%
ru - русский
русский 100%
sa - संस्कृत भाषा
संस्कृत भाषा 100%
sd_PK - سنڌي (پاڪستان)
سنڌي (پاڪستان) 100%
sr - српски
српски 100%
su - Basa Sunda
Basa Sunda 100%
th - ไทย
ไทย 100%
tr - Türkçe
Türkçe 100%
uk - українська
українська 100%
ur_PK - اردو (پاکستان)
اردو (پاکستان) 100%
vi - Tiếng Việt
Tiếng Việt 100%
yo - Èdè Yorùbá
Èdè Yorùbá 100%
zh_Hans - 中文(简体)
中文(简体) 100%
zh_Hant - 中文(繁體)
中文(繁體) 100%
bg - български
български 86%
bn - বাংলা
বাংলা 86%
fa - فارسی
فارسی 86%
ht - Haitian Creole
Haitian Creole 86%
hy - հայերեն
հայերեն 86%
rw - Kinyarwanda
Kinyarwanda 86%
sv - svenska
svenska 86%
sw - Kiswahili
Kiswahili 86%
ta - தமிழ்
தமிழ் 86%

If you would like to help translate the Streak Stats cards, please see Issue #236 for more information.

📅 Date Formats

If date_format is not provided or is empty, the PHP Intl library is used to determine the date format based on the locale specified in the locale query parameter.

A custom date format can be specified by passing a string to the date_format parameter.

The required format is to use format string characters from PHP's date function with brackets around the part representing the year.

When the contribution year is equal to the current year, the characters in brackets will be omitted.

Examples:

Date FormatResult
d F[, Y]
"2020-04-14" => "14 April, 2020"

"2024-04-14" => "14 April"
j/n/Y
"2020-04-14" => "14/4/2020"

"2024-04-14" => "14/4/2024"
[Y.]n.j
"2020-04-14" => "2020.4.14"

"2024-04-14" => "4.14"
M j[, Y]
"2020-04-14" => "Apr 14, 2020"

"2024-04-14" => "Apr 14"

Example

[![GitHub Streak](https://streak-stats.demolab.com/?user=denvercoder1&currStreakNum=2FD3EB&fire=pink&sideLabels=F00&date_format=[Y.]n.j)](https://git.io/streak-stats)

ℹ️ How these stats are calculated

This tool uses the contribution graphs on your GitHub profile to calculate which days you have contributed.

To include contributions in private repositories, turn on the setting for "Private contributions" from the dropdown menu above the contribution graph on your profile page.

Contributions include commits, pull requests, and issues that you create in standalone repositories.

The longest streak is the highest number of consecutive days on which you have made at least one contribution.

The current streak is the number of consecutive days ending with the current day on which you have made at least one contribution. If you have made a contribution today, it will be counted towards the current streak, however, if you have not made a contribution today, the streak will only count days before today so that your streak will not be zero.

[!NOTE]
You may need to wait up to 24 hours for new contributions to show up (Learn how contributions are counted)

📤 Deploying it on your own

It is preferable to host the files on your own server and it takes less than 2 minutes to set up.

Doing this can lead to better uptime and more control over customization (you can modify the code for your usage).

You can deploy the PHP files on any website server with PHP installed including Heroku and Vercel.

The Inkscape dependency is required for PNG rendering, as well as Segoe UI font for the intended rendering. If using Heroku, the buildpacks will install these for you automatically.

Deploy to Vercel

Vercel is the recommended option for hosting the files since it is free and easy to set up. Watch the video below or expand the instructions to learn how to deploy to Vercel.

[!NOTE]
PNG mode is not supported since Inkscape will not be installed but the default SVG mode will work.

📺 Click here for a video tutorial on how to self-host on Vercel

Instructions for deploying to Vercel (Free)

Step-by-step instructions for deploying to Vercel

Option 1: Deploy to Vercel quickly with the Deploy button (recommended)

  1. Click the Deploy button below

Deploy with Vercel

  1. Create your repository by filling in a Repository Name and clicking "Create"
  2. Visit this link to create a new Personal Access Token (no scopes required)
  3. Scroll to the bottom and click "Generate token"
  4. Add the token as a Config Var with the key TOKEN:

vercel environment variables

  1. Click "Deploy" at the end of the form
  2. Once the app is deployed, click the screenshot of your app or continue to the dashboard to find your domain to use in place of streak-stats.demolab.com

deployment

⚠️ Note If you receive an error related to libssl or Node 20.x, you can fix this by opening your Vercel project settings and changing the Node.js version to 18.x.

image

Option 2: Deploy to Vercel manually

  1. Sign in to Vercel or create a new account at https://vercel.com
  2. Use the following command to clone the repository: git clone https://github.com/DenverCoder1/github-readme-streak-stats.git. If you plan to make changes, you can also fork the repository and clone your fork instead. If you do not have Git installed, you can download it from https://git-scm.com/downloads.
  3. Navigate to the cloned repository's directory using the command cd github-readme-streak-stats
  4. Switch to the "vercel" branch using the command git checkout vercel
  5. Make sure you have the Vercel CLI (Command Line Interface) installed on your system. If not, you can download it from https://vercel.com/download.
  6. Run the command vercel and follow the prompts to link your Vercel account and choose a project name
  7. After successful deployment, your app will be available at <project-name>.vercel.app
  8. Open this link to create a new Personal Access Token on GitHub. You don't need to select any scopes for the token.
  9. Scroll to the bottom of the page and click on "Generate token"
  10. Visit the Vercel dashboard at https://vercel.com/dashboard and select your project. Then, click on "Settings" and choose "Environment Variables".
  11. Add a new environment variable with the key TOKEN and the value as the token you generated in step 9, then save your changes
  12. To apply the new environment variable, you need to redeploy the app. Run vercel --prod to deploy the app to production.

image

⚠️ Note
To set up automatic Vercel deployments from GitHub, make sure to turn off "Include source files outside of the Root Directory" in the General settings and use vercel as the production branch in the Git settings.

⚠️ Note
If you receive an error related to libssl or Node 20.x, you can fix this by opening your Vercel project settings and changing the Node.js version to 18.x.

image

Deploy on Heroku

Heroku is another great option for hosting the files. All features are supported on Heroku and it is where the default domain is hosted. Heroku is not free, however, and you will need to pay between $5 and $7 per month to keep the app running. Expand the instructions below to learn how to deploy to Heroku.

Instructions for deploying to Heroku (Paid)

Step-by-step instructions for deploying to Heroku

  1. Sign in to Heroku or create a new account at https://heroku.com
  2. Visit this link to create a new Personal Access Token (no scopes required)
  3. Scroll to the bottom and click "Generate token"
  4. Click the Deploy button below

Deploy to Heroku

  1. Add the token as a Config Var with the key TOKEN:

heroku config variables

  1. Click "Deploy App" at the end of the form
  2. Once the app is deployed, you can use <your-app-name>.herokuapp.com in place of streak-stats.demolab.com

Deploy on your own

You can transfer the files to any webserver using FTP or other means, then refer to CONTRIBUTING.md for installation steps.

🤗 Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request if you have a way to improve this project.

Make sure your request is meaningful and you have tested the app locally before submitting a pull request.

Refer to CONTRIBUTING.md for more details on contributing, installing requirements, and running the application.

🙋‍♂️ Support

💙 If you like this project, give it a ⭐ and share it with friends!

Youtube Sponsor with Github

☕ Buy me a coffee


Made with ❤️ and PHP

Powered by Heroku