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

emma-app-cli

v0.2.4

Published

CLI for the Emma personal finance web app

Readme

emma-app-cli

Command-line interface for the Emma personal finance app. Read your Emma budgets, transactions, spending analytics, and categories from the terminal — or hand it to an AI agent so it can pull your financial data on demand.

  • Get Emma budgets for the current period (per-category limits, spend, remaining, over-budget flags).
  • Get Emma transactions (list, search by merchant, full detail).
  • Get Emma analytics (income vs spending, budget remaining, daily allowance, spending breakdown by category or merchant).
  • Emma categories with per-category transaction counts.
  • QR-code sign in with the Emma mobile app — no manual token setup.

Why

The Emma web app and mobile app are great for browsing, but they are not scriptable. emma-app-cli is a thin, typed client for the Emma API that lets you (or an AI agent) query budgets and transactions from the command line, in CI, or from any automation that can run a Node.js script.

Install

npm install -g emma-app-cli

Or run without installing:

npx emma-app-cli --help

Requires Node.js 18+.

Quick start

  1. Sign in by scanning a QR code with the Emma mobile app:
emma login

The QR is printed in the terminal. Scan it with the Emma app's QR scanner (Account settings) and approve the login. Tokens are saved to ~/.config/emma-cli/credentials.json and refreshed automatically.

In non-terminal environments, write the QR to an image:

emma login --qr-image qr.png
  1. Explore your finances:
emma budgets                 # budgets for the current period
emma analytics               # income/spending/budget/allowance
emma analytics -b categories # spend by category
emma analytics -b merchants  # spend by merchant
emma transactions -n 20      # recent transactions
emma transactions -s Tesco   # search transactions
emma transactions <id>       # transaction detail
emma categories --counts     # categories with transaction counts

Using with an AI agent

This CLI is designed to be called by AI agents and automation. It prints plain text to stdout, takes flags for pagination and filtering, and never prompts interactively except during emma login.

Example commands an agent can run:

emma budgets                    # "What is my grocery budget this month?"
emma analytics                  # "How much have I spent this month?"
emma analytics -b categories    # "Where is my money going?"
emma transactions -n 20         # "Show my 20 most recent transactions"
emma transactions -s Tesco      # "Show me my Tesco transactions"
emma transactions <id>          # "What is this transaction?"
emma categories                 # "List my categories"

Pass a custom credentials file with --config <path> if the agent runs under a different user account.

Commands

| Command | Description | |---------|-------------| | emma login | Sign in via QR code scan with the Emma app | | emma config set | Store credentials manually | | emma budgets | Show budgets for the current period | | emma analytics | Show analytics for the current month | | emma analytics -b <categories\|merchants> | Show spending breakdown | | emma transactions | List transactions | | emma transactions <id> | Show transaction detail | | emma categories | List transaction categories |

Global option: --config <path> to use a different credentials file.

How it works

  • Reads the Emma private API at https://api.emma-app.com.
  • Stores credentials in ~/.config/emma-cli/credentials.json (mode 0600).
  • Refreshes the access token automatically before it expires.
  • The web login is a QR-code flow: a sign-in session is created, the QR (encoding emma://web-sign-in?clientId=...) is shown, and tokens are exchanged once the scan is approved.

Development

npm install
npm run dev -- --help   # run from source
npm run typecheck       # type check
npm run build           # compile to dist/

License

MIT