Xpersona
A

Alibabacloud Cli Guidance

CLAWHUB · Unverified

Guide users to manage Alibaba Cloud resources using the Aliyun CLI command-line tool. Covers CLI installation, credential configuration, plugin management, c...

62
Rank
84
Safety
979
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 979 downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: medium.

clawhub skill install s173swjet2yrebzqrp6hjkvmy583mxef:alibabacloud-cli-guidance
  1. Install using `clawhub skill install s173swjet2yrebzqrp6hjkvmy583mxef:alibabacloud-cli-guidance` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/sdk-team/alibabacloud-cli-guidance before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-cli-guidance/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

89,425 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: alibabacloud-cli-guidance
description: >
  Guide users to manage Alibaba Cloud resources using the Aliyun CLI command-line tool.
  Covers CLI installation, credential configuration, plugin management, command construction,
  and error troubleshooting. Use this skill when the user wants to operate Alibaba Cloud
  services from the terminal — including ECS (云服务器, cloud servers),
  Function Compute (函数计算, serverless), RDS (云数据库, databases),
  OSS (对象存储, object storage), SLS (日志服务, log service),
  VPC (专有网络, networking), ESS (弹性伸缩, auto scaling),
  and any other Alibaba Cloud product. Also use when the user mentions "aliyun", "阿里云",
  "阿里云CLI", "命令行", asks about CLI plugin installation, encounters Aliyun CLI errors
  (InvalidAccessKeyId, SignatureDoesNotMatch, Throttling), or needs help constructing
  aliyun commands with correct parameter syntax.
license: Apache-2.0
metadata:
  domain: aliyun-cli
  owner: sdk-team
  contact: sdk-team@alibabacloud.com
allowed-tools: Bash, aliyun cli
---

# Aliyun CLI Expert

Guide users to manage Alibaba Cloud resources effectively using the `aliyun` command-line tool.

**Required permissions** : see `./references/ram-policies.md` (`## required_permissions`). Extend **on demand** for other CLI commands.

## Instructions

### Agent execution: AI-mode and User-Agent (this skill)

**Skill identifier** (same string whichever path you use): `AlibabaCloud-Agent-Skills/alibabacloud-cli-guidance`

Use **exactly one** way to attach this skill to requests. **Do not combine** AI-mode (`configure ai-mode` + `set-user-agent`) with `ALIBABA_CLOUD_USER_AGENT` or a per-command env prefix for the **same** skill token — the CLI stacks those sources, and **User-Agent / attribution will duplicate** (bad for telemetry).

| Path | When to use | Start | End / cleanup |
| ---- | ----------- | ----- | ------------- |
| **A — AI-mode (preferred for agents)** | Agent session, many `aliyun` calls | `aliyun configure ai-mode enable` then `aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-cli-guidance"` | **[MUST]** `aliyun configure ai-mode disable` before the final response on **every** exit (success, failure, error, cancel, session end). **Do not** `export ALIBABA_CLOUD_USER_AGENT` to the same value while AI-mode is on. |
| **B — Environment or one-shot** | One-off commands, scripts without `configure`, or no AI-mode | `export ALIBABA_CLOUD_USER_AGENT=AlibabaCloud-Agent-Skills/alibabacloud-cli-guidance` for the session, **or** prefix each API call: `ALIBABA_CLOUD_USER_AGENT=AlibabaCloud-Agent-Skills/alibabacloud-cli-guidance aliyun ...` | If you used **`export`**, run `unset ALIBABA_CLOUD_USER_AGENT` when done so other skills are not mis-attributed. Inline prefix needs no unset. **Do not** enable AI-mode on path B for the same skill string. |

Path A — start (before the first `aliyun` that hits the API; local `aliyun configure` without cloud calls may run first if needed):

```bash
aliyun co

_meta.json

{
  "ownerId": "kn74p5w8ywv6prh40g0s82gmqh83nw54",
  "slug": "alibabacloud-cli-guidance",
  "version": "0.0.2",
  "publishedAt": 1777269353900
}

references/command-syntax.md

# Command Syntax Guide

Supplementary reference for the Aliyun CLI plugin system. For core usage instructions,
see SKILL.md (the primary document).

## Basic Command Structure

```bash
aliyun <product> <command> [--parameter value] [--global-flag value]
```

- `<product>`: Plugin name (ecs, fc, rds, oss, sls, etc.)
- `<command>`: Operation in kebab-case (describe-instances, create-function)
- `--parameter`: Command-specific parameters in kebab-case
- `--global-flag`: Global flags like --region-id, --output, --log-level

## Parameter Types, Output Filtering, Global Flags, Pagination, Waiters

See SKILL.md §6 (structured parameters), §8 (filter and format output),
§9 (pagination), §10 (waiters), and the Global Flags Reference table.

### JSON Parameters (supplementary)

For very complex structures where structured syntax is insufficient, raw JSON is supported:

```bash
aliyun fc create-function \
  --function-name test \
  --code '{"zipFile":"base64encoded..."}'
```

## Help System

```bash
aliyun ecs --help                              # Product-level: list all subcommands
aliyun ecs describe-instances --help           # Command-level: parameters, types, structure
aliyun ecs --help | grep "Available Commands"  # Quick command listing
```

When a plugin is installed, `aliyun <product> --help` shows plugin help automatically.
See SKILL.md §2 for details on `ALIBABA_CLOUD_ORIGINAL_PRODUCT_HELP`.

## Error Handling

### Common Error Messages

1. **Plugin not found**

   ```text
   Error: plugin 'xxx' not found
   Solution: aliyun plugin install --names xxx
   ```

2. **Missing required parameter**

   ```text
   Error: required parameter '--instance-id' not provided
   Solution: Add the required parameter. Check --help for required params.
   ```

3. **Invalid parameter value**

   ```text
   Error: invalid value for '--instance-type'
   Solution: Check valid values with --help
   ```

4. **API version not supported**

   ```text
   Error: unsupported API version
   Solution: aliyun <product> list-api-versions
   ```

5. **Authentication error**

   ```text
   Error: InvalidAccessKeyId.NotFound
   Solution: aliyun configure set --access-key-id <new-key> --access-key-secret <new-secret>
   ```

6. **Signature mismatch**

   ```text
   Error: SignatureDoesNotMatch
   Solution: Verify access key secret. Check for extra whitespace in credentials.
   ```

### Debugging failed commands

Always add `--log-level debug` to see the full request/response cycle:

```bash
aliyun ecs describe-instances \
  --biz-region-id cn-hangzhou \
  --log-level debug
```

This reveals: API endpoint, serialized parameters, HTTP status, and response body.

references/global-flags.md

# Global Flags Reference

Supplementary reference for CLI global flags. For commonly used flags, see SKILL.md
(Global Flags Reference table, §8 output filtering, §11 debugging).

This document covers **hidden/advanced flags** and details not in SKILL.md.

## Hidden Global Flags

These flags are available but not shown in `--help`:

### --waiter (advanced syntax)

SKILL.md §10 shows basic waiter usage. Full syntax with timeout and interval:

```bash
aliyun ecs describe-instances \
  --instance-id i-xxx \
  --waiter expr='Instances.Instance[0].Status' to=Running timeout=180 interval=5
```

- `expr`: JMESPath expression to evaluate on the response
- `to`: Target value to match
- `timeout`: Maximum wait in seconds (default varies)
- `interval`: Poll interval in seconds (default varies)

### --header

Add custom HTTP headers (repeatable):

```bash
aliyun ecs describe-instances \
  --biz-region-id cn-hangzhou \
  --header X-Custom-Header=value \
  --header X-Another-Header=value2
```

### --body / --body-file

Provide raw HTTP request body directly or from file:

```bash
aliyun fc invoke-function \
  --function-name test \
  --body '{"key":"value"}'

aliyun fc create-function \
  --function-name test \
  --body-file ./function-config.json
```

### --secure / --insecure

Force HTTPS or HTTP protocol:

```bash
aliyun ecs describe-instances --secure      # Force HTTPS
aliyun ecs describe-instances --insecure    # Force HTTP (not recommended)
```

### --no-stream

For SSE (Server-Sent Events) APIs: aggregate all events before displaying instead of
streaming them incrementally:

```bash
aliyun <product> <sse-command> --no-stream
```

## --cli-dry-run Example Output

When using `--cli-dry-run`, the CLI prints what would be sent without calling the API:

```text
[DRY-RUN] API call would be made with the following details:
  Endpoint: https://ecs.cn-hangzhou.aliyuncs.com
  Method: POST
  Headers:
    Content-Type: application/x-www-form-urlencoded
    x-acs-action: CreateInstance
  Parameters:
    RegionId=cn-hangzhou
    InstanceType=ecs.g6.large
    ImageId=ubuntu_20_04_x64
```

## --output rows= Parameter

Use `rows=` with `cols=` to specify the JSON path for row data:

```bash
aliyun ecs describe-instances \
  --output cols=InstanceId,Status rows='Instances.Instance[]'
```

## Flag Priority

When the same setting is configured in multiple places:

1. **Command-line flag** (highest)
2. **Environment variable**
3. **Config file** (`~/.aliyun/config.json`)
4. **Default value** (lowest)

```bash
export ALIBABA_CLOUD_REGION_ID=cn-beijing
aliyun ecs describe-instances --biz-region-id cn-hangzhou
# Uses cn-hangzhou (command-line wins)
```

references/installation-guide.md

# Aliyun CLI Installation & Configuration Guide

Complete guide for installing and configuring Aliyun CLI.

> **Aliyun CLI 3.3.3+**: Supports installing and using all published Alibaba Cloud product plugins. Make sure to upgrade to 3.3.3 or later for full plugin ecosystem coverage.

## Installation

### macOS / Linux (Recommended)

One command to install or update — works on both macOS and Linux, auto-detects architecture:

```bash
/bin/bash -c "$(curl -fsSL --connect-timeout 10 --max-time 120 https://aliyuncli.alicdn.com/setup.sh)"
```

After installation, verify:
```bash
aliyun version   # should be >= 3.3.3
```

### macOS — Homebrew (Alternative)

```bash
brew install aliyun-cli
# Upgrade to latest
brew upgrade aliyun-cli
```

### Linux — Manual Binary (Alternative)

Use these only if the setup script above is not suitable.

**x86_64**
```bash
wget --connect-timeout=10 --read-timeout=120 --tries=3 -qO- https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz | tar xz
sudo mv aliyun /usr/local/bin/
```

**ARM64**
```bash
wget --connect-timeout=10 --read-timeout=120 --tries=3 -qO- https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-arm64.tgz | tar xz
sudo mv aliyun /usr/local/bin/
```

### Windows

**Using Binary**
1. Download from: https://aliyuncli.alicdn.com/aliyun-cli-windows-latest-amd64.zip
2. Extract the ZIP file
3. Add the directory to your PATH environment variable
4. Open new Command Prompt or PowerShell
5. Verify: `aliyun version`

**Using PowerShell**
```powershell
# Download
Invoke-WebRequest -Uri "https://aliyuncli.alicdn.com/aliyun-cli-windows-latest-amd64.zip" -OutFile "aliyun-cli.zip"

# Extract
Expand-Archive -Path aliyun-cli.zip -DestinationPath C:\aliyun-cli

# Add to PATH (requires admin privileges)
$env:Path += ";C:\aliyun-cli"
[Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)

# Verify
aliyun version
```

## Configuration

### Quick Start

```bash
aliyun configure set \
  --mode AK \
  --access-key-id <your-access-key-id> \
  --access-key-secret <your-access-key-secret> \
  --region cn-hangzhou
```

All `aliyun configure` commands support non-interactive flags, which is the recommended approach —
it works in scripts, CI/CD pipelines, and agent-driven automation without hanging on stdin prompts.

**Where to Get Access Keys**

1. Log in to Aliyun Console: https://ram.console.aliyun.com/
2. Navigate to: AccessKey Management
3. Create a new AccessKey pair
4. Save the secret immediately — it's only shown once

### Configuration Modes

**OAuth (browser login)** — If the environment can open a web browser (for example a local desktop with a GUI), **prefer OAuth** over storing AccessKey pairs in configuration: credentials are not kept as plaintext AK/SecretKey. Requires Alibaba Cloud CLI **3.0.299** or later and is **not** suitable for headless servers (for example SSH-only Linux without a browser on the same machine).

Run interactively:

```bash
aliyun configure --profil

Sponsored

Ads related to Alibabacloud Cli Guidance and adjacent AI workflows.