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

mayartui

v0.2.1

Published

Terminal UI dashboard for the Mayar.id headless API.

Readme

mayartui

A terminal UI dashboard for the Mayar.id headless API. Built with OpenTUI on Bun, written in TypeScript.

┌── mayartui ───────────────────────────────────────────────────┐
│ Sat, 2 May 2026  ·  14:30:45  ●                               │
│                                                               │
│ ███╗   ███╗ █████╗ ██╗   ██╗ █████╗ ██████╗     BALANCE       │
│ ████╗ ████║██╔══██╗╚██╗ ██╔╝██╔══██╗██╔══██╗                  │
│ ██╔████╔██║███████║ ╚████╔╝ ███████║██████╔╝    Rp 12.345.678 │
│ ██║╚██╔╝██║██╔══██║  ╚██╔╝  ██╔══██║██╔══██╗                  │
│ ╚═╝     ╚═╝╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═╝   active … pending│
└────────────────────────────────────────────────── production ─┘
┌── menu ──────┐┌── list ──────────────────────┐┌── detail ────┐
│ 1 Tx Paid   ││ Andi Setiawan      Rp 250 000 ││ ID 8af33…    │
│ 2 Tx Unpaid ││ Putri Hidayat      Rp 480 000 ││ STATUS       │
│ 3 Invoices  ││ Bambang R.         Rp 125 000 ││ SUCCESS      │
│ 4 Payments  ││ Dewi Lestari        Rp 99 000 ││ AMOUNT       │
│ 5 Products  ││ Rama Wijaya        Rp 750 000 ││ Rp 250 000   │
│ 6 Customers ││                              ││ ...           │
└──────────────┘└───────────────────────────────┘└──────────────┘
 tab focus(menu) · s settings · r reload · ←/→ page · q quit

Features

  • Three-column layout — menu / list / detail.
  • Live clock with blinking indicator and a chunky ASCII balance widget in the header.
  • Resources: paid transactions, unpaid transactions, invoices, single payments, products, customers, reviews (with star ratings).
  • Theme switcher: Matrix, Mayar (brand light theme), Tokyo Night, Goblin Mode, Dracula, Synthwave, Nord, Rosé Pine.
  • Configurable loading spinner (dots, line, arrow, pulse, matrix, bounce) with a global "animations off" toggle.
  • Production / Sandbox environment toggle.
  • Persists configuration to ~/.config/mayartui/config.json (mode 0600).
  • API key can be supplied via MAYAR_API_KEY environment variable to override the saved value.

Requirements

Bun ≥ 1.1 is required at runtime. OpenTUI's native renderer ships Bun-only FFI bindings (Node.js / Deno support is in progress upstream), so mayartui runs on Bun even when installed through npm.

Install Bun once if you don't already have it:

curl -fsSL https://bun.sh/install | bash

Install

Install globally from npm:

npm install -g mayartui
mayartui

Or one-off via npx / bunx:

npx mayartui
# or
bunx mayartui

Or run from source:

git clone https://github.com/moerdowo/mayar-tui.git
cd mayar-tui
bun install
bun run start

Configuration

On first launch you'll see a setup card asking for your API key. Generate one at https://web.mayar.id/api-keys. The key is stored at ~/.config/mayartui/config.json (mode 0600).

Environment variables

| Variable | Effect | | ----------------- | ------------------------------------------ | | MAYAR_API_KEY | Overrides the saved API key for this run. | | MAYAR_ENV | production or sandbox. | | XDG_CONFIG_HOME | Standard XDG override for the config path. |

Keys

| Key | Action | | --------------- | ---------------------------------------- | | / | Move within the focused list | | Tab / S-Tab | Cycle focus between menu / list / detail | | Enter | Confirm menu selection | | 17 | Jump straight to a resource | | / | Previous / next page | | r | Reload current resource and balance | | s | Open the settings overlay | | Esc | Close settings | | q / Ctrl+C | Quit |

Programmatic use

mayartui also exposes a small library surface — useful if you want to embed the API client or mount the TUI inside another OpenTUI app:

import {
  MayarClient,
  MayarApp,
  THEMES,
  SPINNERS,
} from "mayartui";

const client = new MayarClient({
  apiKey: process.env.MAYAR_API_KEY!,
  env: "production",
});

const balance = await client.balance();
const paid = await client.paidTransactions({ page: 1, pageSize: 20 });

API endpoints used

All endpoints are documented at https://docs.mayar.id. The base URL is https://api.mayar.id/hl/v1 (production) or https://api.mayar.club/hl/v1 (sandbox). Authentication is Authorization: Bearer <api_key>.

| Method | Path | Resource | | ------ | -------------------------- | ----------------------- | | GET | /balance | account balance | | GET | /transactions | paid transactions | | GET | /transactions/unpaid | unpaid transactions | | GET | /invoice | invoices | | GET | /payment | single payment requests | | GET | /product | products | | GET | /customer | customers | | GET | /reviews | customer reviews |

Development

bun install
bun run dev          # run the TUI from source
bun run typecheck    # tsc --noEmit
bun run build        # bundle to dist/ + emit .d.ts

There is a small smoke harness in scripts/ that mounts the renderer in testing mode (no real TTY) to catch regressions:

bun run scripts/smoke.ts
bun run scripts/smoke-theme.ts
bun run scripts/smoke-settings.ts

License

MIT