Skip to content

SAP/cf-cli-defaultenv-plugin

DefaultEnv CF CLI Plugin

This Cloud Foundry CLI plugin is designed to support local development of multi-target applications (MTAs) in Cloud Foundry. The default-env command creates a local default-env.json file containing the environment variables of a specified Cloud Foundry application. These variables typically include connection details for bound Cloud Foundry services such as SAP HANA HDI Containers, XSUAA (User Account and Authentication), and intra-MTA destinations defined in the mta.yaml file. The environment variables written to default-env.json include VCAP_APPLICATION, VCAP_SERVICES and destinations. The default-env.json file is used by @sap/approuter and @sap/hdi-deploy when running locally and it's also possible to use default-env.json from your own Node.js applications via @sap/xsenv as follows:

const xsenv = require("@sap/xsenv");
xsenv.loadEnv();

Requirements

Installed CloudFoundry CLI - Ensure that CloudFoundry CLI is installed and working. For more information on installing CloudFoundry CLI, please refer to the official CloudFoundry documentation.

Download and Installation

Check if you have a previous version installed by running cf plugins. If the DefaultEnv plugin is already installed, you need to uninstall it first and then to install the new version. You can uninstall the plugin by running cf uninstall-plugin DefaultEnv.

CF Community Plugin Repository

This version of the DefaultEnv CF CLI plugin is not yet available in the CF community repository.

Manual Installation

You can install any version of the plugin by manually downloading it from the releases page and installing the binaries for your specific operating system.

The latest version of the plugin can be downloaded from the project's releases page. Download the plugin for your platform (Darwin, Linux, Windows) and install it using the following command:

cf install-plugin <path-to-the-binary> -f

or from URL:

cf install-plugin https://github.com/SAP/cf-cli-defaultenv-plugin/releases/download/latest/DefaultEnv.osx

Note

If you are running on a Unix-based system, you may need to make the plugin executable before installing it. To do this, run:

chmod +x <path-to-the-plugin>

Usage

The DefaultEnv CF plugin supports the following commands:

Command Name Command Description
default-env Create default-env.json file with environment variables of an app. Usage cf default-env myapp

For more information, see the command help output available via cf [command] --help or cf help [command].

Support, Feedback, Contributing

This project is open to feature requests/suggestions, bug reports etc. via GitHub issues. Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our Contribution Guidelines.

Security / Disclosure

If you find any bug that may be a security problem, please follow our instructions at in our security policy on how to report it. Please do not create GitHub issues for security-related doubts or problems.

Code of Conduct

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its Code of Conduct at all times.

Licensing

Copyright 2024 SAP SE or an SAP affiliate company and cf-cli-defaultenv-plugin contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.

About

A Cloud Foundry CLI plugin to create a default-env.json file from the Cloud Foundry Environment.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages