# @sap/cf-tools

> Cloud Foundry API tools

Latest version **3.3.1** (published 2026-04-12) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @sap/cf-tools
pnpm add @sap/cf-tools
yarn add @sap/cf-tools
bun add @sap/cf-tools
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 3.3.1 |
| Published | 2026-04-12 |
| First published | 2020-08-16 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 71.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | SAP SE |
| Maintainers | sap_extncrepos |

## Links

- npm: https://www.npmjs.com/package/@sap/cf-tools
- Repository: https://github.com/sap/cloud-foundry-tools-api
- Homepage: https://github.com/sap/cloud-foundry-tools-api#readme
- Issues: https://github.com/sap-staging/cloud-foundry-tools-api.git/issues
- npm.io page: https://npm.io/package/@sap/cf-tools

## Dependencies (4)

- [url](https://npm.io/package/url.md) 0.11.4
- [lodash](https://npm.io/package/lodash.md) 4.18.1
- [comment-json](https://npm.io/package/comment-json.md) 4.2.5
- [properties-reader](https://npm.io/package/properties-reader.md) 2.3.0

## Recent versions

- 3.3.1 (latest) — 2026-04-12
- 3.3.0 — 2026-02-04
- 3.2.2 — 2024-09-16
- 3.2.0 — 2023-02-15
- 3.0.3 — 2022-06-08
- 3.0.1 — 2022-04-25
- 3.0.0 — 2022-04-18
- 2.2.0 — 2022-02-10
- 2.1.1 — 2021-12-07
- 2.0.4 — 2021-11-22
- 2.0.1 — 2021-07-01
- 2.0.0 — 2021-06-23
- 1.2.0 — 2021-06-09
- 1.1.1 — 2021-05-25
- 1.1.0 — 2021-04-05
- … 15 more at https://npm.io/package/@sap/cf-tools/versions

## README

![GitHub package.json version](https://img.shields.io/github/package-json/v/SAP/cloud-foundry-tools-api)
[![CircleCI](https://circleci.com/gh/SAP/cloud-foundry-tools-api.svg?style=svg)](https://circleci.com/gh/SAP/cloud-foundry-tools-api)
[![Coverage Status](https://coveralls.io/repos/github/SAP/cloud-foundry-tools-api/badge.svg?branch=master)](https://coveralls.io/github/SAP/cloud-foundry-tools-api?branch=master)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![REUSE status](https://api.reuse.software/badge/github.com/SAP/cloud-foundry-tools-api)](https://api.reuse.software/info/github.com/SAP/cloud-foundry-tools-api)

# Overview

This package provides a set of APIs to help you develop applications in Cloud Foundry. You can use these APIs to manage apps, service instances, orgs, spaces, and users in your environment. Mostly, this is a wrapper of the CF command line client, which runs a particular command and parses the output to the suitable JSON file. If an error or failure occurs, the runtime exception throws with relevant problem information.

## API Reference Guide

[API guide](https://sap.github.io/cloud-foundry-tools-api)

## Prerequisite

Make sure you have installed the CF CLI [v8](https://github.com/cloudfoundry/cli#downloads) tool in your environment.

## Examples of usage

Example 1

```typescript
try {
  const result = await cfLogin("https://api.cf.....com", "user", "password");
  if (result === "OK") {
    // successful
  }
} catch (e) {
  // display or/and log error
}
```

Example 2

```typescript
try {
  const spaces = await cfGetAvailableSpaces("myOrg");
  for (const space of spaces) {
    console.log("Space label is " + space.label + " guid is " + space.guid);
  }
} catch (e) {
  // display or/and log error
}
```

## Contributing

Contributing information can be found in the [CONTRIBUTING.md](CONTRIBUTING.md) file.

---
_Source: https://npm.io/package/@sap/cf-tools · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
