clscli for Openclaw

A powerful command-line interface for querying, filtering, and analyzing Tencent Cloud Cloud Log Service (CLS) data.

dbwang0130
v0.1.0
Feb 5, 2026
0
2.4k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install clscli

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 clscli 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 clscli?

clscli is a robust utility designed to bridge the gap between your development environment and Tencent Cloud Cloud Log Service (CLS). As a featured part of the Openclaw Skills ecosystem, it provides developers with the ability to perform high-speed log retrieval and sophisticated data analysis without the overhead of a web console.

This tool supports both CQL (CLS Query Language) for simple, high-speed text searches and standard SQL syntax for complex data aggregation and reporting. By integrating clscli into your Openclaw Skills workflow, you gain programmatic access to logs across multiple regions, enabling faster incident response and more comprehensive system monitoring.

clscli Use Cases

  • Investigating application errors by filtering logs with specific severity levels across various topics.
  • Generating real-time metrics and reports using SQL aggregation functions like GROUP BY and COUNT.
  • Conducting forensic analysis by retrieving the surrounding context of a specific log entry via PkgId.
  • Automating the discovery of log topics and logsets within a specific Tencent Cloud region.
  • Exporting filtered log data to JSON or CSV formats for external audit or visualization tools.

How clscli Works

  1. Authentication is established by setting Tencent Cloud secret credentials as environment variables.
  2. The user identifies the target log topic by querying the list of available topics in a specified region.
  3. A search query is executed using either CQL for text-based filtering or SQL for structured data analysis.
  4. The tool fetches matching logs, handling pagination automatically if the results exceed single request limits.
  5. If specific entries require deeper investigation, the tool retrieves adjacent logs to provide full execution context.

clscli Setup

To integrate this into your environment, follow these steps:

# Install the CLI tool via Homebrew
brew tap dbwang0130/clscli
brew install dbwang0130/clscli/clscli

# Configure your Tencent Cloud API credentials
export TENCENTCLOUD_SECRET_ID=\"your-secret-id\"
export TENCENTCLOUD_SECRET_KEY=\"your-secret-key\"

Ensure you specify the correct region (e.g., ap-guangzhou) during operation.

clscli Data Schema & Taxonomy

The skill interacts with several data structures within Tencent Cloud. Below is the primary organization of data retrieved through these Openclaw Skills:

Object Metadata Fields Formats
Log Topic TopicId, TopicName, LogsetId, Region, CreateTime JSON, CSV
Log Result PkgId, PkgLogId, Raw Content, Time (Unix ms) JSON, CSV, File
Log Context Surrounding log entries based on PkgId JSON, CSV
Query Stats Result count, pagination status, scan duration CLI Output

clscli Advanced Features

  • Support for complex SQL statements including nested subqueries and IP geolocation functions.
  • Auto-pagination capability using the --max flag to retrieve up to 1,000,000 logs in a single workflow.
  • Flexible output redirection allowing results to be saved directly to local files for further processing.
  • Multi-topic querying which allows searching across up to 50 topic IDs simultaneously.
  • Precision time-range filtering using Unix millisecond timestamps or human-readable relative ranges like 1h or 30m.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*