Project Stats Badge
Generate a shareable badge showing your repo's file breakdown. Runs locally — nothing leaves your machine until you submit the token.
1
Copy and run in your terminal
Click the green button to copy a ready-to-run command, then paste it straight into your terminal.
#!/usr/bin/env python3
"""Generate a SnipBoard stats token for your project."""
import os, json, base64
from pathlib import Path
root = Path(".").resolve()
exts = {}
for f in root.rglob("*"):
if f.is_file() and ".git" not in f.parts:
exts[f.suffix or "(none)"] = exts.get(f.suffix or "(none)", 0) + 1
stats = {
"name": root.name,
"files": sum(exts.values()),
"top": dict(sorted(exts.items(), key=lambda x: -x[1])[:5]),
}
token = base64.urlsafe_b64encode(json.dumps(stats).encode()).decode()
print(f"\nToken: {token}\n")
print("Paste this token on snipboard-app.pages.dev to generate your badge.")
Paste the copied command directly into your terminal. It runs the script above and prints a token — no file needed.
2
Paste the token and generate your badge
Copy the token from the terminal output and paste it below.
0
Files
0
Extensions
—
Top Extension