npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

macusage

v0.0.2

Published

Visualize your macOS daily usage as a heatmap in the terminal

Readme


macusage reads the usage data MacOS already keeps about you and paints the last 30 days as a 24×30 heatmap: one column per day, one row per hour, each cell shaded by how long your screen was actually on.

It will not judge you for talking to Claude Code at 2 AM. 😈

No telemetry, no network, no dependencies. A single static binary that reads a local SQLite file and prints beautiful ansi blocks.

How it works

MacOS logs display activity in a SQLite database called knowledgeC.db. macusage opens it read-only, pulls every /display/isBacklit interval from the last 30 days, buckets the time into day/hour cells, and renders each cell as an ANSI true-color block — darker for idle hours, greener the longer the screen was on.

Requirements

  • A terminal that supports true-color ansi
  • MacOS (the knowledgeC.db database is MacOS-specific)

Getting started

Easiest is to just use macusage through npx:

npx macusage

[!NOTE] If you're hitting a permission denied, because macusage cannot access ~/Library/Application Support/Knowledge/knowledgeC.db, then you can use Finder to copy this .db file into a directory that macusage has access to, like your Downloads directory or /tmp. And then just run npx macusage $PATH_TO_DB_FILE

Getting started

Clone and build:

git clone https://github.com/gmegidish/macusage.git
cd macusage
make build

Then run it:

./macusage

That's it. By default it reads from ~/Library/Application Support/Knowledge/knowledgeC.db. Pass a different file if you have a copy of this file somewhere else.

Make targets

| Target | What it does | | ------------ | ------------------------------------- | | make build | Compile the macusage binary | | make run | Build and run in one step (go run .) | | make fmt | Format the source (go fmt) | | make vet | Run go vet | | make clean | Remove the built binary |

How to read it

  • Columns are days, oldest on the left, today on the right. Date labels appear every 5 columns.
  • Rows are hours of the day, 00 (midnight) at the top down to 23.
  • Color is intensity: dark means the screen was off that hour, and the green deepens toward fully-on.

License

MIT