You can use the Log Service command-line interface (CLI) to manage projects, manage Logstores, query logs, and replicate resources across regions and accounts. This topic describes how to install the Log Service CLI.

Supported Python versions and runtime environments

  • Current CLI version: 0.1.17
  • Source code: Aliyun Log CLI
  • Supported Python versions

    Python 2.6, 2.7, 3.3, 3.4, 3.5, and 3.6 are supported.

  • Runtime environments

    Windows, Linux, and macOS operating systems are supported.

Install the CLI in Linux

  1. Log on to the Linux server.
  2. Run the following command to install the CLI:
    pip3 install aliyun-log-python-sdk aliyun-log-cli -U --no-cache
  3. Verify the installation result.
    Run the following command:
    aliyunlog --version
    If output that is in the following format is returned, the CLI is installed.
    log-cli-v-0.1.17, log-python-sdk-v-0.6.53, sys.version_info(major=3, minor=6, micro=8, releaselevel='final', serial=0), linux

Install the CLI in Windows

  1. Log on to the Windows server.
  2. Open Command Prompt.
  3. Run the following command to install the CLI:
    pip3 install aliyun-log-python-sdk aliyun-log-cli -U --no-cache
  4. Verify the installation result.
    Run the following command:
    aliyunlog --version
    If output that is in the following format is returned, the CLI is installed.
    log-cli-v-0.1.17, log-python-sdk-v-0.6.53, sys.version_info(major=3, minor=6, micro=8, releaselevel='final', serial=0), linux

Install the CLI in macOS

We recommend that you use pip3 to install the Log Service CLI. The following sample commands show how to install the CLI:
brew install python3
pip3 install -U aliyun-log-cli --no-cache

The next steps to install the CLI are the same as the steps to install the CLI in Linux. For more information, see Install the CLI in Linux.

What to do next

Configure the Log Service CLI