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

@benflex/whyline

v0.1.1

Published

Answer "Why does this line exist?" with conservative Git and local Codex evidence.

Readme

Whyline

Why does this line exist?

Whyline is a local-first developer tool for investigating the provenance of a current line, range, or TypeScript/JavaScript-family symbol. It combines several bounded evidence domains:

  • Git textual attribution;
  • exact Git-visible ancestry;
  • bounded correspondence between transformed declarations and their direct parent;
  • local Codex history correlation; and
  • current worktree-change correlation.

The report keeps observed facts, deterministic derivations, and conservative inference distinct. Whyline is not an authorship oracle: Git attribution is not proof of who wrote code, and a related Codex session is not automatically the cause of a commit.

Installation

The intended v0.1.1 installation is through npm:

npm install --global @benflex/whyline

Whyline requires Node.js 24 or newer and Git 2.36 or newer. v0.1.1 supports Linux and macOS. Windows is explicitly unsupported and untested for this release.

For a one-shot invocation without a global install:

npx --yes @benflex/whyline src/parser.ts:42

Usage

Run a line query from inside a Git worktree:

whyline src/parser.ts:42

The CLI accepts these forms:

whyline [--details] <file>:<line>
whyline [--details] <file>:<start>-<end>
whyline [--details] --symbol <selector> <file>
whyline --help
whyline --version

Locations are one-based. Paths may be repository-relative or absolute, but must resolve inside the current worktree. Ranges are inclusive and bounded to 200 lines. Symbol queries resolve one exact, file-scoped declaration in TypeScript/JavaScript-family files (.ts, .mts, .cts, .d.ts, .tsx, .js, .mjs, .cjs, or .jsx).

Use --details when you need bounded forensic material such as commit metadata, changed paths, relevant hunks, ancestry proof, correlation signals, and limitations. Use --help for the installed command’s concise syntax and support summary; use --version to print the installed package version.

Codex history discovery uses $CODEX_HOME when it is set; otherwise it uses the normal local ~/.codex home.

What the result means

Whyline starts with the line’s current Git state and textual last-touch attribution. When the material is sufficient, it can additionally report:

  • exact movement or copy evidence visible to Git;
  • a verified direct-parent declaration correspondence for a changed declaration, while stating that the queried line itself is not an exact ancestor match;
  • a conservative relationship to local Codex history when the evidence is strong and unambiguous; or
  • a current worktree change, with any related Codex session presented as conservative evidence rather than authorship or causation.

An ambiguous, unavailable, limited, or missing evidence domain does not invalidate a usable Git report. Whyline fails closed rather than turning proximity, timing, similar names, or weak textual overlap into a causal claim.

Deliberate limits

Whyline v0.1.1 does not claim authorship, causation, or semantic symbol identity across history. It does not search the web or a remote repository, fetch Git data, execute commands found in Codex transcripts, expose prompts or reasoning, maintain a persistent index, provide a web UI or daemon, or support Windows. A dirty or untracked line is not treated as Git-committed authorship; when current worktree material is sufficient, Whyline can correlate that change with local Codex history without claiming that an agent authored or caused it.

Codex correlation is local and optional. It depends on readable, supported local session history; disabled, deleted, rotated, inaccessible, truncated, or unsupported history remains unavailable or limited rather than guessed.

Privacy and locality

Analysis is local: Whyline has no telemetry, account, or server; it does not fetch remote Git data or perform network lookups for provenance analysis; and it keeps no persistent provenance index. Reports do not dump raw prompts, reasoning, transcripts, command output, or credentials.

Exit codes

  • 0 — analysis completed, including Git-only, ambiguous, and uncommitted results;
  • 2 — invalid input or unsupported target; and
  • 3 — operational failure, such as Git disappearing or the repository changing during analysis.

Development

npm install
npm run check
npm pack --dry-run --json

The project uses strict TypeScript, ESM, the built-in Node.js test runner, and the installed git executable through argv-only, read-only subprocesses. TypeScript remains a runtime dependency because symbol queries load its compiler API lazily.

License

Whyline is released under the MIT License.