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

saptools

v0.4.2

Published

Extract SAP HANA credentials from Cloud Foundry environments for SQL tools

Downloads

1,028

Readme

⚡ saptools

Extract SAP HANA credentials from Cloud Foundry — straight into your SQLTools config.

npm version npm downloads License: MIT Node.js TypeScript Tests

Stop copy-pasting credentials manually.
saptools connects to CF, finds your HANA bindings, and writes your SQLTools connections — in seconds.


✨ Features

  • 🔍 Interactive extraction — guided prompts to pick region → org → space → apps
  • Local cache — orgs and apps are cached locally; subsequent runs are near-instant even with 30+ apps
  • 🔄 Background sync — run a launchd daemon to keep cache fresh every 15 minutes
  • 🎯 SQLTools-ready — auto-updates .vscode/settings.json with sqltools.connections
  • 🌏 Multi-region — supports Singapore (AP11) and Brazil São Paulo (BR10) out of the box
  • 🖥️ Spinner UX — real-time ora progress for every step, no silent waiting

📦 Installation

npm install -g saptools

Set your credentials once:

export [email protected]
export SAP_PASSWORD=your-password

Tip: Add these to your ~/.zshrc or ~/.bashrc so they persist across sessions.


🚀 Quick Start

saptools

You'll be guided through an interactive menu:

? What would you like to do?
❯ 🔍 Extract to SQLTools Config
  🔄 Refresh Data Cache (Sync All)

Pick Extract, select your region, org, space, and apps — done. Your .vscode/settings.json is updated automatically.


🛠️ Commands

| Command | Description | |---|---| | saptools | Launch interactive mode | | saptools sync | Manually sync all regions to local cache | | saptools cronjob enable | Install background sync daemon (launchd on macOS) | | saptools cronjob disable | Remove background sync daemon | | saptools cronjob status | Check daemon status |


⚙️ How It Works

saptools
   ↓
Interactive menu → Select region, org, space, apps
   ↓
CF API  →  VCAP_SERVICES  →  Extract HANA credentials
   ↓
Write  →  .vscode/settings.json (sqltools.connections)
          ~/.config/saptools/output.json

Cache architecture: On first run, orgs and app lists are fetched from CF and stored in ~/.config/saptools/cache.json. Subsequent runs read from cache — making selection near-instant. Run saptools sync or enable the background daemon to keep cache fresh.


🔄 Background Sync

# Enable auto-sync every 15 minutes (launchd on macOS, crontab on Linux/WSL)
saptools cronjob enable

# Check sync logs
tail -f ~/.config/saptools/sync.log

The daemon runs silently and keeps your local cache up-to-date, so the CLI always loads instantly.


🔐 Credentials

saptools reads credentials from environment variables only — nothing is ever stored on disk.

export [email protected]
export SAP_PASSWORD=your-password

🧪 Development

git clone https://github.com/dongitran/saptools
cd saptools
npm install

npm run check    # typecheck + lint + spell + tests
npm run test     # unit tests with coverage
npm run build    # compile TypeScript

📄 License

MIT © dongitran