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

tether-md

v0.2.0

Published

Anchored comments for Markdown that AI agents act on, but never apply. The `tether` CLI: comment, suggest, accept/reject, and export a byte-identical clean document.

Readme

tether-md — the tether CLI

The thin, stable, file-only contract surface over @tether-md/kernel. The editor and the agent skill never talk to each other: both only touch the .md, and the agent touches it through this CLI.

Commands

| Command | Effect | |---|---| | tether export <file> | Print the clean document. Clean-export IS P. | | tether project <file> | Print the full projection (clean, offsetMap, store, markers) as JSON. | | tether status <file> | One-glance summary: counts by status and author, pending proposals, anchor health. --json for the machine shape; --check exits 4 when any anchor is orphaned/needs-review (CI gate). | | tether edit <file> --quote "old" --to "new" | Replace a unique prose span with new text (clean-space; preserves the comment layer). | | tether comment list <file> | Print each store record joined with its resolved anchor + any proposal, as JSON. Filter with --status s[,s] (repeatable), --author a, --kind k. | | tether comment add <file> --quote "TEXT" --body "…" [...] | Insert a comment anchored to the unique occurrence of TEXT (or --start N --end M). | | tether comment suggest <file> <id> --to "new" | Suggestion mode: attach a proposed rewrite of the comment's span (prose unchanged until accepted). | | tether comment diff <file> <id> | Preview a proposal: comment body, then - currently-anchored text / + proposal. When the span has drifted from the recorded quote, this shows exactly what accept will refuse on. | | tether comment accept <file> <id> | Apply a comment's proposal to its span, then remove the comment (no artifact). | | tether comment reject <file> <id> | Discard a comment's proposal + the comment. | | tether comment resolve <file> <id> | Mark a comment resolved (status only; keeps the marker). | | tether comment remove <file> <id> | Delete a comment (marker + record). | | tether mcp | Run the MCP stdio server (agent-safe tools only; see below). | | tether init [dir] [--skill] | Set up a project for agents: .mcp.json (project-scoped MCP server) + an AGENTS.md contract note; --skill also installs the Claude Code skill into .claude/skills/. Idempotent: merges into existing files, never overwrites user content. | | tether --help / --version | Usage / version. |

All mutating commands are non-destructive by default: they print the new document; pass --write to edit in place.

comment add options: --quote "text" (anchor to the unique occurrence) or --start N --end M (explicit clean-space UTF-16 span); --trust fact\|interpretation (default fact), --kind comment (the only authorable kind; gate findings are emitted by the gate), --author human\|agent\|gate (default human), --write, --json.

Prefer --quote: it's how an agent works (in text, not offsets). Explicit --start/--end offsets are clean-space UTF-16 code units and must land on character boundaries. tether edit is the safe way to change prose: editing the raw .md directly trips over the comment markers interleaved through it.

--json envelopes (scripting)

edit, suggest, accept, reject, resolve, remove accept --json: with --write, success prints one line {"ok":true,"action":…,"id":…,"file":…} to stdout (the human stderr note is kept); without --write, {"ok":true,"action":…,"id":…,"raw":…} where raw is the would-be document. init --json prints {"ok":true,"action":"init","results":[{path, action, note?}]}. Whenever --json was passed, any error prints one line {"ok":false,"error":{"code":<exit code>,"message":…}} to stderr; exit codes unchanged.

Exit codes (contract)

| Code | Meaning | |---|---| | 0 | success | | 1 | usage error (bad/missing arguments) | | 2 | store error — malformed store block (the kernel hard-failed) | | 3 | IO error (file not found / unreadable / unwritable) | | 4 | check failed (status --check: an anchor is orphaned or needs-review) |

These are stable so agents and CI can branch on them.

MCP server

tether mcp serves the comment surface to any MCP-capable agent over stdio (server name tether-md). The quick path is tether init in your project, which registers it in .mcp.json for you. By hand, for Claude Code:

claude mcp add tether -- tether mcp

Generic mcpServers config:

{
  "mcpServers": {
    "tether": { "command": "tether", "args": ["mcp"] }
  }
}

| Tool | Effect | |---|---| | tether_list {file} | Comment list JSON (same shape as comment list). | | tether_status {file} | Status JSON (same shape as status --json). | | tether_diff {file, id} | Proposal preview JSON (same shape as comment diff --json). | | tether_suggest {file, id, to} | Attach a proposed rewrite (writes the file). | | tether_comment {file, quote, body, trust?} | Flag something back: author is forced to agent, trust defaults to interpretation. | | tether_export {file} | The clean document text. |

The trust boundary, expressed at the tool surface: accept, reject, resolve, remove, and edit are deliberately not exposed, and the server's instructions tell connected agents to stay on this surface. Over MCP the agent can read, propose, and flag back, but never apply. Accepting or rejecting a proposal stays a human action (in the editor, or an explicit CLI call under human hands). Note the scope: an agent that also carries its own file tools can still edit the raw file; pair the server with the tether-edit skill or the AGENTS.md note from the root README so those tools honor the contract too.

Deferred

  • gate run — the verification gate is not yet wired. comment add deliberately rejects --kind gate-finding: those records require meta fields only the gate produces; the CLI authors plain comments. The gate will emit findings as anchored comments once built.

Develop

# from the repo root
npm install
npm run build      # builds @tether-md/kernel then tether-md
npm test           # kernel + cli (cli e2e drives the built binary)