Installation Of 3rd Party Commands No Longer Possible

by ADMIN 54 views

Introduction

The Akamai CLI has been a powerful tool for managing and configuring Akamai products and services. One of its key features is the ability to install third-party commands, which can be used to extend the functionality of the CLI. However, recent changes to the CLI have made it no longer possible to install third-party commands. In this article, we will explore the issue, identify the cause, and discuss alternative solutions.

The Issue

The issue was first noticed when attempting to install the cli-query command from the GitHub repository https://github.com/aalquist/cli-query. The installation command was run as follows:

AKAMAI_CLI_LOG_PATH=/dev/stdout AKAMAI_LOG=debug akamai install https://github.com/aalquist/cli-query.git

However, the installation failed with the following error message:

[2025-05-02T11:36:08+02:00] DEBUG INSTALL START             command=install
[2025-05-02T11:36:08+02:00] DEBUG Installing package from repository: https://github.com/aalquist/cli-query.git command=install
Attempting to fetch package configuration from https://github.com/aalquist/cli-query.git... [FAIL]
[2025-05-02T11:36:08+02:00] ERROR Failed to read package from github: invalid response status while fetching cli.json: 404 command=install
invalid response status while fetching cli.json: 404
[2025-05-02T11:36:08+02:00] ERROR Error installing package: Package is not available. Supported packages can be found here: https://techdocs.akamai.com/home/page/products-tools-a-z command=install
[2025-05-02T11:36:08+02:00] ERROR INSTALL ERROR: Package is not available. Supported packages can be found here: https://techdocs.akamai.com/home/page/products-tools-a-z command=install

Identifying the Cause

After investigating the issue, it was discovered that the cause was a hardcoded Git repository lookup in the Akamai CLI code. Specifically, the line of code responsible for the issue was found in the command_install.go file:

https://github.com/akamai/cli/blob/5f98b044e6e1b4a8cb9b5d566790e2b68f783bb0/pkg/commands/command_install.go#L40C1-L40C86

This line of code appears to be hardcoded to only look for Git repositories within the Akamai GitHub project. This means that any third-party commands hosted on other GitHub repositories will not be recognized by the Akamai CLI.

Is This Intentional?

It is unclear whether this change was intentional or not. However, it is possible that the Akamai team may have made this change to improve security or to reduce the risk of installing malicious code.

Alternative Solutions

While the Akamai CLI is no longer able to install third-party commands, there are alternative solutions that can be used to achieve similar functionality. Some possible alternatives include:

  • Using the Akamai CLI API: The Akamai CLI API provides a programmatic interface for managing and configuring Akamai products and services. This API can be used to create custom scripts or tools that can perform similar tasks to third-party commands.
  • Using other tools: There are other tools available that can be used to manage and configure Akamai products and services. For example, the Akamai Control Center provides a web-based interface for managing Akamai products and services.
  • Creating custom commands: It is possible to create custom commands for the Akamai CLI using the Akamai CLI SDK. This SDK provides a set of APIs and tools that can be used to create custom commands.

Conclusion

Frequently Asked Questions

Q: Why is it no longer possible to install 3rd party commands? A: The Akamai CLI has been updated to only look for Git repositories within the Akamai GitHub project. This means that any third-party commands hosted on other GitHub repositories will not be recognized by the Akamai CLI.

Q: Is this change intentional? A: It is unclear whether this change was intentional or not. However, it is possible that the Akamai team may have made this change to improve security or to reduce the risk of installing malicious code.

Q: What are the alternative solutions for installing 3rd party commands? A: There are several alternative solutions that can be used to achieve similar functionality, including:

  • Using the Akamai CLI API: The Akamai CLI API provides a programmatic interface for managing and configuring Akamai products and services. This API can be used to create custom scripts or tools that can perform similar tasks to third-party commands.
  • Using other tools: There are other tools available that can be used to manage and configure Akamai products and services. For example, the Akamai Control Center provides a web-based interface for managing Akamai products and services.
  • Creating custom commands: It is possible to create custom commands for the Akamai CLI using the Akamai CLI SDK. This SDK provides a set of APIs and tools that can be used to create custom commands.

Q: How can I create custom commands for the Akamai CLI? A: To create custom commands for the Akamai CLI, you will need to use the Akamai CLI SDK. This SDK provides a set of APIs and tools that can be used to create custom commands. You will need to have a good understanding of the Akamai CLI API and the programming language you are using to create the custom command.

Q: What are the benefits of using the Akamai CLI API? A: The Akamai CLI API provides a programmatic interface for managing and configuring Akamai products and services. This API can be used to create custom scripts or tools that can perform similar tasks to third-party commands. The benefits of using the Akamai CLI API include:

  • Improved security: By using the Akamai CLI API, you can ensure that your scripts or tools are secure and do not contain any malicious code.
  • Increased flexibility: The Akamai CLI API provides a flexible interface for managing and configuring Akamai products and services. This means that you can create custom scripts or tools that can perform a wide range of tasks.
  • Reduced risk: By using the Akamai CLI API, you can reduce the risk of installing malicious code or experiencing errors due to third-party commands.

Q: How can I get started with using the Akamai CLI API? A: To get started with using the Akamai CLI API, you will need to:

  • Register for an Akamai account: You will need to register for an Akamai account in order to access the Akamai CLI API.
  • Install the Akamai CLI SDK: You will need to install the Akamai CLI SDK in order to use the Akamai CLI API.
  • Read the Akamai CLI API documentation: You will need to read the Akamai CLI API documentation in order to understand how to use the API.
  • Create a custom script or tool: You will need to create a custom script or tool using the Akamai CLI API in order to perform the tasks you need to perform.

Q: What are the system requirements for using the Akamai CLI API? A: The system requirements for using the Akamai CLI API are:

  • Operating System: The Akamai CLI API can be used on a variety of operating systems, including Windows, macOS, and Linux.
  • Programming Language: The Akamai CLI API can be used with a variety of programming languages, including Python, Java, and C++.
  • Akamai CLI SDK: The Akamai CLI SDK must be installed in order to use the Akamai CLI API.
  • Akamai account: An Akamai account must be registered in order to access the Akamai CLI API.