Extract SAP HANA credentials from Cloud Foundry — straight into your SQLTools config.
Stop copy-pasting credentials manually.
saptoolsconnects to CF, finds your HANA bindings, and writes your SQLTools connections — in seconds.
- 🔍 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
launchddaemon to keep cache fresh every 15 minutes - 🎯 SQLTools-ready — auto-updates
.vscode/settings.jsonwithsqltools.connections - 🌏 Multi-region — supports Singapore (AP11) and Brazil São Paulo (BR10) out of the box
- 🖥️ Spinner UX — real-time
oraprogress for every step, no silent waiting
npm install -g saptoolsSet your credentials once:
export SAP_EMAIL=your@email.com
export SAP_PASSWORD=your-passwordTip: Add these to your
~/.zshrcor~/.bashrcso they persist across sessions.
saptoolsYou'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.
| 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 |
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.
# Enable auto-sync every 15 minutes (launchd on macOS, crontab on Linux/WSL)
saptools cronjob enable
# Check sync logs
tail -f ~/.config/saptools/sync.logThe daemon runs silently and keeps your local cache up-to-date, so the CLI always loads instantly.
saptools reads credentials from environment variables only — nothing is ever stored on disk.
export SAP_EMAIL=your@email.com
export SAP_PASSWORD=your-passwordgit 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 TypeScriptMIT © dongitran