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

atrix-agent

v0.2.0

Published

Local file-format conversion agent for Atrix. Raw data never leaves the computer.

Readme

atrix-agent

Converts a lab's annotation files to NWB, BIDS, EDF+, CSV or JSON on the lab's own computer, using the same format code as the Atrix app. An AI agent plans the hard parts: odd column names, which annotation file goes with which recording, and subject/session/task in messy file names.

Install

Requires Node 20+. No install needed:

npx atrix-agent convert ./study-data

Or install once and use the atrix command:

npm install -g atrix-agent
atrix convert ./study-data

From a checkout of this repo: cd agent && npm install (builds dist/), then npx atrix --help.

Usage

export ANTHROPIC_API_KEY=...             # your own key (or OPENAI_API_KEY)
atrix convert ./study-data               # NWB (default), AI-planned
atrix convert ./study-data --to bids     # one BIDS dataset in atrix-out/bids
atrix convert ./study-data --dry-run     # plan and print, write nothing
atrix convert ./study-data --no-ai       # offline: BIDS names + standard columns only

Options: --to nwb|bids|edf|csv|json, --out <dir> (default <folder>/atrix-out), --model <id> (or $ATRIX_MODEL; see below), --tz <IANA zone> (or $ATRIX_TZ; see below).

Bring your own API key

The AI planner runs on your own account with the provider of your choice. Set one key in the environment:

| Key | Talks to | Default model | |---|---|---| | ANTHROPIC_API_KEY | Anthropic API directly | claude-opus-5-5 | | OPENAI_API_KEY | OpenAI API directly | gpt-5-mini | | AI_GATEWAY_API_KEY | Vercel AI Gateway (any provider/model id) | openai/gpt-5-mini |

With more than one key set, Anthropic is used first, then OpenAI, then the gateway. --model anthropic/claude-sonnet-5-5 or --model openai/gpt-5-mini picks a provider and model explicitly; a bare id such as --model claude-haiku-5-5 goes to whichever provider's key is set. With no key, the tool falls back to offline heuristics and says so.

The tool scans <folder> recursively for recordings (EDF/BDF, BrainVision .vhdr + .vmrk, NWB) and annotation files (*_events.tsv, CSV, EDF+ annotations, including those embedded in an EDF+ recording, and Atrix-style JSON). It pairs each annotation file with a recording by BIDS entities, file name, folder and recording start time. Session start comes from the recording header. Outputs go to atrix-out/, and sources are never modified. A summary table is printed at the end.

Recording timezone

EDF/BDF and BrainVision headers store the recording's local date and time with no zone. The tool needs a zone to turn that into an instant, and takes it from, in order:

  1. a BIDS *_scans.tsv in the recording's session or subject folder with an acq_time for that file (ISO 8601; with Z or an offset it is exact, without one it is local time at the recording site, read in the zone below);
  2. --tz America/New_York or ATRIX_TZ=America/New_York (any IANA zone name);
  3. this machine's zone, with a one-line note in the output when a header time was used that way.

NWB files carry a zoned session_start_time, so none of this applies to them. Zone conversion is done with the platform's own Intl data; nothing is downloaded.

Without a key, or with --no-ai, files whose columns aren't standard (onset, duration, trial_type, ..., ignoring case and units such as Onset (s)) are skipped and listed as such.

Privacy

Conversion always runs locally. With AI on, the tool sends requests to the provider whose key you set (Anthropic, OpenAI, or Vercel AI Gateway), under your own account and their data terms. The model only receives aliased file names, header metadata (format, start time, duration, channel names, sample rate; not the patient/recording ID fields), column names, and at most 10 sample rows per table. Signal data and whole files are never sent. This is enforced in src/privacy.ts: every tool result passes a guard that rejects more than 10 rows or an oversized payload, and recordings can't be previewed at all. The tool prints a one-line notice when the agent starts.

File names are aliased before they reach the model (src/alias.ts), because lab file names often carry patient names, initials or MRNs. The rule: folder depth, delimiters and the extension are kept; BIDS entities (sub-, ses-, task-, run-, acq-), dates (2026-03-12, 20260312, 12-MAR-2026) and format words (events, ieeg, ...) stay in the clear because the model needs them to pair files; every other name token becomes n<K>, the same alias for the same token wherever it appears. So patients/DOE_JANE_MRN4471902_2026-03-12_rest.csv is sent as n1/n2_n3_n4_2026-03-12_n5.csv, and the matching .edf as n1/n2_n3_n4_2026-03-12_n5.edf. The map lives only in memory for the run; paths the model sends back are mapped to real files locally (an alias it made up is a tool error), the person at the terminal sees real names in questions and in the results table, and real names typed in an answer are aliased again before they go back. --dry-run prints the alias table so a lab can check what the model would see.

Sample rows are sent as they are, so a free-text column with names in it would still reach the model; keep those out of the first ten rows or convert with --no-ai.