Agent-first command-line control for Alibaba Cloud elastic computing resources.
ecctl gives agents and operators a consistent product/resource/action grammar,
JSON-first output, machine-readable schemas, waiters, and spec-driven cloud
behavior.
Install the latest public release with Homebrew:
brew tap aliyun/ecctl https://github.com/aliyun/elastic-compute-control-cli
brew install --cask aliyun/ecctl/ecctl
ecctl --versionThe first command uses this repository directly as the aliyun/ecctl Tap.
Since Homebrew 6.0, third-party taps are not trusted by default; installing
with the fully qualified cask name trusts only this cask, so a separate
brew trust step is not needed. Pre-built
binaries for macOS, Linux, and Windows are also available from
GitHub Releases.
Check for or install a newer release with ecctl update --check and
ecctl update. The command supports both direct binary and Homebrew
installations.
Or install with Go 1.25 or later:
go install github.com/aliyun/elastic-compute-control-cli/cmd/ecctl@latestSee the installation guide for requirements and other installation options.
These commands are a curated set of common workflows for users and agents. Unlike Alibaba Cloud CLI's API-operation-oriented interface, they demonstrate ecctl's resource verbs, machine-readable command details, normalized filters, concise inputs, multi-API workflows, built-in waiters, and readback. Replace values in angle brackets before running a command. Several examples change cloud resources; inspect their schema first.
ecctl schema ecs.instance.list ecs.instance.create ecs.disk.create --briefOne call returns required flags, risk, dry-run, idempotency, and waiter behavior.
ecctl ecs instance list --region cn-hangzhou --filter status=Running --filter tag.env=prodThe consistent filter syntax returns normalized JSON without OpenAPI response wrappers.
ecctl ecs instance create --region cn-hangzhou --type <instance-type> --image <image-id-or-name> --sg <sg-id> --vswitch <vswitch-id> --tag env=prod --dry-runShort resource fields send a server-side validation request without creating an instance.
ecctl ecs instance create --region cn-hangzhou --type <instance-type> --image <image-id-or-name> --sg <sg-id> --vswitch <vswitch-id> --name web-01 --tag env=prodecctl supplies ClientToken-compatible idempotency, waits for Running, and reads the instance back.
ecctl ecs instance update <instance-id> --region cn-hangzhou --name web-02 --tag env=prodecctl selects the required OpenAPIs from the requested resource changes and reads the instance back.
ecctl ecs disk create --region cn-hangzhou --zone <zone-id> --size 100 --category cloud_essd --name data-01 --tag env=prodThe command supplies idempotency, waits for Available, and returns the normalized disk view.
ecctl ecs instance update <instance-id> --region cn-hangzhou --key-pair <key-pair-name>The resource update maps to the required key-pair API and reads the instance back.
ecctl ecs instance exec <instance-id> --region cn-hangzhou --command 'uname -a'One command runs Cloud Assistant, waits for completion, and reads the invocation result.
ecctl ecs sg authorize <sg-id> --region cn-hangzhou --rule tcp:443@0.0.0.0/0A compact rule replaces verbose OpenAPI fields, and ecctl reads the security group back.
ecctl ack kubeconfig get --region cn-hangzhou --cluster <cluster-id> --private-ipThe resource intent is explicit; callers do not need to know the OpenAPI operation or response shape.
Learn more in the Quick Start, Concepts, Command Discovery, and Resource Coverage guides.
Start with the resource spec guide.
