CLIs

The Akamai command-line interface (CLI) is a powerful and extensible toolkit that allows you to manage and configure Akamai's platform and products directly from the command line. With its simple package-management features, Akamai CLI makes it easy to customize your experience by installing new capabilities to meet your needs.

👍

Akamai Docker Development Environment

We've bundled several tools together, including the Akamai CLI, to make it easier for you to start testing Akamai APIs. Check out the Docker section for more information.

Install base Akamai CLI package

Akamai CLI doesn't have any dependencies and is quick to install. However, you may need an additional runtime for packages depending on the programming language they're based on. Choose your preferred installation method.

Download a binary

Download a release binary compatible with your operating system.

  • Linux and macOS. Once you download the appropriate binary for your system, make it executable, and optionally make it available in your $PATH. Run these commands:

    $ chmod +x ~/Downloads/akamai-<VERSION>-<PLATFORM>
    $ mv ~/Downloads/akamai-<VERSION>-<PLATFORM> /usr/local/bin/akamai
    
  • Windows. Once you download the appropriate binary for your system, you can execute the binary from the command line. For example:

    $ akamai.exe help
    

Install with Homebrew

You can also install Akamai CLI using the Homebrew package manager. If you haven’t used it before, check Homebrew documentation for system requirements and read the installation guide.

Run this command:

$ brew install akamai

This command compiles and globally installs the binary with all necessary dependencies.

Compile from source

To compile Akamai CLI from source, you'll need Go 1.14 or later installed.

  1. Change the working directory:

    $ cd $GOPATH
    
  2. Fetch the package:

    $ git clone github.com/akamai/cli
    
  3. Go to the package directory:

    $ cd cli
    
  4. Compile the binary:

  • For Linux, macOS, and other Unix-based systems, run: go build -o cli/main.go
  • For Windows, run: go build -o akamai.exe cli/main.go
  1. Move the akamai or akamai.exe binary so that it's available in your $PATH.

👍

Once you've installed the base CLI, you can expand functionality by installing CLI packages.

Authenticate

If you haven't already, you'll need to Create authentication credentials.

Akamai CLI packages reference an .edgerc file for EdgeGrid authentication. By default, the CLIs look for these credentials in your $HOME directory. You can override both the file location and the credentials section by passing the --edgerc or --section flags in each command.

If you need help setting up your .edgerc file, refer to Add credential to .edgerc file.

Upgrade

Unless you installed Akamai CLI with Homebrew, you can enable automatic check for updates. When you run it for the first time, the CLI asks if you want to enable automatic upgrades. If you do not agree, last-upgrade-check=ignore is set in the .akamai-cli/config file. Otherwise, if a new version is available, the CLI prompts you to download it.

Video demo

If you need some tips on getting up and running with the Akamai CLI, watch this video.


Did this page help you?