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

@draftswithea/anh

v1.0.0

Published

A CLI toolkit for developers — context extraction, SVG conversion, and project-wide renaming.

Downloads

14

Readme

anh

A zero-config CLI toolkit for developers.

npx anh --help

Commands

get-context

Extracts every source file in a folder into a single AI-ready markdown document. The output is placed in your project root with a short hash so you can generate multiple contexts without overwriting previous ones.

npx anh get-context --src src/features
npx anh get-context --src src/features --out ./docs
npx anh get-context --src src/features --include "**/*.ts" --exclude "**/*.test.ts"

Options

| Flag | Description | Default | | ---------------------- | ------------------------------------------ | ------------------ | | --src <dir> | Source directory (required) | — | | --include <patterns> | Glob patterns to include (comma-separated) | **/* | | --exclude <patterns> | Glob patterns to exclude (comma-separated) | — | | --out <dir> | Where to write the context file | . (project root) | | --title <title> | Optional document title | Context: <src> |


convert-svg

Converts SVG files to framework components. Works on a single file or an entire directory. Supports React (default), Vue, Solid, Qwik, and Svelte.

# Convert all icons in a folder to React components (one file each)
npx anh convert-svg --from src/icons --to src/icon-components

# Convert to Vue
npx anh convert-svg --from src/icons --to src/icon-components --framework vue

# Convert to a single bundle file
npx anh convert-svg --from src/icons --to src/icon-components --single-file

# Use a custom preset
npx anh convert-svg --from src/icons --to src/components --preset my-react-preset

Options

| Flag | Description | Default | | ----------------- | ------------------------------------------------- | ------- | | --from <path> | Source SVG file or directory (required) | — | | --to <dir> | Output directory (required) | — | | --framework <n> | react | vue | solid | qwik | svelte | react | | --single-file | Bundle all into one index file | false | | --preset <n> | Preset from .anh/presets/svg/<n>.md | — |

SVG Presets

Create .anh/presets/svg/my-preset.md to customize component output:

---
framework: react
---

import React from 'react';
import clsx from 'clsx';

export const {{componentName}} = ({ className, ...props }) => (
<svg {{svgAttrs}} className={clsx('icon', className)} {...props}>
{{svgInner}}
</svg>
);

Template variables: {{componentName}}, {{svgAttrs}}, {{svgInner}}


rename

Replaces one name with another across your project or within specific directories. Supports batch pairs via markdown presets and a --dry-run preview mode.

# Simple rename
npx anh rename --from frmz --to paper-js

# Scope to specific folders
npx anh rename --from frmz --to paper-js --scope src/lib,src/utils

# Only target specific file extensions
npx anh rename --from OldComp --to NewComp --ext ts,tsx

# Preview without writing
npx anh rename --from frmz --to paper-js --dry-run

# Use a preset for batch renames
npx anh rename --preset v2-migration

Options

| Flag | Description | Default | | ------------------ | -------------------------------------------- | ------------ | | --from <term> | Term to replace | — | | --to <term> | Replacement term | — | | --scope <dirs> | Comma-separated directories to target | project root | | --ext <exts> | File extensions to target (e.g. ts,tsx,js) | all files | | --preset <n> | Preset from .anh/presets/rename/<n>.md | — | | --dry-run | Preview without writing | false | | --case-sensitive | Match case-sensitively | true |

Rename Presets

Create .anh/presets/rename/my-rename.md to define batch rename pairs:

---
description: Migrate from v1 to v2 naming
---

- from: frmz
  to: paper-js

- from: OldButton
  to: PaperButton

- from: useOldHook
  to: usePaperHook

Presets

All presets live in .anh/presets/ and are written in markdown with optional YAML front-matter. This keeps them readable, version-controllable, and easy to share.

.anh/
└── presets/
    ├── svg/
    │   ├── react-with-clsx.md
    │   └── vue-with-attrs.md
    └── rename/
        ├── v2-migration.md
        └── rebrand-2024.md

Contributing a new tool

  1. Create src/commands/your-command.js
  2. Export a default registerCommand(program) function
  3. Register it in bin/anh.js by adding the path to COMMAND_MODULES
// src/commands/your-command.js
export default function register(program) {
  program
    .command("your-command")
    .description("What your command does")
    .option("--flag <value>", "Description of flag")
    .action(async (opts) => {
      // your logic
    });
}

That's it. No boilerplate, no configuration — just export and register.


Requirements

  • Node.js ≥ 18

License

MIT