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

@yuno-payments/dashboard-cli

v1.6.0

Published

CLI tool to manage MFEs without accessing the backoffice

Readme

Dashboard CLI

CLI tool to manage frontend and backend deployments without accessing the backoffice.

Installation

Global Installation

sudo npm install -g @yuno-payments/dashboard-cli

Local Development

npm install
npm run build
npm link

Configuration

Prerequisites

  • Node.js 16+
  • Git repository (must be run from within a git repository)
  • GitHub CLI (gh) authenticated — run gh auth login if needed
  • Valid Kingdom credentials

Login

dashboard login

You will be prompted for your username and password. The CLI will:

  • Store your credentials securely in ~/.dashboard-cli/config.json
  • Automatically obtain and cache authentication tokens
  • Refresh tokens automatically when they expire

Other Auth Commands

# Check login status and token expiration
dashboard status

# Logout and clear credentials
dashboard logout

Usage

Deploy

The CLI auto-detects whether the current repo is a frontend (MFE) or backend (microservice) by searching Kingdom. If found in both, it prompts you to choose.

# Deploy to an environment (auto-detects frontend/backend)
dashboard deploy dev
dashboard deploy stg
dashboard deploy prod

Frontend Options

# Deploy and publish to import map
dashboard deploy dev --publish
dashboard deploy dev -p

# Deploy using package.json version as tag
dashboard deploy stg --tag
dashboard deploy stg -t

# Both options
dashboard deploy prod -p -t
  • --publish / -p: Updates the import map after deployment so the new version is immediately available.
  • --tag / -t: Uses the remote package.json version as deployment version instead of the current branch name.

Backend Options

# Deploy with explicit service name and version
dashboard deploy stg -s payment-ms -v v1.2.3

# Watch deployment until completion
dashboard deploy dev --watch

# Deploy to multiple environments
dashboard deploy all-stg
dashboard deploy all-prod --watch
  • -s, --service <name>: Service name (defaults to current directory name).
  • -v, --version <version>: Version to deploy (defaults to latest tag on main/master, or branch name).
  • -w, --watch: Watch deployment status until completion.

Frontend environments: dev, stg, prod Backend environments: dev, stg, mena-stg, sb, prod, mena-prod, all-stg, all-prod

Publish (frontend only)

Publishes an MFE to the import map without creating a new deployment. Only works from a frontend repo.

dashboard publish dev
dashboard publish stg
dashboard publish prod

Run (local development)

Starts your local dev server and sets an import map override in Chrome so the dashboard points to your local MFE. No authentication required.

# Start dev server + apply override on dev dashboard
dashboard run dev

# Same for staging
dashboard run stg

# Override port auto-detection
dashboard run dev --port 9005
  • Auto-detects port from package.json scripts (--port flag in start/dev scripts)
  • Runs npm run <env> (e.g. npm run dev), falls back to npm run start if the env script doesn't exist
  • Waits for localhost:<port> to be ready before applying the override
  • On Ctrl+C: removes the override from Chrome and kills the server

Prerequisite: Chrome must have "Allow JavaScript from Apple Events" enabled (View > Developer > Allow JavaScript from Apple Events). macOS only.

--prod-data (dev only)

Runs your current MFE alongside dashboard-authentication-mfe and dashboard-api-mfe with prod Auth0 credentials, so you can authenticate and work with real production data locally.

dashboard run dev --prod-data

This will:

  1. Discover companion MFE paths (prompts interactively the first time, then caches in config)
  2. Warn if companion MFEs are not on master/main
  3. Ensure dashboard-authentication-mfe/.env has prod Auth0 values (AUTH0_DOMAIN_PROD, AUTH0_CLIENT_ID_PROD)
  4. Start npm run prod for auth-mfe and api-mfe (piped output with [auth]/[api] prefixes)
  5. Start npm run dev for the current MFE (main process with full stdio)
  6. Wait for all 3 ports to be ready in parallel
  7. Apply all 3 import map overrides to dashboard.dev.y.uno in a single batch
  8. On Ctrl+C: remove all overrides and kill all processes

Only works with the dev environment. Running dashboard run stg --prod-data will error.

Config

set-mfe-path

Manually set the local path for a companion MFE (used by --prod-data). Paths are stored in ~/.dashboard-cli/config.json.

dashboard config set-mfe-path dashboard-authentication-mfe /path/to/dashboard-authentication-mfe
dashboard config set-mfe-path dashboard-api-mfe /path/to/dashboard-api-mfe

This is optional — --prod-data will prompt you interactively the first time if paths are not configured.

Stop

Removes the import map override from Chrome without starting a server.

dashboard stop dev
dashboard stop stg

Versions

Show deployed versions across environments. Auto-detects frontend/backend.

# Auto-detect from current directory
dashboard versions

# Explicit service name
dashboard versions dashboard-payments-mfe
dashboard versions payment-ms

# All services from a directory
dashboard versions --all --path /path/to/services

# Filter by environment
dashboard versions --env prod
dashboard versions payment-ms --env stg

How It Works

Service Type Detection

When you run deploy, versions, or publish, the CLI:

  1. Derives a name from package.json (frontend) and the directory name (backend)
  2. Searches both Kingdom endpoints (frontend + microservice) in parallel
  3. Routes to the correct flow automatically
  4. If found in both, prompts you to choose

Frontend Deployment

  1. Reads package.json from the current directory for the MFE name (strips @yuno/ or @yuno-payments/ prefix)
  2. Gets the current git branch and the remote repository from git
  3. Fetches bundle_version from the remote package.json via GitHub API (gh)
  4. Searches for the MFE in Kingdom API
  5. Creates a deployment with MFE ID, environment ID, version, and bundle version
  6. Monitors deployment status every 30 seconds (max 10 minutes)
  7. If --publish: updates the import map with the new version

Backend Deployment

  1. Resolves service name from directory name (or --service flag)
  2. Resolves version from latest git tag on main/master, or current branch name (or --version flag)
  3. Searches for the microservice in Kingdom API
  4. Creates deployments for each target environment
  5. If --watch: monitors deployment status until completion
  6. Confirms before deploying to production environments

Troubleshooting

"No credentials found"

Run dashboard login to authenticate.

"GitHub CLI is not authenticated"

Run gh auth login to authenticate with GitHub.

"package.json not found"

Make sure you're running the command from the root of your MFE project.

"Current directory is not a git repository"

The CLI requires the project to be a git repository.

"Service not found in Kingdom"

The CLI searches both frontend and backend APIs. Verify the name matches what's registered in Kingdom.

Development

npm install
npm run build
npm run dev deploy dev