📦DenverCoder1 / github-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
⚖️ MIT#profile#profile-readme#readme#github#github-profile🌐 streak-stats.demolab.com📅 创建于 2020-10-25🔄 更新于 2026-10-29

📄 仓库 README

在 GitHub 查看 ↗
来自 GitHub 仓库自述文件 · 版权归原作者所有

Github Readme Streak Stats

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

⚡ Quick setup

Option 1: Web Deployment

  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)

Next Steps

![][hspace] [Deploy to Heroku][herokudeploy] [Deploy to Vercel][verceldeploy]

Option 2: GitHub Actions

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.

Adding a Custom Token to Repository Secrets
1. Visit [this link](https://github.com/settings/tokens/new?description=GitHub%20Readme%20Streak%20Stats) to create a new Personal Access Token (no scopes required) 2. Scroll to the bottom and click **"Generate token"** 3. Visit your profile repository settings (Secrets and Variables > Actions) `https://github.com/[YOUR USERNAME]/[YOUR USERNAME]/settings/secrets/actions` 4. Click "New Repository Secret" and create a secret with a custom name (eg. `STREAK_STATS_TOKEN`) and your token from step 2 as the value. 5. Replace `${{ secrets.GITHUB_TOKEN }}` in the yml file below with `${{ secrets.STREAK_STATS_TOKEN }}` (using the custom name you gave the secret).

1. Create the workflow file

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

2. Show the generated stats in your README

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):

  1. Create a Personal Access Token (PAT) with the repo scope.
  2. Do not use the PAT directly in the workflow file; store it in the repository's GitHub Actions secrets (Settings > Secrets and variables > Actions -> New repository secret). Give it a descriptive name, such as STREAK_STATS_TOKEN.
  3. Update your workflow file to use the token with the name you specified:
- 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 }}

Next Steps

  • Check out the Options below for available customizations.

⚙ 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.

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)

📈 近 7 天 Star 趋势

每日新增 Star(柱)与累计 Star(线)· 数据来自 GitHub

🏆 排名变化趋势

在各榜单中的排名历史(数字越小越靠前)

📋 历史上榜记录

每次快照的详细数据
日期 榜单 排名 周期新增 总 STAR