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

glance-guard

v0.1.0

Published

Glance guard. Watches a running agent and stops calls that do not serve what the owner asked for. Not open source.

Downloads

19

Readme

Glance guard

Glance guard runs as a Claude Code PreToolUse hook and stops tool calls that do not serve what you actually asked for.

Five deterministic detectors, plus an optional judge, sitting between the agent and its tools. It sees every tool call before it runs.

Install and uninstall

npm i -g glance-guard
glance-guard guard install

glance-guard guard uninstall

install registers the hook in ~/.claude/settings.json. It backs the file up first, and it leaves any hook it did not write alone. uninstall removes only its own entry, and leaves the rest of your PreToolUse hooks untouched.

The hook engages on your next agent session.

Turning it off

GLANCE_DISABLE=1

Set that and the guard does nothing, for that session, without uninstalling. A guard that sees every tool call and cannot be switched off does not deserve to be installed in the first place, so the kill switch is named here rather than in a footnote.

Outbound calls

The guard makes exactly two kinds of outbound call, and nothing else:

  1. The judge call, to the model endpoint on the owner's own key.
  2. D5's registry lookup, to registry.npmjs.org or pypi.org and nowhere else, and only when a package's origin cannot be verified locally. It sends the package name, which was about to be sent to that same registry by the install itself. Results are cached under ~/.glance/registry-cache.json. Set d5_registry_check: false to disable it and run D5 fully offline, at the cost of turning every unowned install into an ask.

D1 to D4 are pure-local and make no network call at all.

No API key required

The five detectors are deterministic and run without any key. The judge is optional, it runs on your own key, and it is best-effort: if no key is configured the guard says so and carries on with the detectors alone.

The guard never blocks a call because a key is missing. A security tool that fails closed when its optional half cannot reach the network is a tool that stops your work for its own reasons.

Commands

glance-guard guard status         is the hook installed, and which build is running
glance-guard guard show           the exemptions currently granted for this project
glance-guard log                  recent near-misses (blocks and asks) for this project

glance-guard allow-write <path>   exempt a path from the self-write rule
glance-guard allow-host <host>    allow an outbound destination
glance-guard approve-tool <name>  re-baseline one tool after its definition changed

The three grant commands are yours, not the agent's. They refuse to run inside an agent session, and the guard blocks an agent that tries to invoke them through a shell. An exemption is only an exemption if a person granted it.

Licence

Free to use. The source is not open.

You may install and run this software. No other rights are granted: not redistribution, not modification, not resale. See LICENSE for the terms.