GitHub Stats 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
Copy the script into the Scriptable app.
Save it as
GitHubStatsWidget.js.
🔐 Token Setup
Generate a GitHub Personal Access Token (PAT) with:
read:userreporead:org
Store it in Scriptable’s Keychain:
🧪 Widget Parameters
Pass parameters to customize behavior:
🧍 Profile Mode:
Shows your overall GitHub stats with the night theme.
📦 Repo Mode:
<repo>,<stat>,<theme>
Shows a specific repo stat
<stat>,<theme>
Profile stats with selected theme
<repo>
Defaults to theme = auto
night
Only theme
📐 Widget Layouts
Small
Focused repo or profile stat + minimal details
Medium
Header + 5 stat lines
Large
Two-column detailed layout (up to 8 metrics)
🎨 Themes
Available values for the third parameter, For Widget stats Themes:
autolightdarkbluenightdaygraygreengitgreenindigo
For Widget heatmap Themes:
so when using parameter like, "heatmap,{heatmapThemeName}"
autolightdarkredgreenforestCalmforestCanopycyberPurplesunsetGoldnordBlueV1nordBlueV2sunsetDuskearthyWarmarcticIce
🛠 Example Use Cases
📎 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
autotheme.
📸 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
Last updated