Jul 11, 2024
A Command Line Interface (CLI) provides efficiency, automation capabilities, flexibility, remote access, resource efficiency, and opportunities for learning and skill development, making it a valuable tool for a wide range of users. With this in mind, Adobe has delivered a command line that is constantly evolving and expanding across more of its products. In this post, we will explore some of the most common use cases for using the Adobe I/O CLI.
What is Adobe I/O CLI?
Adobe I/O CLI is an open-source project based on Node.js, released as an NPM library. The tool is also known as Adobe I/O Runtime Extensible CLI or simply aio CLI and was primarily developed to use and manage Adobe I/O resources. The project includes plugins that enable various functionalities through the CLI. This plugin-based design simplifies the process for other Adobe teams to expand upon the aio-cli's foundation and introduce new functionalities for interacting with different products.
Plugins
Plugins are the cornerstone of aio CLI and constitute its versatile ecosystem. As an open-source tool, aio CLI invites contributions from the community to augment its capabilities through additional plugins.
Despite this open environment, contributors must adhere to established guidelines, patterns, and rules, ensuring consistency and facilitating comprehensive documentation. Each plugin functions as a distinct open-source project within aio CLI, possessing its own documentation and unique functionality. This modular approach fosters collaboration and empowers developers to address specific needs efficiently.
These plugins range from integrations with Adobe's various services to utilities facilitating development, testing, and deployment processes. You can explore a curated selection of these plugins on the official adobe/aio-cli page or directly in GitHub.
To better understand how this tool functions, let's review some plugins you might already use.
-
App Plugin: Perhaps the most significant plugin is used for bundling and managing what was formerly Project Firefly, now rebranded as App Builder. This plugin is essential if you use App Builder, as it facilitates creating, building, and deploying Adobe I/O Apps.
-
Adobe CloudManager Plugin: This is probably the first plugin that comes to mind for many when talking about aio-cli. This plugin is useful because it helps automate tasks and connects with CI/CD pipelines. Plus, it's handy for everyday developer tasks like checking logs, downloading logs, and managing pipeline status.
-
Adobe Events Plugin: The aio-cli-events-plugin is essential for managing Adobe I/O Events Registrations within a workspace. When working with Adobe events, using this plugin becomes necessary as it provides a suite of commands tailored specifically for handling event registrations. Users can efficiently retrieve, list, create, and delete event registrations directly from the command line interface, streamlining their workflow and ensuring seamless management of Adobe I/O Events within their workspace.
-
RDE Plugin: Rapid Development Environments (RDEs) are special setups created by Adobe to make it faster to put changes into Cloud Development spaces and check them. Unlike regular ways of doing this, like CI/CD pipelines with several rules for code security and quality, RDEs focus on speed, especially for quickly making and testing changes. Developers use RDEs to quickly put changes in place and see how they work, saving time compared to testing things out in their own local environments. Using the aio-cli plugin for RDE is how you put and handle code in RDE environments.
-
Adobe Authentication Plugin: The authentication plugin for Adobe IMS simplifies login and logout procedures using commands like auth login to obtain or generate access tokens and auth login to invalidate tokens and log out from Adobe IMS. Authentication configurations are stored as labeled sets of properties, known as Adobe IMS contexts, allowing users to manage different authentication setups individually. These configurations include properties like "env," specifying the Adobe IMS environment for authentication, and commands that offer output formatting options in HJSON (default), JSON, or YAML formats. This is used along with most other plugins to provide valid access to an environment.
Installation
The installation process is relatively straightforward, requiring just two steps:
-
Install Node: Several methods are available for installing Node.js, depending on your operating system and preferences. However, it is recommended that NVM (Node Version Manager) be used to avoid compatibility issues. Additionally, the official documentation advises against using odd Node versions. In my case, I installed NVM and then installed Node through it. You can find more details in this URL: nvm-sh
-
Install the CLI: After installing Node on your local machine, you only need to execute the following command.
npm install -g @adobe/aio-cli
And that's it. You can verify that aio-cli was successfully installed by typing the following command:
aio help
You will see a screen similar to the one below:
After aio-cli is installed, you're ready to start adding plugins to it. Although each plugin follows the same pattern, there may be slight variations from one plugin to another. That's why checking each plugin's documentation is recommended to understand how to install it. However, most of them follow the following syntax:
npm install -g aio-cli-Plugin-name
Once you install a plugin, you can delve into the documentation in its GitHub repository or check it via the terminal. This also follows a similar pattern among aio-cli plugins. You would expect a syntaxis similar to this:
aio pluginName help
Wrapping Up
Beyond offering the advantages of a regular CLI, aio-cli has been experiencing significant growth and adoption by new Adobe products. By understanding the various plugins available and how to start using aio-cli, developers can improve productivity and efficiency while working with Adobe’s vast collection of products.
Related Insights
-
-
Esteban Bustamante
Adobe Content Supply Chain
A Simple Explanation
-
Mark Kelley
Adobe GenStudio
Generative AI for the Content Supply Chain
-
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.