{"id":22394326,"url":"https://github.com/akamai/cli","last_synced_at":"2025-05-15T07:07:47.694Z","repository":{"id":39340539,"uuid":"91621332","full_name":"akamai/cli","owner":"akamai","description":"Manage and configure Akamai from the Command Line.","archived":false,"fork":false,"pushed_at":"2025-04-29T09:55:15.000Z","size":7553,"stargazers_count":217,"open_issues_count":10,"forks_count":85,"subscribers_count":43,"default_branch":"master","last_synced_at":"2025-04-29T10:44:11.019Z","etag":null,"topics":["akamai","akamai-cli","akamai-devexp","cli","devexp","devexp-cli"],"latest_commit_sha":null,"homepage":"https://techdocs.akamai.com/developer/docs/about-clis","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akamai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-05-17T21:23:56.000Z","updated_at":"2025-04-29T09:42:31.000Z","dependencies_parsed_at":"2024-01-22T13:26:53.869Z","dependency_job_id":"8b50b6b8-8729-48d3-ac32-3ad2dfbe2851","html_url":"https://github.com/akamai/cli","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akamai%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akamai%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akamai%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akamai%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akamai","download_url":"https://codeload.github.com/akamai/cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292043,"owners_count":22046426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["akamai","akamai-cli","akamai-devexp","cli","devexp","devexp-cli"],"created_at":"2024-12-05T05:09:44.331Z","updated_at":"2025-05-15T07:07:42.684Z","avatar_url":"https://github.com/akamai.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Akamai CLI\n![Build Status](https://github.com/akamai/cli/actions/workflows/checks.yml/badge.svg)\n[![Go Report Card](https://goreportcard.com/badge/github.com/akamai/cli)](https://goreportcard.com/report/github.com/akamai/cli)\n![GitHub release](https://img.shields.io/github/v/release/akamai/cli)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![GoDoc](https://godoc.org/github.com/akamai/cli?status.svg)](https://pkg.go.dev/github.com/akamai/cli)\n\n\nUse Akamai CLI to configure Akamai platform and products directly from the command line. You can install ready-to-use product packages or build your own custom solutions to manage from CLI.\n\n### Benefits\n\n- Simple and task-oriented interface\n- Consistent user experience across all Akamai products\n- Wide range of supported packages and capabilities\n- Extend or build your own CLI packages with supported programming languages such as Go, Python, and JavaScript\n\n### Available Packages\n\nBrowse the list of [available packages](https://developer.akamai.com/cli).\n\n## Install Akamai CLI\n\nAkamai 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 are based on.\n\nInstall Akamai CLI by downloading a [release binary](https://github.com/akamai/cli/releases). See instructions for various operating systems.\n\nYou can also use [Homebrew](#install-with-homebrew), [Docker](#install-with-docker), or compile from [source](#compile-from-source).\n\n### System dependencies for Python-based packages\n\nIf you're using a Python-based CLI package, install these extra dependencies:\n\n- Python 3.3 or above\n- [Python 3 `pip` package installer](https://pip.pypa.io/en/stable/installation)\n- [Python 3 `venv` module](https://docs.python.org/3/library/venv.html)\n- Up-to-date common CA certificates for your operating system (PEM files)\n\n### Install from binaries\n\nFollow the instructions for your operating system.\n\n#### Linux and macOS\n\nOnce you download the appropriate binary for your system, make it executable, and optionally make it available in your `$PATH`. Run the following commands:\n\n```sh\n$ chmod +x ~/Downloads/akamai-\u003cVERSION\u003e-\u003cPLATFORM\u003e\n$ mv ~/Downloads/akamai-\u003cVERSION\u003e-\u003cPLATFORM\u003e /usr/local/bin/akamai\n```\n\n#### Windows\n\nOnce you download the appropriate binary for your system, simply execute the binary from the command line. For example:\n\n```sh\n$ akamai.exe help\n```\n\n### Install with Homebrew\n\nYou can also install Akamai CLI using the Homebrew package manager. If you haven’t used it before, check [Homebrew documentation](https://docs.brew.sh/Installation) for system requirements and read the installation guide.\n\nOnce set up, simply run:\n\n```sh\n$ brew install akamai\n```\n\nThis command compiles and globally installs the binary with all necessary dependencies.\n\n### Install with Docker\n\nA container with Akamai CLI and pre-installed public packages is also available in [Docker](http://docker.com).\nAll images are built using Docker files from the [akamai-docker](https://github.com/akamai/akamai-docker) repository.\nYou can find all Akamai builds on [Docker Hub](https://hub.docker.com/u/akamai).\n\nTo start, create and run the container with Akamai Development Environment:\n\n```sh\n$ docker run -it -v $HOME/.edgerc:/root/.edgerc:ro akamai/shell\n```\n\n\u003e **Note:** This mounts your local `$HOME/.edgerc` into the container. To change the local path, modify the `-v` argument.\n\nThe `akamai` command and basic packages are already installed. See the [akamai-docker](https://github.com/akamai/akamai-docker) repository for more details.\n\nIf you want to open Akamai Development Environment when calling the `akamai` command, add the following line to your `.bashrc`, `.bash_profile`, or `.zshrc` files:\n\n```sh\nalias akamai='docker run -it -v $HOME/.edgerc:/root/.edgerc:ro akamai/shell'\n```\n\nIf you want to use a local `.akamai-cli` directory to configure and manage your installed packages, modify the `-v` argument:\n\n```sh\n$ docker run -it -v $HOME/.akamai-cli:/cli/.akamai-cli akamai/shell\n```\n\nThis command installs the CLI and persists the configuration and packages in `$HOME/.akamai-docker` directory.\n\n### Compile from Source\n\n**Prerequisite:** Make sure you install Go 1.22 or later.\n\nTo compile Akamai CLI from source:\n\n1. Change the working directory:\n\n    ```sh\n    $ cd $GOPATH\n    ```\n\n2. Fetch the package:\n\n    ```sh\n    $ git clone github.com/akamai/cli\n    ```\n\n3.  Go to the package directory:\n\n    ```sh\n    $ cd cli\n    ```\n\n4. Compile the binary:  \n\n  - For Linux, macOS, and other Unix-based systems, run: `go build -o akamai cli/main.go`\n  - For Windows, run: `go build -o akamai.exe cli/main.go`\n\n5. Move the `akamai` or `akamai.exe` binary so that it's available in your `$PATH`.\n\n### API credentials\n\nAkamai-branded packages use a `.edgerc` file for standard EdgeGrid authentication. By default, CLI looks for credentials in your `$HOME` directory.\n\nYou can override both the file location or the credentials section by passing the `--edgerc` or `--section` flags to each command.\n\nTo set up your `.edgerc` file, see [Get started with APIs](https://developer.akamai.com/api/getting-started#setup).\n\n## Upgrade\n\nUnless you installed Akamai CLI with Homebrew, you can enable automatic check for updates when you run Akamai CLI v0.3.0 or later for the first time.\n\nWhen run for the first time, CLI asks you to enable automatic upgrades. If you do not agree, `last-upgrade-check=ignore` is set in the `.akamai-cli/config` file (this option will still allow you to perform manual upgrade as explained below). Otherwise, if a new version is available, CLI prompts you to download it. Akamai CLI automatically checks the new version's `SHA256` signature to verify it is not corrupt. After the update, your original command executes using the new version.\n\nFor information on manual upgrade and the supported Homebrew command, see `akamai upgrade` in [Built-in commands](#built-in-commands).\n\n## How to use Akamai CLI\n\nAll CLI commands start with the `akamai` binary, followed by a command, and optionally an action or other arguments.\n\n```sh\nakamai [global flags] [command] [action] [arguments...]\n```\n\n### Global flags\n\nUse following flags to modify the Akamai CLI behaviour or get additional information:\n\n- `--edgerc value, -e value`\n\n    `akamai --edgerc ~/.edgerc2 ...` enables to use different configuration file than default `~/.edgerc` (in this case `~/.edgerc2`)\n\n- `--section value, -s value`\n\n  `akamai --section cps ...` enables to use different section in configuration file than default `default` (in this case `cps`)\n\n- `--accountkey value, --account-key value`\n\n  `akamai --accountkey 1-ABCD:Z-XYZ ...` enables to use account switch key (in this case `1-ABCD:Z-XYZ`)\n\n- `--help`\n\n  `akamai --help` shows basic usage info and available commands\n\n- `--bash`\n\n  `akamai --bash` shows help on using auto-complete with bash\n\n- `--zsh`\n\n  `akamai --zsh` shows help on using auto-complete with zsh\n\n- `--proxy value`\n\n  `akamai --proxy http://example.com:8080 ...` sets a proxy to use (in this case `http://example.com:8080`)\n\n- `--version`\n\n  `akamai --version` shows version number of currently installed Akamai CLI\n\n### Built-in commands\n\nUse the following commands to manage packages and the toolkit:\n\n- `help`\n\n    `akamai help` shows basic usage info and available commands. To learn more about a specific command, run `akamai help \u003ccommand\u003e [sub-command]`.\n\n- `list`\n\n    `akamai list` shows a list of available commands. If a command doesn't display, ensure the binary is executable and in your `$PATH`.\n\n- `install`\n\n    This installs new packages from a git repository.\n\n    `akamai install \u003cpackage name or repository URL\u003e` downloads and installs the command repository to the `$HOME/.akamai-cli` directory.\n\n    For Github repositories, specify `user/repo` or `organization/repo`. For official Akamai packages, you can omit the `akamai/cli-` prefix. For example, to install `akamai/cli-property-manager`, it's enough to run `property-manager`.\n\n    These examples all install Akamai CLI for Property Manager from Github using various aliases:\n\n    ```sh\n    akamai install property-manager\n    akamai install akamai/cli-property-manager\n    akamai install https://github.com/akamai/cli-property-manager.git\n    ```\n\n    The `install` command accepts more than one argument, so you can install many packages at once using any of these types of syntax.\n\n- `uninstall`\n\n    To remove all the package files you installed with `akamai install`, run `akamai uninstall \u003ccommand\u003e`, where `\u003ccommand\u003e` is any command within that package.\n\n    The `uninstall` command accepts more than one argument, so you can uninstall many packages at once.\n\n- `update`\n\n    To update a package you installed with `akamai install`, run `akamai update \u003ccommand\u003e`, where `\u003ccommand\u003e` is any command within that package.\n\n    You can specify multiple packages to update at once.\n\n    If you don't specify additional arguments, `akamai update` updates _all_ packages installed with `akamai install`\n\n- `upgrade`\n\n    Manually upgrade Akamai CLI to the latest version.\n\n    If you installed Akamai CLI with Homebrew, run this command instead:\n\n    ```sh\n    $ brew upgrade akamai\n    ```\n\n- `search`\n\n    Search all the packages published on [developer.akamai.com](https://developer.akamai.com/) for the submitter string. Searches apply to the package name, alias, and description. Search results appear in the console output.\n\n- `config`\n\n    View or modify the configuration settings that drive the common CLI behavior. Akamai CLI maintains a local configuration file in its root directory. The `config` command supports these sub-commands:\n    - `get`\n    - `set`\n    - `list`\n    - `unset` or `rm`\n\n### Installed commands\n\nThis commands depend on your installed packages. To use an installed command, run `akamai \u003ccommand\u003e \u003caction\u003e [arguments]`, for example:\n\n```sh\nakamai property-manager new-property -p example.org -g grp_123456 -c ctr_X-XXXXXX -d prd_Web_App_Accel\n```\nFor the list of supported commands, see the [documentation](https://developer.akamai.com/cli-packages) for each package.\n\n### Custom commands\n\nAkamai CLI provides a framework for writing custom CLI commands. See the extended [Akamai CLI documentation](https://developer.akamai.com/cli) to learn how to contribute, create custom packages, and build commands.\n\nBefore you start to build your own commands, make sure you meet these prerequisites:\n\n1. The package is available through a Git repository that supports standard SSH public key authentication.\n2. The executable is named `akamai-\u003ccommand\u003e` using dashed-lowercase, or `akamai\u003cCommand\u003e` using camelCase.\n3. Verify that `akamai-command help` works for you. Ideally, CLI should allow for `akamai-command help \u003csub-command\u003e`.\n4. If you're using Akamai APIs, the executable must support the `.edgerc` format, and must support both `--edgerc` and `--section` flags.\n5. If an action fails to complete, the executable exits with a non-zero status code.\n\nAs long as the result is executable, you can use any of the supported languages to build your commands, including Python, Go, and JavaScript.\n\n### Logging\n\nTo see additional log information, prepend `AKAMAI_LOG=\u003clogging-level\u003e` to any CLI command. You can specify one of the following logging levels:\n\n- `fatal`\n- `error`\n- `warn`\n- `info`\n- `debug`\n\nFor example, to see extra debug information while updating the property-manager package, run:\n\n```sh\nAKAMAI_LOG=debug akamai update property-manager\n```\n\nEach level is a progressive superset of all previous tiers. The output for `debug` also includes `fatal`, `error`, `warn`, and `info` logs.\n\nIf you want to redirect logs to a file, use the `AKAMAI_CLI_LOG_PATH` environmental variable:\n\n```sh\nAKAMAI_LOG=debug AKAMAI_CLI_LOG_PATH=akamai.log akamai update property-manager\n```\n\n## Dependencies\n\nAkamai CLI supports the following package managers that help you automatically install package dependencies:\n\n- Python: `pip` (using `requirements.txt`)\n- Go: `go modules`\n- JavaScript: `npm` and `yarn`\n\nIf you want to use other languages or package managers, make sure you include all dependencies in the package repository.\n\n## Command package metadata\n\nThe package you install needs a `cli.json` file. This is where you specify the command language runtime version and define all commands included in package.\n\n### Format\n\n- `requirements`: Specifies the runtime requirements. You may specify a minimum version number or use the `*` wildcard for any version. Possible requirements are:\n  - `go`\n  - `node`\n  - `python`\n\n- `commands`: Lists commands included in the package.\n  - `name`: The command name, used as the executable name.\n  - `aliases`: An array of aliases that invoke the same command.\n  - `version`: The command version.\n  - `description`: A short description for the command.\n  - `bin`: A URL to fetch a binary package from if it cannot be installed from source.\n\n    The `bin` URL may contain the following placeholders:\n\n    - `{{.Version}}`: The command version.\n    - `{{.Name}}`: The command name.\n    - `{{.OS}}`: The current operating system, either `windows`, `mac`, or `linux`.\n    - `{{.Arch}}`: The current OS architecture, either `386` or `amd64`.\n    - `{{.BinSuffix}}`: The binary suffix for the current OS: `.exe` for `windows`.\n\n### Example\n\n```json\n{\n  \"requirements\": {\n    \"go\": \"1.8.0\"\n  },\n  \"commands\": [\n    {\n      \"name\": \"purge\",\n      \"version\": \"0.1.0\",\n      \"description\": \"Purge content from the Edge\",\n      \"bin\": \"https://github.com/akamai/cli-purge/releases/download/{{.Version}}/akamai-{{.Name}}-{{.OS}}{{.Arch}}{{.BinSuffix}}\"\n    }\n  ]\n}\n```\n## Akamai CLI exit codes\n\nWhen you complete an operation, Akamai CLI generates one of these exit codes:\n\n- `0` (Success) - Indicates that the latest command or script executed successfully.\n- `1` (Configuration error) - Indicates an error while loading `AKAMAI_CLI_VERSION` or `AKAMAI_CLI`.\n- `2` (Configuration error) - Indicates an error while creating the `cache directory`.\n- `3` (Configuration error) - Indicates an error while saving the `cache-path`.\n- `5` (Application error) - Indicates an error with the initial setup. Occurs when you run Akamai CLI for the first time.\n- `6` (Syntax error) - Indicates that the latest command or script cannot be processed.\n- `7` (Syntax error) - Indicates that the commands in your installed packages have conflicting names. To fix this, add a prefix to the commands that have the same name.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakamai%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakamai%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakamai%2Fcli/lists"}