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

@f6n/copilot-usage

v0.1.2

Published

`@f6n/copilot-usage` is a drop-in wrapper for GitHub Copilot CLI that captures usage data locally while keeping your normal Copilot workflow.

Downloads

42

Readme

@f6n/copilot-usage

@f6n/copilot-usage is a drop-in wrapper for GitHub Copilot CLI that captures usage data locally while keeping your normal Copilot workflow.

Live site: https://copilot-usage.f6n.run
Repository: https://github.com/Ashwinning/copilot-usage

Copilot Usage hero

What This App Does

  • Runs native copilot with your same flags and interactive behavior
  • Installs and maintains a repo session-end hook at .github/hooks/f6n-copilot-usage.json when inside a Git repo
  • Falls back to direct latest-session capture when run outside a Git repo
  • Captures usage into local JSONL files so you can inspect usage history later
  • Supports prompt-mode fallback capture (-p / --prompt) from Copilot terminal output

No cloud service is required. Data stays on your machine.

How It Works

Copilot Usage flow

  1. You run bunx @f6n/copilot-usage (instead of copilot).
  2. In Git repos, the wrapper ensures the hook file exists in your current repository.
  3. Copilot runs normally.
  4. On session end, the hook invokes --f6n-store-session and stores usage from latest Copilot events. When not in a Git repo, the wrapper captures from latest Copilot session state directly after the run.
  5. Stored summaries are readable via --f6n-show-usage and consumable by @f6n/cli-usage.

First-Time Setup (Step by Step)

  1. Run Copilot through the wrapper:
bunx @f6n/copilot-usage
  1. Confirm hook installation in your repo:
.github/hooks/f6n-copilot-usage.json
  1. Run at least one Copilot session.

  2. View stored usage:

bunx @f6n/copilot-usage --f6n-show-usage
  1. For combined Codex + Copilot reporting:
bunx @f6n/cli-usage

Daily Usage

Interactive session:

bunx @f6n/copilot-usage

Prompt mode:

bunx @f6n/copilot-usage -p "explain this file"

Show stored data quickly:

bunx @f6n/copilot-usage --f6n-show-usage

CLI Flags

Wrapper-only flags (reserved by this tool):

| Flag | What it does | | --- | --- | | --f6n-store-session | Internal hook mode: captures latest Copilot session from local state | | --f6n-show-usage | Prints stored usage table and exits | | --f6n-state-home <path> | Overrides wrapper state directory | | --f6n-copilot-home <path> | Overrides Copilot state directory |

All non---f6n* flags are forwarded to native copilot.

What Gets Stored

Default state root:

  • Windows: %USERPROFILE%\.f6n-copilot-usage\
  • macOS: ~/Library/Application Support/f6n-copilot-usage/
  • Linux: ~/.f6n-copilot-usage/

Files:

  • usage-summaries.jsonl: captured session/prompt summaries
  • session-archive/*.events.jsonl: archived Copilot events snapshots
  • state.json: per-repo hook metadata
  • hook-debug.jsonl: capture/debug stage logs

Copilot home default used for session-state discovery:

  • $XDG_STATE_HOME/.copilot when XDG_STATE_HOME exists
  • otherwise ~/.copilot
  • overridable with --f6n-copilot-home or COPILOT_HOME

Output You Will See

The --f6n-show-usage command prints one auto-selected table:

  • sessions when activity span is under 1 day
  • daily when activity span is under 1 month
  • monthly for longer ranges

Token columns:

  • Input
  • Cached
  • Output
  • Reasoning
  • Total

Troubleshooting

  • If usage is empty, run a fresh Copilot session through the wrapper and re-check --f6n-show-usage.
  • If hook issues are suspected, inspect hook-debug.jsonl.
  • If Copilot state is in a non-default location, pass --f6n-copilot-home <path>.
  • If state should be isolated per environment, pass --f6n-state-home <path>.

Relationship to @f6n/cli-usage

  • @f6n/copilot-usage captures and persists Copilot usage
  • @f6n/cli-usage reports combined Codex + Copilot usage in one table

Companion site: https://cli-usage.f6n.run

Development

npm install
npm run build
npm run test

Run locally from source:

node dist/cli.js [copilot args...]

Links

  • Copilot usage website: https://copilot-usage.f6n.run
  • Copilot usage repository: https://github.com/Ashwinning/copilot-usage
  • f6n.run monorepo: https://github.com/Ashwinning/f6n.run