zowe / zowe-cli

Zowe CLI
Eclipse Public License 2.0
108 stars 85 forks source link
cli mainframe mainframe-development mvs os390 zosmf zowe zowe-cli

Zowe CLI

codecov OpenSSF Best Practices

Zowe CLI is a command-line interface that lets you interact with the mainframe in a familiar format. Zowe CLI helps to increase overall productivity, reduce the learning curve for developing mainframe applications, and exploit the ease-of-use of off-platform tools. Zowe CLI lets you use common tools such as Integrated Development Environments (IDEs), shell commands, bash scripts, and build tools for mainframe development. Through its ecosystem of plug-ins, you can automate actions on systems such as IBM Db2, IBM CICS, and more. It provides a set of utilities and services that help developers, DevOps engineers, and more become efficient in supporting and building z/OS applications quickly.

This repository also contains the Zowe Node Client SDK. The SDK lets you leverage the underlying APIs to build applications that interface with the mainframe.


Contents


Documentation

For information about how to install, configure, and use Zowe CLI, see Zowe CLI Quick Start Documentation. For more detailed instructions, see Zowe CLI Documentation, which also includes examples and tutorials for how to contribute to Zowe CLI and develop CLI plug-ins.

Engineering design documentation is contained in the 'docs' directory in this repository. To view the Web Help for all Zowe CLI commands and contributed plug-ins, see the Zowe CLI Web Help. To view all locally accessible commands, run zowe --help-web. For more use cases and tutorials visit Medium.com/zowe.


Contribution Guidelines

The following information is critical to working with the code, running/writing/maintaining automated tests, developing consistent syntax in your plug-in, and ensuring that your plug-in integrates with Zowe CLI properly:

For more information about ... See:
General guidelines that apply to contributing to Zowe CLI and Plug-ins Contribution Guidelines
Conventions and best practices for creating packages and plug-ins for Zowe CLI Package and Plug-in Guidelines
Guidelines for contributing to Zowe SDKs SDK Guidelines
Guidelines for running tests on Zowe CLI Testing Guidelines
Guidelines for running tests on the plug-ins that you build Plug-in Testing Guidelines
Documentation that describes the features of the Imperative CLI Framework About Imperative CLI Framework
Naming CLI commands and developing syntax Command Format Standards
Versioning conventions for Zowe CLI and Plug-ins Versioning Guidelines
Miscellaneous tips for development Development Tips

Tip:


Building Zowe CLI From Source

Zowe CLI requires NPM version 8 and Cargo version 1.72.0 (or newer) to build from source. Before proceeding, check your NPM version with npm --version and if it's older than 8.x, update with npm install -g npm. To check your version of Cargo, run cargo --version. Cargo can be installed using rustup: https://rustup.rs/. To update Cargo, run the rustup update command.

For developers using Linux, the following packages are required to build Zowe CLI from source:

The first time that you download Zowe CLI from the GitHub repository, issue the following command to install the required Zowe CLI dependencies and several development tools:

npm install

To build your code changes, issue the following command:

npm run build

When you update package.json to include new dependencies, or when you pull changes that affect package.json, issue the following command to download the dependencies:

npm update

Tip:


Installing Zowe CLI From Source

From your copy of this repository, after a build, navigate to the packages/cli directory, then issue the following command to install Zowe CLI from source:

npm install -g

Notes:


Uninstalling Zowe CLI

From your local copy of this repository, issue the following command to uninstall Zowe CLI:

npm uninstall --global @zowe/cli


Configuring Zowe CLI

Zowe CLI configuration is made up of different profiles. The profiles contain the information that Zowe CLI needs to communicate with the mainframe system. For example, credentials and z/OSMF host name. If you try to use Zowe CLI functionality and you get an error message that Zowe CLI failed to load any profiles, see the zowe profiles create --help command for the group of commands that you are trying to use (if any) to initialize your configuration.

The most fundamental Zowe CLI profile is a zosmf profile. Issue the following command to understand how to create a zosmf profile in Zowe CLI:

zowe profiles create zosmf-profile --help

After you create your profile, you can confirm that the properties of your profile can connect to and communicate with your mainframe system successfully by issuing the following command:

zowe zosmf check status

For detailed information about creating service profiles, creating base profiles, or integrating with Zowe API ML, see Using Zowe CLI.

Tip:


Zowe Node Client SDK

The Zowe Node Client SDK consists of APIs that enable you to build client applications that interface with the mainframe. Use the APIs to build your own client applications or automation scripts, independent of Zowe CLI.

For information about downloading and getting started with the SDK, see the Zowe Docs. To view the Zowe Node.js SDK doc, see Zowe SDK Docs.

Tip:


Example API Usage

For example usage syntax, see the readme for each API package in this repository:


Running System Tests

In addition to Node.js, you must have a means to execute .sh (bash) scripts, which are required for running integration tests. On Windows, you can install "Git Bash" (bundled with the standard Git installation - check "Use Git and Unix Tools from Windows Command Prompt" installation option).

After downloading/installing the prerequisites, ensure that you can execute the following commands and receive success responses:

1. `node --version`
2. `npm --version`
3. On Windows: `where sh`

To run Zowe CLI system tests, you need a configured properties file with proper system information present.

A dummy properties file is present in the __tests__/__resources__/properties folder, default_properties.yaml. Using this file as a template, you should create a custom_properties.yaml file within the same directory. Git is configured to ignore all properties files in the properties folder, except for the default_properties.yaml file. If the custom_properties.yaml file cannot be found or loaded, an error with relevant details will be thrown when attempting to run tests.

You can then run the system tests by issuing the following command:

npm run test:system


IMPORTANT! Do not commit configured properties files because they contain security principles and other critical information.


Frequently Asked Questions

How can I install Zowe CLI as a root user on Mac/Linux?

What is the difference between V1 and V2?


Don't see what you're looking for? Browse questions from the community or ask your own in the Q&A section of our repo.

Project Structure and Governance

Zowe CLI is a component of the Zowe Open Mainframe Project, part of the Linux Foundation.

To learn more about how Zowe is structured and governed, see the Technical Steering Committee Structure and Governance documentation.