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 🙏

© 2025 – Pkg Stats / Ryan Hefner

mtg-tools

v0.3.11

Published

EDH/Commander tools for Magic: The Gathering

Readme

mtg-tools

EDH/Commander tools for Magic: The Gathering

Installation

npm install -g mtg-tools

What it does

This tool is meant to help rookies (like myself) create strong EDH/Commander decks through the power of automation. It utilizes EDHRec and TappedOut to find the best recommendations and the best cards suited for a commander or a commander deck. It builds a fancy HTML report at the end which will display card images and data (fetched from Scryfall).

Local DB/Cache

By using a local database (NeDB), it's possible to cache a lot of things to make most requests quicker. The Scryfall default database is saved on disk. All TappedOut deck lists are saved and cached, as well as all EDHRec commander recommendations. They all have a cache timeout, so don't worry about the data going stale!

TappedOut

This tool currently only supports TappedOut decks. I am considering adding others, but only if there's anyone asking for it.

Improving your deck

Diff

mtg-tools diff <deck-url> <comparison-url>

Example: mtg-tools d http://tappedout.net/mtg-decks/sorrynotsorry/ http://tappedout.net/mtg-decks/dominus-dreamcrusher-edition/ 

Compares two deck lists against each other. Outputting the difference in cards between the two. This way you can take your deck and compare it to competitive primer decks for instance.

Improve

mtg-tools improve <deck-url>
mtg-tools improve --help

Example: mtg-tools i http://tappedout.net/mtg-decks/sorrynotsorry/

Tries to find improvements for your current commander deck by walking through EDHRec, and the top 100 TappedOut deck lists for the same commander.

Recommend

mtg-tools recommend <commander-name>
mtg-tools recommend --help

Example: mtg-tools r "Yuriko, the Tiger's Shadow"

Tries to create a good starting point for a commander. By inputting the name (remember using quotes), you will get a recommendation based on average types used, much in the same format as mtg-tools improve.

Utility

To make your life easier when building decks there are some utility commands as well.

Card Market

mtg-tools card-market <urls...>

Example: mtg-tools m http://tappedout.net/mtg-decks/thisisadeck http://tappedout.net/mtg-decks/thisisalsoadeck http://tappedout.net/mtg-decks/thirddeck

By using your inventory and the actual card amounts in your inventory, you can create a decklist for card market, which will contain only the cards you don't currently own, so that you can simply paste them into a wants list and move on from there.

Inventory

mtg-tools inventory <file>
mtg-tools inventory --help

Example: mtg-tools e /Users/strongbad/Downloads/MyCards.csv

Imports your inventory and saves it to the local database so that you can create reports with information about whether or not you have the recommended card or not. It's therefore also possible to use mtg-tools improve and mtg-tools recommend with the --inventory flag which will then only use cards you already have.

Login

mtg-tools login

Saves your TappedOut login information (thinly hashed) to the local database/cache. This is only security by obscurity and I do recommend you don't use this if you feel your information is sensitive. If you're lazy like me it can be nice to not have to log in every time you want to use your private deck lists.

It is of course better then to use the tool below.

Share Links

mtg-tools share-links <urls...>

Example: mtg-tools s http://tappedout.net/mtg-decks/thisisadeck/?share=82g82343j http://tappedout.net/mtg-decks/thisisalsoadeck/?share=sklfj8g2 

It is possible to create private share links in TappedOut by clicking the Export button. If you use this link with this command, you will have the share link saved in the local database, and then you only have to use the normal deck URL in the future. You only have to do this once as long as you don't regenerate the code. This is highly more recommended to do than saving your login information.