All Products
Search
Document Center

Serverless App Engine:Install and configure the saectl tool

Last Updated:Jan 27, 2026

If you are new to the saectl tool, this topic explains how to install and configure it.

Prerequisites

You have activated Serverless Application Engine (SAE) and granted the required permissions. For more information, see Preparations.

Install the saectl tool

Select the installation package and method based on your operating system.

Operating system

Installation package

Installation method

macOS

  1. Download the compressed package to your computer and decompress it. The decompressed path contains saectl.

  2. In the command line, go to the path where saectl is located and run mv ./saectl /usr/local/bin to move it to the system tools path.

Linux

  1. Download the compressed package to your computer. In the command line, run the command tar -zxvf ${package_file_name} to decompress the package. The decompressed path contains saectl.

  2. In the command line, go to the path where saectl is located and run mv ./saectl /usr/local/bin to move it to the system tools path.

Windows

  1. Download the compressed package to your computer and decompress it. The decompressed path contains saectl.exe.

  2. Add the decompressed path to the PATH system environment variable.

Release notes

Version

Release date

Change description

v0.1.10

2026/01/27

Added the command auto-completion feature.

v0.1.9

2025/12/25

Fixed a bug in the exec command for the Alibaba Cloud International Website.

v0.1.8

2025/11/17

Fixed a bug in the convert command.

v0.1.7

2025/07/11

  1. Added a feature to perform batch conversions using the convert command.

  2. Fixed some bugs.

v0.1.6

2025/06/30

Added the convert feature. Run the saectl convert -f input.yaml -o output.yaml command to convert a Kubernetes YAML file to an SAE YAML file.

v0.1.5

2025/05/23

Added support for cred-related commands.

v0.1.4

2024/02/07

Changed the kubectl-sae command to the saectl command.

v0.1.3

2024/12/24

Adjusted the client timeout to 60 s to resolve timeout errors.

v0.1.2

2024/11/20

  1. Added support for uploading code packages using the saectl upload command.

  2. Optimized the output of the saectl version command.

v0.1.1

2024/11/11

  1. When -n is specified for the client, the client verifies that the specified namespace is consistent with the one in the YAML file.

  2. When -n is not specified for the client, the namespace in the YAML file is used.

Verify the installation

In the command line, run saectl version. If the command returns the version information for the saectl tool, the tool is installed successfully.

View help information

While running commands, you can use the --help parameter to view help information. For example:

  • saectl --help returns the commands that can be used with saectl, such as get, describe, and apply.

  • saectl apply --help returns the parameters that can be used with saectl apply, such as -f and -o.

Configure the saectl tool

The saectl tool requires permissions to deploy applications and manage resources in SAE. To grant these permissions, you must set the AccessKey ID and AccessKey secret of your Alibaba Cloud account, and the application deployment region as environment variables.

Obtain an AccessKey ID and AccessKey secret

Create an AccessKey, and record the AccessKey ID and AccessKey secret.

Configure environment variables

Select the configuration method based on your operating system.

Linux or macOS

In the terminal, run the echo $SHELL command to view the default shell type. Select the configuration method based on the default shell type.

Zsh

  1. Run the following commands to append the environment variables to the ~/.zshrc file.

    # Replace YOUR_ACCESS_KEY_ID with your AccessKey ID
    echo "export ALICLOUD_ACCESS_KEY='YOUR_ACCESS_KEY_ID'" >> ~/.zshrc
    # Replace YOUR_ACCESS_KEY_SECRET with your AccessKey secret
    echo "export ALICLOUD_SECRET_KEY='YOUR_ACCESS_KEY_SECRET'" >> ~/.zshrc
    # Replace cn-beijing with your application deployment region
    echo "export ALICLOUD_REGION='cn-beijing'" >> ~/.zshrc
  2. Run the following command to make the changes take effect.

    source ~/.zshrc
  3. Open a new terminal window and run the following command to verify that the environment variables are set.

    echo $ALICLOUD_ACCESS_KEY, $ALICLOUD_SECRET_KEY, $ALICLOUD_REGION

Bash

  1. Run the following commands to append the environment variables to the ~/.bashrc file.

    # Replace YOUR_ACCESS_KEY_ID with your AccessKey ID
    echo "export ALICLOUD_ACCESS_KEY='YOUR_ACCESS_KEY_ID'" >> ~/.bashrc
    # Replace YOUR_ACCESS_KEY_SECRET with your AccessKey secret
    echo "export ALICLOUD_SECRET_KEY='YOUR_ACCESS_KEY_SECRET'" >> ~/.bashrc
    # Replace cn-beijing with your application deployment region
    echo "export ALICLOUD_REGION='cn-beijing'" >> ~/.bashrc
  2. Run the following command to make the changes take effect.

    source ~/.bashrc
  3. Open a new terminal window and run the following command to verify that the environment variables are set.

    echo $ALICLOUD_ACCESS_KEY, $ALICLOUD_SECRET_KEY, $ALICLOUD_REGION

Windows

This section uses Command Prompt (CMD) as an example.

  1. In Command Prompt, run the following commands.

    # Replace YOUR_ACCESS_KEY_ID with your AccessKey ID
    setx ALICLOUD_ACCESS_KEY "YOUR_ACCESS_KEY_ID"
    # Replace YOUR_ACCESS_KEY_SECRET with your AccessKey secret
    setx ALICLOUD_SECRET_KEY "YOUR_ACCESS_KEY_SECRET"
    # Replace cn-beijing with your application deployment region
    setx ALICLOUD_REGION "cn-beijing"
  2. Open a new Command Prompt window and run the following command to verify that the environment variables are set.

    echo %ALICLOUD_ACCESS_KEY%, %ALICLOUD_SECRET_KEY%, %ALICLOUD_REGION%

Verify the configuration

In the command line, run saectl get ns. If the command returns the namespace information for the specified application deployment region in your account, the saectl tool is configured successfully.

Command-line auto-completion

saectl supports command-line auto-completion for Bash, Zsh, Fish, and PowerShell. This feature helps you quickly enter commands and parameters.

Install auto-completion

Select the installation method based on your shell type.

Bash

Run the following commands to install auto-completion for Bash.

# Generate the completion script
saectl completion bash > ~/.saectl-completion.bash

# Add it to .bashrc
echo 'source ~/.saectl-completion.bash' >> ~/.bashrc

# Apply the changes immediately
source ~/.bashrc

For macOS users: The default Bash version on macOS is outdated. Use Zsh or upgrade Bash:

brew install bash-completion@2
saectl completion bash > $(brew --prefix)/etc/bash_completion.d/saectl

Zsh

Run the following commands to install auto-completion for Zsh.

# Generate the completion script
saectl completion bash > ~/.saectl-completion.bash

# Add it to .zshrc (using bashcompinit compatibility mode)
cat >> ~/.zshrc << 'EOF'
autoload -U +X bashcompinit && bashcompinit
source ~/.saectl-completion.bash
EOF

# Apply the changes immediately
source ~/.zshrc

Fish

Run the following command to install auto-completion for Fish.

# Generate the completion script (takes effect automatically)
saectl completion fish > ~/.config/fish/completions/saectl.fish

PowerShell

Run the following commands to install auto-completion for PowerShell.

# Generate the completion script
saectl completion powershell | Out-String | Invoke-Expression

# Add it to your profile to make it permanent
saectl completion powershell >> $PROFILE

Use auto-completion

After the installation is complete, enter saectl in the command line and press the Tab key to trigger auto-completion.

  • Command completion: Enter saectl and press the Tab key to display available commands, such as get, create, delete, apply, describe, logs, and exec.

  • Resource type completion: Enter saectl get and press the Tab key to display available resource types, such as namespaces, deployments, pods, services, configmaps, secrets, and ingresses.

  • Resource name completion: After you enter a resource type, press the Tab key to complete the name of a specific resource in the current namespace.

  • Parameter completion: Enter -- and press the Tab key to display available parameters, such as --namespace, --output, --all-namespaces, and --selector.

  • Container name completion: When you use the logs or exec command, press the Tab key to complete the name of a container in the pod.

Purge the completion cache: If auto-completion is not working correctly, run the following commands to purge the cache.

# For Zsh
rm -f ~/.zcompdump*
exec zsh

# For Bash
hash -r

Uninstall auto-completion

To uninstall auto-completion, follow the uninstallation steps for your shell.

  • Bash: Delete the ~/.saectl-completion.bash file, and remove the related source line from ~/.bashrc.

  • Zsh: Delete the ~/.saectl-completion.bash file, and remove the related lines from ~/.zshrc.

  • Fish: Delete the ~/.config/fish/completions/saectl.fish file.