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

itamatrix

v1.4.1

Published

CLI for ITA Matrix flight search

Downloads

1,691

Readme

itamatrix

A command-line interface to ITA Matrix (Google's airfare search engine). Output auto-detects context: a TTY gets a human-readable table, a pipe gets JSON for scripting and AI agents.

See DESIGN.md for architecture and references/ROUTING_CODES.md for the ITA routing/extension code language.

Install

npx itamatrix search BOS LAX --depart 2026-08-10

Or install globally:

npm install -g itamatrix

itamatrix drives a headless Chromium (Google's anti-bot JS must run). The bundled Playwright browser is required once:

npx playwright install chromium

If it is missing, itamatrix prints this exact command.

Usage

# Round-trip
itamatrix search BOS LAX --depart 2026-08-10 --return 2026-08-17 \
  --adults 1 --cabin business --stops 1 --carriers UA,AA --limit 20

# Multi-city
itamatrix multicity \
  --leg JFK:NRT:2026-08-10 --leg NRT:SIN:2026-08-15 --leg SIN:JFK:2026-08-20

# Price calendar (lowest fare per departure date)
itamatrix calendar BOS LAX --depart-range 2026-08-01:2026-08-31 --trip-length 7

# Global: --json | --table to force output format

Each query takes 30–60 s — Matrix itself is slow server-side.

Caching

Results are cached on disk keyed by the full search spec, so a repeated query returns instantly instead of re-driving the browser. Applies to every command.

| Flag | Meaning | |------|---------| | (default) | use cache; entries are fresh for 60 minutes | | --cache-ttl <minutes> | change the freshness window (e.g. --cache-ttl 5) | | --no-cache | bypass the cache and always query live |

Cache location: $XDG_CACHE_HOME/itamatrix, falling back to ~/.cache/itamatrix. Caching is best-effort — a read/write failure degrades silently to a live query.

Agent skill

SKILL.md is a Claude Code agent skill that turns a natural-language trip request ("cheapest business-class nonstop to London on oneworld next August") into the right command plus ITA routing/extension codes, then runs the CLI.

Install it with npx skills straight from the repo:

npx skills add ekrako/itamatrix          # discovers SKILL.md
npx skills add ekrako/itamatrix -g       # install globally (user-level)

Or drop the skills/ directory into an agent's skill path manually.

The skill's Command reference section is generated from the CLI's own commander definitions, so it can't drift from the real flags:

npm run gen:skill          # regenerate after changing the CLI
npm run gen:skill:check    # CI/pre-commit: fail if the skill is stale

A core.hooksPath pre-commit hook (.githooks/pre-commit, installed by npm install's prepare step) runs the skill-drift check, typecheck, and lint:md on every commit.

Development

npm run dev -- search BOS LAX --depart 2026-08-10   # run from source
npm test                                            # vitest
npm run typecheck
npm run lint:md                                     # markdownlint-cli2
npm run build