A focused monorepo for SAP BTP Cloud Foundry tooling.
Utilities in this repository are designed to make SAP BTP Cloud Foundry workflows easier to automate, easier to script, and easier to reuse across local developer tools.
This repository is organized as a monorepo under packages/.
| Package | Purpose | npm |
|---|---|---|
@saptools/cf-sync |
Sync region → org → space → app from SAP BTP CF into ~/.saptools/cf-structure.json |
|
@saptools/cf-xsuaa |
Fetch XSUAA credentials and cached OAuth2 tokens for any CF app | |
@saptools/cf-debugger |
Open an SSH debug tunnel to any CF Node.js app from your terminal | |
@saptools/cf-explorer |
Explore deployed CF app files with safe, read-only SSH workflows | |
@saptools/cf-inspector |
Capture breakpoints, logpoints, and expression results from CF Node.js apps via CDP | |
@saptools/cf-live-trace |
Inject a runtime HTTP trace hook into CF Node.js apps and stream request/response events from the CLI | |
@saptools/cf-logs |
Fetch, stream, parse, and redact SAP BTP CF app logs from one CLI and typed Node.js API | |
@saptools/cf-tail |
Tail every CF app in a space at once: parallel snapshots, multiplexed live stream, chronological merge, and cross-app filters | |
@saptools/bruno |
Smart runner for Bruno collections with CF-aware env metadata and automatic XSUAA token injection | |
@saptools/sqltools |
Export SAP HANA service bindings (VCAP_SERVICES) into VS Code SQLTools connections | |
@saptools/cf-hana |
Run SQL (SELECT/DML/DDL) against SAP HANA Cloud databases bound to a CF app by region/org/space/app selector | |
@saptools/sharepoint-excel |
Create, read, append, and update SharePoint-hosted Excel workbooks with app-only Microsoft Graph access | |
@saptools/gitport |
Port a GitLab source MR into a destination Draft MR with sequential cherry-picks | |
@saptools/jira |
Jira Cloud CLI and typed API that reuse the JiraOps OAuth token store |
Reads the CF topology once, so every downstream tool can skip the cf target dance.
- 🌍 SAP BTP CF region discovery
- 🏢 org / space / app traversal
- 💾 structured JSON output for local tooling
- 🛠️ both a CLI and a reusable TypeScript API
Docs → packages/cf-sync/README.md
Turns explicit CF app coordinates into a usable bearer token.
- 🔑 zero-config OAuth2
client_credentialsfrom the app's XSUAA binding - 🌍 region-key based CF API resolution via
@saptools/cf-sync - 💾 disk-cached tokens with automatic expiry handling
- 🧩 CLI (
cf-xsuaa get-token-cached ...) and ergonomic Node API
Docs → packages/cf-xsuaa/README.md
Open an SSH debug tunnel to any Cloud Foundry Node.js app from your terminal — no IDE required.
- 🚇
cf ssh-based tunnel to the app's Node inspector - 🔁 session lifecycle handling (start, wait, cleanup)
- 🧰 CLI-first, usable from any shell or editor
Docs → packages/cf-debugger/README.md
Explore deployed Cloud Foundry app containers without opening a manual SSH shell.
- 🔎 read-only
roots,ls,find,grep, andview - ⚡ reusable SSH-backed sessions for repeated inspection
- 🧭 file/line candidates for scripts, agents, and debugging tools
Docs → packages/cf-explorer/README.md
Drive Node.js inspector sessions over the Chrome DevTools Protocol from CLI or TypeScript.
- 🎯 breakpoint snapshots with conditional captures
- 📡 non-pausing logpoints and expression evaluation
- 🔁 automatic CF tunnel composition via
@saptools/cf-debugger
Docs → packages/cf-inspector/README.md
Injects a bounded HTTP trace hook into a running CF Node.js app, then streams request/response events from a plain CLI.
- 🚇 robust CF SSH tunnel setup for a selected app instance
- 🧠 Node inspector startup via
/procprocess discovery andSIGUSR1 - 📡 runtime
http/httpsrequest capture with body preview limits and NDJSON output
Docs → packages/cf-live-trace/README.md
Turn raw CF logs into a reusable engine — snapshot, stream, parse, and persist without coupling to any IDE.
- 📥 recent snapshots and live streams with batched reconnect
- 🧠 normalized rows from JSON, plain text, and router access logs
- 🔐 credential redaction plus a bounded, atomic local store
Docs → packages/cf-logs/README.md
Tail every started app in a CF space at once. A higher-level orchestrator built on top of cf-logs.
- 🚀 parallel snapshots and a multiplexed live stream across every matching app
- 🧬 chronological row merge with
appNametagging and per-app coloring - 🎯 strong selection (
--apps,--include-regex,--exclude-regex) and row filters (level, search, source, tenant, status, time) - 🔁 auto-rediscovery of new/stopped apps for long-running streams
- 📊
summaryanderrorsshortcuts for whole-space triage
Docs → packages/cf-tail/README.md
Runs Bruno collections against XSUAA-protected CF services with zero token juggling.
- 🏗️ interactive
setup-appscaffolds a CF-aware folder tree with seeded__cf_*metadata - 🧭 shorthand
region/org/space/apppath resolution - 🔐 automatic XSUAA token injection via
@saptools/cf-xsuaa - 🎯 pin a default CF context with
use, then run with zero args
Docs → packages/bruno/README.md
Exports SAP HANA service bindings from VCAP_SERVICES into VS Code SQLTools connections — from a file, stdin, or a live CF app.
- 📦 parse VCAP_SERVICES JSON and extract HANA credentials
- 🔌 write
.vscode/settings.jsonwithsqltools.connectionsready to use - ☁️
from-apppulls VCAP directly from a running CF app via@saptools/cf-sync - 🔁 merge mode preserves existing unrelated connections
Docs → packages/sqltools/README.md
Runs SQL straight against the SAP HANA Cloud database bound to a CF app — pass only a region/org/space/app selector and query.
- 🎯 selector-based connect; credentials resolved automatically via
@saptools/cf-sync - ⚡ pooled connections and cache-first credentials for fast repeat queries
- 🛡️ parameterized queries, transactions, read-only mode, and a destructive-statement guard
- 🧭 table/column introspection, query-builder shorthands, and a
cf-hanaCLI
Docs → packages/cf-hana/README.md
Automates SharePoint-hosted .xlsx files without relying on delegated-only Graph workbook APIs.
- 🔐 local profiles with OS credential-vault secret storage by default
- 🆕 create workbooks without overwriting existing SharePoint files
- ➕ append JSON records, update A1 cells, add sheets, and read sheets/ranges
- 🛡️ ETag-protected uploads to avoid silently replacing concurrent edits
Docs → packages/sharepoint-excel/README.md
Ports one GitLab source MR into another repository as a Draft MR, preserving review context for clean ports and incoming auto-resolved conflicts.
- 🔗 source MR URL input, including GitLab tab URLs like
/diffs - 🍒 sequential
git cherry-pick -xreplay into a destination branch - 📝 Draft MR creation with conflict excerpts for review
Docs → packages/gitport/README.md
Turns the JiraOps OAuth session into a scriptable Jira Cloud CLI and TypeScript API.
- 🔁 shared
~/.jira-oauth/tokens.jsontoken store with JiraOps andjira-oauth-client - 🎫 assigned issue reads, issue details, remote links, transitions, and worklogs
- 📝 issue description, summary, and comment writes with raw ADF retrieval for image-safe round-trip edits
- 🧪 fake-backed E2E tests that avoid real Atlassian network calls
Docs → packages/jira/README.md
The workspace uses:
pnpmfor package managementturbofor task orchestration- TypeScript + ESLint across packages
Common root commands:
pnpm install
pnpm build
pnpm typecheck
pnpm test:unit
pnpm test:e2eRun a command for one package only:
pnpm --filter @saptools/cf-sync build
pnpm --filter @saptools/cf-sync test:unit.
├── packages/
│ ├── cf-sync/
│ ├── cf-xsuaa/
│ ├── cf-debugger/
│ ├── cf-explorer/
│ ├── cf-inspector/
│ ├── cf-live-trace/
│ ├── cf-logs/
│ ├── cf-tail/
│ ├── bruno/
│ ├── sqltools/
│ ├── cf-hana/
│ ├── sharepoint-excel/
│ ├── gitport/
│ └── jira/
├── package.json
├── pnpm-workspace.yaml
└── turbo.json
dongtran ✨
MIT
Made with ❤️ to make your work life easier!