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

simplemdg-cli

v1.0.6

Published

Unified CLI wrapper for SimpleMDG BTP operations

Downloads

537

Readme

SimpleMDG CLI

The Problem

The SimpleMDG team uses a variety of powerful tools (cf-sync, cf-explorer, cf-tail, etc.) to interact with SAP BTP Cloud Foundry environments. However, installing, updating, and remembering the commands for 10+ different packages creates a steep learning curve for new developers. Furthermore, each package requires the developer to authenticate or provide configuration repeatedly.

The Solution

simplemdg-cli (alias: mdg) is a "Smart Proxy" Meta-CLI. It acts as the single unified entry point for all SAP BTP developer operations.

  • Single Install: npm i -g simplemdg-cli gives you everything.
  • Centralized Config: It reads ~/.simplemdgrc once and injects SSO/Auth context into all sub-tools automatically.
  • Lazy Loading (Zero Overhead): Thanks to the Proxy Engine, sub-CLIs are never loaded into memory until you actually invoke their specific command. Boot time is near-instantaneous (~0.01s).

Quick Start

# Install globally
npm i -g simplemdg-cli

# Verify installation
mdg --help

Available Commands

| Command | Wrapped Package | Description | |----------------|-----------------|-------------| | mdg login | (Native) | Interactively log in and save credentials securely. | | mdg doctor | (Native) | Check if system meets all CLI requirements. | | mdg init | (Native) | Initialize a local .simplemdgrc for project-specific overrides. | | mdg config | (Native) | Manage SimpleMDG global configuration (e.g., mdg config set SAP_EMAIL xyz). | | mdg sync | @saptools/cf-sync | Sync files and CF topology. | | mdg files | @saptools/cf-files | Download default-env.json and pull container files. | | mdg explorer | @saptools/cf-explorer | Interactive read-only SSH file explorer. | | mdg tail | @saptools/cf-tail | Stream and aggregate logs from multiple CF apps. | | mdg export | @saptools/cf-export | Export CAP/CF artifacts (package.json, .cdsrc). | | mdg events | @saptools/cf-events | Inspect CF audit events and detect active SSH sessions. | | mdg trace | @saptools/cf-live-trace | Live HTTP request/response trace for CF Node.js apps. |

Note: Any arguments, flags, or subcommands you pass to the commands above are transparently proxied to the underlying tools. For example, mdg files ls ap10/my-org/space/app works exactly like saptools-cf-files ls ap10/my-org/space/app.

Configuration

SimpleMDG CLI supports both Global and Local configuration files (.simplemdgrc). Local configs override global configs.

Global Configuration

Run mdg login to interactively set your global configuration, or create a ~/.simplemdgrc JSON file in your home directory:

{
  "SAP_EMAIL": "[email protected]",
  "SAP_PASSWORD": "your-secure-password"
}

Local Configuration (Project-Specific)

Run mdg init inside your project folder to generate a local ./.simplemdgrc. This is perfect for setting environment-specific overrides (like changing spaces/orgs for a specific repo) without affecting your global settings.

Important: Always add .simplemdgrc to your project's .gitignore!

Architecture

simplemdg-cli uses a Smart Proxy Pattern:

  1. When you run mdg <command> <args>, the CLI identifies the underlying @saptools/* package.
  2. It parses your centralized ~/.simplemdgrc configuration.
  3. It spawns a child process invoking the target package's bin directly, inheriting stdio and process.env.
  4. Return codes and signals are seamlessly bubbled up to the user.

Contributing

# Install dependencies
pnpm install

# Run strict checks (ESLint, TypeScript, Vitest, CSpell)
pnpm run check

# Build
pnpm run build

👨‍💻 Author

dongtran

📄 License

MIT


Made with ❤️ to make your work life easier!