Developing for Zowe CLI
You can extend Zowe™ CLI by developing plug-ins and contributing code to the base Zowe CLI or existing plug-ins.
How can I contribute?
You can contribute to Zowe CLI in the following ways:
- Add new commands, options, or other improvements to the base CLI.
- Develop a plug-in that users can install to Zowe CLI.
You might want to contribute to Zowe CLI to accomplish the following:
- Provide new scriptable functionality for yourself, your organization, or to a broader community.
- Make use of Zowe CLI infrastructure (profiles and programmatic APIs).
- Participate in the Zowe CLI community space.
If you want to start working with the code immediately, check out the Zowe CLI core repository and the contribution guidelines. The zowe-cli-sample-plugin GitHub repository is a sample plug-in that adheres to the guidelines for contributing to Zowe CLI projects.
Follow these tutorials to get started working with the sample plug-in:
- Setting up - Clone the project and prepare your local environment.
- Installing a plug-in - Install the sample plug-in to Zowe CLI and run as-is.
- Extending a plug-in - Extend the sample plug-in with a new by creating a programmatic API, definition, and handler.
- Creating a new plug-in - Create a new CLI plug-in that uses Zowe CLI programmatic APIs and a diff package to compare two data sets.
- Implementing user profiles - Implement user profiles with the plug-in.
Plug-in Development Overview
A Zowe CLI plug-in will minimally contain the following:
- Programmatic API - Node.js programmatic APIs to be called by your handler or other Node.js applications.
- Command definition - The syntax definition for your command.
- Handler implementation - To invoke your programmatic API to display information in the format that you defined in the definition.
The following guidelines and documentation will assist you during development:
Imperative CLI Framework Documentation
Imperative CLI Framework documentation is a key source of information to learn about the features of Imperative CLI Framework (the code framework that you use to build plug-ins for Zowe CLI). Refer to these supplementary documents during development to learn about specific features such as:
- Auto-generated help
- JSON responses
- User profiles
- Logging, progress bars, experimental commands, and more!
The Zowe CLI contribution guidelines contain standards and conventions for developing Zowe CLI plug-ins.
The guidelines contain critical information about 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 running tests on Zowe CLI||Testing Guidelines|
|Guidelines for running tests on the plug-ins that you build||Plug-in Testing Guidelines|
|Versioning conventions for Zowe CLI and Plug-ins||Versioning Guidelines|