Generate a Hugging Face activity heatmap SVG you can embed in a GitHub README.
python3 scripts/hf_grass.py --user YOUR_HF_USERNAME --out assets/hf-grass.svgTo align daily buckets with KST midnight:
python3 scripts/hf_grass.py --user YOUR_HF_USERNAME --out assets/hf-grass.svg --tz-offset 9The SVG is generated; run the script or workflow to create it.
- Fork this repo (or copy the workflow + script into a repo you own).
- Set the repo variable
HF_USERNAME. - Embed the raw SVG(s) in your GitHub profile README:

Light:
Dark:
- Set a repository variable named
HF_USERNAME. - Run the workflow in
.github/workflows/hf-grass.yml(or wait for the schedule).
For public repos, this workflow is free on GitHub-hosted runners.
- The generator uses
https://huggingface.co/api/recent-activity. - Use
--activity-typeto filter:all,discussion,upvote, orlike. - Add
--show-legendfor a Less/More legend. - Use
--themeto switch palette/background:light(default) orgithub-dark. - Add
--plotto save a preview PNG (requiresmatplotlib). - Use
--tz-offsetto shift daily buckets (e.g.,9for KST). - Days with only upvotes/likes use a red palette.