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

@ankimd/cli

v0.0.6

Published

Command line interface for converting Flashcard Markdown decks to and from Anki packages.

Readme

@ankimd/cli

The ankimd command. Converts Flashcard Markdown decks to and from Anki packages.

Flashcard Markdown is a plain Markdown format for flashcards that stays readable in Obsidian and in a diff. A deck is a file; a card is a ## heading and what follows it.

Install

pnpm add -g @ankimd/cli

Or run it without installing:

pnpm dlx @ankimd/cli build notes.md -o deck.apkg

Build a deck

ankimd build notes.md -o deck.apkg
ankimd build ./vault --deck French -o french.apkg

The source is a Markdown file, or a directory whose Markdown files all become one deck, read in name order. Without -o the output takes the source's name.

| Option | What it does | | ------------------- | ------------------------------------------------------------------------ | | -o, --output | Where to write the .apkg | | --deck | The Anki deck's name. Defaults to the file's # title, then to its name | | --template | A directory holding front.html, back.html and style.css | | --code-theme | dark or light, the Prism theme fenced code is coloured with | | --no-remote-media | Do not download images the deck references over http | | --remote-timeout | How long to wait for one download, in milliseconds |

Fenced code is highlighted while the deck is built, and the theme rides along in the note type's CSS. Nothing is injected into the deck to run inside Anki.

Images are looked for beside the file that references them, and downloaded when they are remote. An image that will not resolve is reported and left in the card exactly as it was written.

Read a deck back

ankimd extract deck.apkg -o notes.md

The media the deck refers to is written beside the Markdown, where the names it already carries resolve. --media-dir puts it somewhere else and points the references at it.

| Option | What it does | | ---------------- | ------------------------------------------------------- | | -o, --output | Where to write the Markdown | | --deck | The title to give the deck. Defaults to the file's name | | --media-dir | Where to write the images | | --force | Overwrite the output file if it is already there |

This reads notes and nothing else. Scheduling, review history and note identity are not in what comes out, so a deck extracted to Markdown and built back is a new deck with no reviews on it. extract refuses to write an .apkg for that reason. Edit a deck you are studying in Anki.

What survives each direction, and what does not, is in the round-trip table.

Diagnostics

Both commands write to stderr whatever a conversion had to give up: a note type with no Markdown spelling, an image that would not resolve, a tag that had to be rewritten. The format requires it. Each one names where to look: the line, when the file is where it went wrong, and the card otherwise. A quiet success on a deck that lost half its notes would be the bug, not the tidy interface.

Requirements

Node.js >= 24.

License

MIT. See LICENSE.