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

@glaicer/supercode-hashline-editing

v1.2.0

Published

OpenCode V2 plugin for capability-bound hashline read/edit operations

Downloads

618

Readme

hashline-editing

An OpenCode plugin that edits files by line number instead of search and replace.

Search and replace breaks when the same code appears twice. Plain line numbers break when an earlier edit shifts the lines below. Hashline avoids both: every read returns a [PATH#TAG] header that pins the exact version you saw, and edit checks that tag before writing anything.

[src/a.ts#A1B2]
replace 2-3
+new line two
+new line three

Operations: replace N-M, replace N, insert before N, insert after N, append. New lines are prefixed with +. One patch can cover several files — everything is validated first, then written. If the file changed on disk since your read, the tag won't match and nothing is written: read again and retry.

Install

OpenCode v2 (2.x) — version 1.0.0:

opencode plugin add @glaicer/supercode-hashline-editing

OpenCode v1 (1.x) — version 0.1.0. Add it to the plugin array of your opencode.json:

{
  "plugin": ["@glaicer/[email protected]"]
}

Restart OpenCode either way — running sessions don't pick up config changes. To uninstall, remove the plugin entry and restart again.

Options

v2 reads options from the plugins entry in the global config:

{
  "plugins": [
    {
      "package": "@glaicer/supercode-hashline-editing",
      "options": { "enforceSeenLines": true }
    }
  ]
}

v1 reads the same values from a hashline section of the config.

| option | default | meaning | | --- | --- | --- | | enforceSeenLines | true | refuse to edit lines a read never showed | | roots | [] | additional Snapshot Roots besides the project root | | maxPaths | 256 | tracked-file limit of the snapshot store | | maxVersionsPerPath | 4 | remembered versions per file | | maxTotalBytes | 67108864 | total snapshot budget in bytes | | maxTaggedReadBytes | 40960 | byte budget of one tagged text read before truncation |

roots takes absolute paths (or paths relative to the project root). Files outside the Snapshot Root can still be read natively, but edit stays unavailable there — to hashline-edit dotfiles outside the project, add their directory:

{
  "plugins": [
    {
      "package": "@glaicer/supercode-hashline-editing",
      "options": { "roots": ["/home/me/.config/opencode"] }
    }
  ]
}

Warning: edit permissions are not enforced

Hashline edit writes directly — the plugin API has no way to ask OpenCode for approval at write time. edit: ask rules won't prompt, and path-scoped edit: deny rules won't block it (measured on OpenCode 2.0.18). Only a blanket edit: deny * stops it, and only because the tool is then hidden from the model entirely. Reads are unaffected — they go through the native read tool and honor read permissions.

If you rely on edit approvals, don't use this plugin for those files. Edits are still confined to the project root and configured roots, and a stale tag still refuses to write — but that's drift protection, not an approval policy.

Differences from the native edit tools

  • Existing files only. Creating files is the native write tool's job.
  • No formatting. Hashline writes exactly the lines you sent and never runs a formatter.
  • No approval prompt. See the warning above.