Display your total contributions, current streak,
and longest streak on your GitHub profile README
?user= with your GitHub username[](https://git.io/streak-stats)
Check out the Demo Site or Options below for available customizations.
It is recommended to self-host the project more better reliability. See Deploying it on your own for more details.
![][hspace] [][herokudeploy] [
][verceldeploy]
GitHub Actions can generate a static SVG in your profile repository so your README does not depend on the public hosted endpoint. If you need private contribution data, add a custom token to Repository Secrets using the steps below.
Create a folder in your repo named .github and within it a folder named workflows and add a file /.github/workflows/streak-stats.yml in your profile repo (USERNAME/USERNAME):
name: Update streak stats
on:
schedule:
- cron: "0 3 * * *" # Run every day at 03:00
push:
paths:
- ".github/workflows/streak-stats.yml" # Run any time this file is modified
workflow_dispatch: # Run manually from the Actions tab
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7
- name: Generate streak stats
uses: DenverCoder1/github-readme-streak-stats@v1
with:
options: user=${{ github.repository_owner }}&theme=default&disable_animations=true
path: profile/streak.svg
- name: Commit streak stats
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add profile/streak.svg
git commit -m "Update streak stats" || exit 0
git push
Add this to your profile README.md file where you want the stats to appear:
<a href="https://git.io/streak-stats"><img src="https://raw.githubusercontent.com/DenverCoder1/github-readme-streak-stats/HEAD/./profile/streak.svg" alt="GitHub Streak" /></a>
If you are using a fork, replace DenverCoder1 with the account or organization that hosts your fork.
For private contributions, you will need a Personal Access Token (PAT):
Settings > Secrets and variables > Actions -> New repository secret). Give it a descriptive name, such as STREAK_STATS_TOKEN.- name: Generate streak stats
uses: DenverCoder1/github-readme-streak-stats@v1
with:
options: user=${{ github.repository_owner }}&theme=default&disable_animations=true
path: profile/streak.svg
token: ${{ secrets.STREAK_STATS_TOKEN }}
Here you can customize your Streak Stats card with a live preview.
https://streak-stats.demolab.com
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.
| Parameter | Details | Example |
|---|---|---|
user |
GitHub username to show stats for | DenverCoder1 |
theme |
The theme to apply (Default: default) |
dark, radical, etc. 🎨➜ |
hide_border |
Make the border transparent (Default: false) |
true or false |
border_radius |
Set the roundness of the edges (Default: 4.5) |
Number 0 (sharp corners) to 248 (ellipse) |
background |
Background color (eg. f2f2f2, 35,d22,00f) |
hex code without #, css color, or gradient in the form angle,start_color,...,end_color |
border |
Border color | hex code without # or css color |
stroke |
Stroke line color between sections | hex code without # or css color |
ring |
Color of the ring around the current streak | hex code without # or css color |
fire |
Color of the fire in the ring | hex code without # or css color |
currStreakNum |
Current streak number | hex code without # or css color |
sideNums |
Total and longest streak numbers | hex code without # or css color |
currStreakLabel |
Current streak label | hex code without # or css color |
sideLabels |
Total and longest streak labels | hex code without # or css color |
dates |
Date range text color | hex code without # or css color |
excludeDaysLabel |
Excluded days of the week text color | hex code without # or css color |
date_format |
Date format pattern or empty for locale format | See note below on 📅 Date Formats |
locale |
Locale for labels and numbers (Default: en) |
ISO 639-1 code - See 🗪 Locales |
timezone |
Timezone used to determine the current day | IANA timezone identifier, eg. Asia/Kolkata |
short_numbers |
Use short numbers (e.g. 1.5k instead of 1,500) | true or false |
type |
Output format (Default: svg) |
Current options: svg, png or json |
mode |
Streak mode (Default: daily) |
daily (contribute daily) or weekly (contribute once per Sun-Sat week) |
exclude_days |
List of days of the week to exclude from streaks | Comma-separated list of day abbreviations (Sun, Mon, Tue, Wed, Thu, Fri, Sat) e.g. Sun,Sat |
disable_animations |
Disable SVG animations (Default: false) |
true or false |
card_width |
Width of the card in pixels (Default: 495) |
Positive integer, minimum width is 100px per column |
card_height |
Height of the card in pixels (Default: 195) |
Positive integer, minimum height is 170px |
hide_total_contributions |
Hide the total contributions (Default: false) |
| 日期 | 榜单 | 排名 | 周期新增 | 总 STAR |
|---|