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

agentsmap

v0.1.2

Published

CLI tool for the AGENTS.map specification — discover, validate, and resolve AGENTS.md instruction files.

Downloads

281

Readme

agentsmap

CLI tool for the AGENTS.map specification — discover, validate, and resolve AGENTS.md instruction files.

Install

npm install -g agentsmap

Or run directly with npx:

npx agentsmap init

Commands

agentsmap init

Scan your repo for AGENTS.md files and generate an AGENTS.map.md at the root.

agentsmap init

Interactive by default — prompts you for each file's purpose. Use --non-interactive to auto-infer purposes from file contents:

agentsmap init --non-interactive

Include AGENTS.md files from installed dependencies:

agentsmap init --deps

agentsmap validate

Check that your AGENTS.map.md is valid: all listed paths exist, required fields are present, no duplicates, no path traversal.

agentsmap validate

Use this in CI to catch stale entries:

# .github/workflows/agents-map.yml
- run: npx agentsmap validate

Exits with code 1 on errors. Warnings (like unlisted AGENTS.md files) don't fail the check.

agentsmap resolve <path>

Show which AGENTS.md files apply to a given path, ranked by priority then specificity.

agentsmap resolve src/services/payments/checkout.ts

Use --tag to find entries by domain instead of path:

agentsmap resolve --tag frontend
agentsmap resolve --tag backend,compliance

Use --json for machine-readable output:

agentsmap resolve src/payments/checkout.ts --json

agentsmap discover

Find all AGENTS.md files in your repo and show whether they're listed in the map.

agentsmap discover

Include dependencies:

agentsmap discover --deps

Output shows listed files with + and unlisted with ?, along with suggested purposes.

Programmatic API

You can import the parser, resolver, and validator directly:

import { parseMarkdown } from "agentsmap/parser";
import { resolveEntries } from "agentsmap/resolver";
import { validate } from "agentsmap/validator";

const map = parseMarkdown(markdownContent);
const matches = resolveEntries(map, "src/payments/checkout.ts");
const result = validate(map, "/path/to/repo");

How it works

AGENTS.map.md is a plain Markdown file at your repo root that indexes all AGENTS.md files:

# AGENTS.map

## Entries

- Path: /AGENTS.md
  - Purpose: Global repo conventions.
  - Applies to: /**

- Path: /services/payments/AGENTS.md
  - Purpose: PCI rules, Stripe patterns.
  - Applies to: /services/payments/**
  - Priority: critical
  - Owners: @payments-team
  - Tags: backend, compliance

Entries can also reference dependencies:

- Path: /node_modules/@acme/ui/AGENTS.md
  - Purpose: Acme UI component conventions, theming, a11y.
  - Applies to: /src/components/**
  - Tags: frontend

When an agent enters your repo, it reads this file, matches entries by glob pattern, and loads the most specific instructions. If the map is missing or stale, agents fall back to scanning — nothing breaks.

Full spec: spec/v1.md

License

MIT