StarMapper Badge
Add a StarMapper section to the current repo's README that shows a world map of stargazers.
Instructions
Detect OWNER/REPO from git remote:
git remote get-url originParse
OWNERandREPOfrom the URL (supports both HTTPS and SSH formats).Find the README — check for
README.mdat repo root (fallback:readme.md,README.rst).Find the insertion point — always insert the full world map block (never a badge-only inline). Best spot: just before the first
---separator, or before## Installation/## Getting Started. If none, insert before the first##section.Insert this block (with actual OWNER/REPO substituted):
<p align="center">
<a href="https://starmapper.bruniaux.com/OWNER/REPO">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://starmapper.bruniaux.com/api/map-image/OWNER/REPO?theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://starmapper.bruniaux.com/api/map-image/OWNER/REPO?theme=light" />
<img alt="StarMapper — see who stars this repo on a world map" src="https://starmapper.bruniaux.com/api/map-image/OWNER/REPO" />
</picture>
</a>
</p>
- Confirm with one line:
StarMapper added → README.md (OWNER/REPO)
Edge cases
- If StarMapper section already exists in the README: skip and say "Already present."
- If OWNER/REPO can't be parsed from remote: ask the user to provide them.
- Do not add a trailing newline mess — match the file's existing newline style.