Skip to content

GitHub Stats Widget โ€‹

License: MITBuilt with JavaScriptPlatformScriptableThemesWidget SizesiOS Widget

Track your GitHub stats โ€” commits, contributions, streaks, PRs, issues, and repo insights โ€” all beautifully displayed on your iOS home screen using Scriptable.

๐Ÿ“Œ Dynamic layouts for small, medium, and large widgets with theme support and GitHub API integration.


โš™๏ธ Features โ€‹

  • ๐Ÿ•’ Yearly commits and ๐Ÿ”ฅ streak tracking

  • ๐Ÿ“ฆ Repo-specific stats: โญ stars, ๐Ÿ‘ views, ๐Ÿงฎ total commits

  • ๐Ÿ“œ All-time contributions, PRs, and issue counts

  • ๐ŸŽจ Multiple theme presets (auto/dark/light/indigo/night/green/etc.)

  • ๐Ÿ“ Adaptive layouts for:

    • Small: condensed stat block
    • Medium: stat summary
    • Large: full grid layout
  • ๐Ÿ“ GitHub GraphQL + REST API support

  • ๐Ÿ”‘ Secure GitHub token storage using Keychain

๐Ÿงฐ Setup โ€‹

  1. Copy the script into the Scriptable app.
  2. Save it as GitHubStatsWidget.js.

๐Ÿ” Token Setup โ€‹

  1. Generate a GitHub Personal Access Token (PAT) with:

    • read:user
    • repo
    • read:org
  2. Store it in Scriptableโ€™s Keychain:

    js
    Keychain.set("github_token", "YOUR_TOKEN_HERE")

๐Ÿงช Widget Parameters โ€‹

Pass parameters to customize behavior:

๐Ÿง Profile Mode: โ€‹

text
night

Shows your overall GitHub stats with the night theme.

๐Ÿ“ฆ Repo Mode: โ€‹

text
rushhiii/Scriptable-IOSWidgets,stars,indigo
FormatDescription
<repo>,<stat>,<theme>Shows a specific repo stat
<stat>,<theme>Profile stats with selected theme
<repo>Defaults to theme = auto
nightOnly theme

๐Ÿ“ Widget Layouts โ€‹

SizeLayout Details
SmallFocused repo or profile stat + minimal details
MediumHeader + 5 stat lines
LargeTwo-column detailed layout (up to 8 metrics)

๐ŸŽจ Themes โ€‹

Available values for the third parameter,
For Widget stats Themes:

  • auto
  • light
  • dark
  • blue
  • night
  • day
  • gray
  • green
  • gitgreen
  • indigo

For Widget heatmap Themes:

so when using parameter like, "heatmap,{heatmapThemeName}"

  • auto
  • light
  • dark
  • red
  • green
  • forestCalm
  • forestCanopy
  • cyberPurple
  • sunsetGold
  • nordBlueV1
  • nordBlueV2
  • sunsetDusk
  • earthyWarm
  • arcticIce

๐Ÿ›  Example Use Cases โ€‹

text
// Shows views on a repo with indigo theme
rushhiii/Scriptable-IOSWidgets,views,indigo

// Shows 2025 commits in blue theme
commits,blue

// Shows profile stats in dark mode
night

๐Ÿ“Ž Notes โ€‹

  • All API requests use GitHubโ€™s GraphQL v4 and REST API v3.
  • Uses Keychain.get("github_token") for secure token storage.
  • Widget automatically adapts to light/dark mode when using auto theme.

๐Ÿ“ธ Screenshots โ€‹

Small Widget

Medium Widgets

Large Widget

๐Ÿ™Œ Feedback โ€‹

Have questions or want help customizing it? DM me on Instagram or email me at rushiofficial1205@gmail.com.

Widgets shouldnโ€™t be limited to timersโ€”Iโ€™d love to build tools that help you passively learn, reflect, or stay organized. If you have a unique concept in mind, Iโ€™d love to collaborate.

๐Ÿ“œ License โ€‹

This project is licensed under the MIT License.

Feel free to fork, build upon, and remix with attribution.

โ€‹

Enjoy using this widget ~ RP

Made with โค๏ธ by rushhiii for the iOS community
All widgets are open source and free to use โ€ข Share the love!