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

@lastweek-work/cli

v0.2.0

Published

The lastweek agent: collects git and coding-agent evidence on your machine and sends it to your lastweek account.

Readme

lastweek

The local agent for lastweek: your timesheet, reconstructed from what you actually did. It runs on your machine and collects evidence of your work (git commits, coding-agent sessions); lastweek turns it into a draft timesheet that you review and approve.

npm install -g @lastweek-work/cli
lastweek connect <CODE> --server https://lastweek.work   # the code comes from the setup page in your account

What leaves your machine: commit subjects, timestamps and repo paths, plus short summaries of coding-agent activity. Never: diffs, file contents or prompts. Only repos in the folders you chose are read. Requires Node.js 22 or later; the background scan uses launchd on macOS.


Details for developers and power users:

Config: ~/.config/lastweek/config.json (override with LASTWEEK_CONFIG), validated on load:

{ "ingestUrl": "https://<ref>.supabase.co/functions/v1/ingest",
  "deviceToken": "<rwd_… from the web app, Devices page>",
  "repoRoots": ["~/Work"],
  "authorEmails": ["[email protected]", "[email protected]"],
  "agentEmails": ["[email protected]", "[email protected]"] }

ingestUrl/deviceToken may be omitted for --dry-run. Emails match case-insensitively.

Which commits count: yours as author, committer or Co-authored-by — and commits by a coding agent (agentEmails; the defaults above apply when the key is omitted) that were made or merged on this machine (local reflog). Agent work in temporary worktrees counts after you merge it, even once the worktree is gone; a colleague's agent commits in a shared repo never do. Add other agents' commit addresses (e.g. ChatGPT/Codex) to agentEmails.

lastweek scan                         # since the last successful scan (else 8 days)
lastweek scan 2026-10-27T00:00:00Z    # explicit since (also --since)
lastweek scan --dry-run               # print events as JSON, send nothing, don't move last_scan
  • Walks repoRoots 3 levels deep, adds every worktree. Commits are keyed on the main repo, so a commit seen from several worktrees is one event; each worktree's HEAD reflog is scanned separately.
  • Sends in chunks of 500. Exits non-zero on any failure; last_scan (~/.local/state/lastweek/last_scan, override with LASTWEEK_STATE_DIR) only advances after everything was ingested. Reruns are safe (server dedupes).

Claude Code hook

Add to ~/.claude/settings.json (merge with existing hooks). Fires on every edit and every prompt:

{ "hooks": {
    "PostToolUse": [ { "matcher": "Edit|Write|MultiEdit|NotebookEdit",
      "hooks": [ { "type": "command", "command": "lastweek log 2>/dev/null || true" } ] } ],
    "UserPromptSubmit": [
      { "hooks": [ { "type": "command", "command": "lastweek log 2>/dev/null || true" } ] } ] } }
  • Coalesced: calls of one session within 60 s extend one burst; a burst becomes one interval event (first call → last call, max 15 min) with counts per tool and up to 10 touched files (repo-relative). An hour of agent work is a handful of events and one block in the review — not 300 rows.
  • Private: only session id, timestamps, tool names and file paths are read. Prompt text and tool output are never stored or sent.
  • Never blocks Claude: no network in the hook, no config needed, always exits 0. Finished bursts go to ~/.local/state/lastweek/spool.jsonl; a detached lastweek flush sends them. Offline? They wait in the spool and go out with the next flush or scan. Errors land in ~/.local/state/lastweek/agent.log.
  • Same session as your commits: events carry the repo root (not Claude's working subfolder).

MCP server

Optional, for outcome summaries in the agent's own words. Claude Code:

claude mcp add lastweek --scope user --env LASTWEEK_AGENT_NAME=claude-code -- lastweek mcp

Cursor (~/.cursor/mcp.json):

{ "mcpServers": { "lastweek": { "command": "lastweek", "args": ["mcp"], "env": { "LASTWEEK_AGENT_NAME": "cursor" } } } }

Tools: log_activity(summary, repo?, started_at?, ended_at?), start_task(summary, repo?) → end_task(task_id?, summary?) (the time in between becomes one block). Events are spooled first, like the hook's.

Other commands

lastweek flush                       # send spooled hook/MCP events now
lastweek status                      # config, last scan, spool size, open bursts/tasks, schedule
lastweek schedule install --every 30 # macOS launchd: run `lastweek scan` every 30 min (also flushes the spool)
lastweek schedule uninstall

The schedule logs to ~/.local/state/lastweek/scan.log. It uses the Node and PATH of the shell you install it from; re-run install after switching Node versions.