Skip to content

About

A lifetime clone count for any repository, in a JSON file you can badge any way you like.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

📈 clonometer

GitHub keeps your clone count for 14 days. clonometer keeps it for good.

A conveyor belt of GitHub's 14-day clone window: a new day rises in on the right every two seconds, the belt slides left, the oldest day tips off the left edge, and its count travels down to a running all-time total that ticks up and pulses

coverage MIT licence Python 3.11 or newer zero runtime dependencies OpenSSF Scorecard

clones of this repository, last seven days and all time views of this repository, last seven days and all time OpenSSF Best Practices, passing

clonometer samples GitHub's clone count every day and keeps a lifetime ledger on a branch of your repository, or mirrored to a gist for a private one. It writes a numbers file that any badge can read.

Install: store a fine-grained token as TRAFFIC_TOKEN and add oficiallyAkshay/clonometer as a step in a daily workflow, pinned to a commit.

Features

  • 🗄️ Stored on your repo. The ledger lives on a branch of your own repository, no other repo.
  • 👀 Views too. One input adds page views beside clones.
  • 🔒 Private repositories work. The gist mirror publishes a public numbers file for a badge to read.
  • 🎨 Your badge, your way. Label, colour, style and logo are yours, clonometer ships the numbers.

How it compares

oficiallyAkshay/clonometer MShawon/github-clone-count-badge jgehrcke/github-repo-stats
Lifetime clone count ✅ ✅ ✅
Lifetime view count ✅ ❌ ✅
Installation Action Copy its workflow Action
Storage Branch or gist Gist Branch
Output Numbers file One badge Reports
Token Traffic read, contents write Traffic read, gist write Traffic read, contents write

Security and limits

clonometer needs one fine-grained token scoped to your repository, Administration read and Contents write, and sends it only as a request header.

  • ❌ contacts a third-party service
  • ❌ sends telemetry
  • ❌ touches another repository
  • ❌ touches your default branch
  • ❌ follows a redirect or plain http
  • ❌ follows a symlink
  • ❌ adds a dependency

By default, clonometer counts clones only; set metrics to clones,views to add views. The ledger's home branch is badges by default; set branch to move it. By default, no gist mirror runs; set gist to turn it on; a private repository's badge only works through the mirror. Counting starts the day you install it, with up to a day of delay, and counts include bots and CI, this action's own runs included; a scheduled workflow pauses after 60 days without a commit, and a gap past 13 days loses rows.

Badges

Click a badge for its recipe; Both is the recommended shape.

This week All time Both
Clones Clones, this week Clones, all time Clones, this week and all time
Views Views, this week Views, all time Views, this week and all time

About

A lifetime clone count for any repository, in a JSON file you can badge any way you like.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages