CLS CLI for Openclaw

CLS CLI is a high-performance command-line tool built in Go for managing and querying Tencent Cloud Log Service resources with ease.

trumphuang
v1.0.0
Apr 14, 2026
0
526
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install cls-cli

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install cls-cli using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is CLS CLI?

CLS CLI is a comprehensive developer tool designed to bridge the gap between terminal environments and the Tencent Cloud Log Service (CLS). It allows users to perform complex log searches, manage infrastructure configurations, and monitor system health without leaving the command line. As part of the Openclaw Skills ecosystem, it provides a structured way for developers and AI agents to interact with cloud logging data, ensuring rapid troubleshooting and efficient resource management.

Built with Go 1.23+, the tool is optimized for speed and portability, supporting multiple output formats such as JSON, tables, and CSV. It serves as a critical bridge for DevOps professionals who need to automate log collection, setup alarms, and visualize data through dashboards using a unified interface.

CLS CLI Use Cases

  • Searching and filtering application logs using SQL-like queries for debugging.
  • Tailing live logs in real-time to monitor production deployments.
  • Automating the creation and configuration of log topics and retention policies (TTL).
  • Setting up complex alarm conditions and monitoring notification history.
  • Managing machine groups and log collection paths across various cloud regions.

How CLS CLI Works

  1. Installation involves cloning the repository and building the Go binary to the system path.
  2. The user authenticates by initializing a configuration file or setting environment variables with Tencent Cloud Secret ID and Key.
  3. Commands are issued using a structured syntax (e.g., log +search) which the CLI translates into Tencent Cloud API 3.0 requests.
  4. The tool processes cloud responses and formats the output based on user preference (table, json, etc.).
  5. For operations not covered by shortcuts, a generic API command provides access to all 150+ CLS API actions.

CLS CLI Setup

Build and install the binary in one step:

git clone https://github.com/trumphuang/CLS_CLI.git /tmp/CLS_CLI && cd /tmp/CLS_CLI/cls-cli && go build -o cls-cli . && mv cls-cli /usr/local/bin/ && rm -rf /tmp/CLS_CLI && cls-cli version

Initialize your credentials:

cls-cli config init --secret-id <SECRET_ID> --secret-key <SECRET_KEY> --region ap-guangzhou

Verify the installation:

cls-cli version

CLS CLI Data Schema & Taxonomy

The skill manages data across several key Tencent Cloud entities. The following table describes the primary data structures used within Openclaw Skills for CLS:

Component Description Key Attributes
Log Topic Container for log data Name, ID, TTL, Partition Count
Alarm Monitoring rules Query, Condition, Period, Alarm ID
Machine Group Target server clusters IP/Label, Group ID, Status
Collector Ingestion configurations Path, File Pattern, Extraction Type
Dashboard Visual representation Dashboard ID, Widget Config

CLS CLI Advanced Features

  • Contextual Log Retrieval: View surrounding log entries using PkgID and LogID for better debugging.
  • Multi-Region Support: Use the --region flag to temporarily switch operational contexts without changing local config.
  • Dry-Run Mode: Preview the impact of management commands before applying changes to the cloud environment.
  • Generic API Bridge: Execute any of the 150+ supported Tencent Cloud CLS API actions directly via the api command.
  • LogListener Lifecycle Management: Automated scripts for installing, starting, and checking the status of log collectors.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*