Loading...
Loading...
Use when the agent wants to define, list, inspect, or execute GUI macros via the OpenClaw Macro System CLI. Macros are parameterized, CLI-callable workflows — the agent invokes `macro run <name>` and the system handles backend routing (plugin, file transform, accessibility, compiled GUI replay).
npx skill4agent add hkuds/cli-anything cli-anything-openclawcd openclaw-skill/agent-harness
pip install -e .# 1. See what macros are available
cli-anything-openclaw macro list --json
# 2. Inspect a macro's parameters
cli-anything-openclaw macro info export_file --json
# 3. Dry-run to check params without side effects
cli-anything-openclaw --dry-run macro run export_file \
--param output=/tmp/test.txt --json
# 4. Execute a macro
cli-anything-openclaw macro run export_file \
--param output=/tmp/result.txt --json
# 5. See what backends are available
cli-anything-openclaw backends --json| Flag | Description |
|---|---|
| Machine-readable JSON output on stdout |
| Simulate all steps, skip side effects |
| Resume or create a named session |
macro| Command | Description |
|---|---|
| List all available macros |
| Show macro schema (parameters, steps, conditions) |
| Execute a macro |
| Simulate without side effects |
| Structural validation |
| Scaffold a new macro YAML |
session| Command | Description |
|---|---|
| Show session statistics |
| Show recent run history |
| Persist session to disk |
| List all saved sessions |
backendscli-anything-openclaw backends --json
# Shows: native_api, file_transform, semantic_ui, gui_macro, recovery
# and whether each is available in the current environment.--param key=valuecli-anything-openclaw macro run transform_json \
--param file=/path/to/data.json \
--param key=settings.theme \
--param value=dark \
--json--json{
"success": true,
"macro_name": "export_file",
"output": {
"exported_file": "/tmp/result.txt"
},
"error": "",
"telemetry": {
"duration_ms": 312,
"steps_total": 2,
"steps_run": 2,
"backends_used": ["native_api"],
"dry_run": false
}
}"success": false"error"| Backend | Triggered by | Use case |
|---|---|---|
| | Subprocess / shell command |
| | XML, JSON, text file editing |
| | Accessibility / keyboard shortcuts |
| | Precompiled coordinate replay |
| | Retry / fallback orchestration |
cli_anything/openclaw/macro_definitions/cli-anything-openclaw macro define my_macro --output \
cli_anything/openclaw/macro_definitions/examples/my_macro.yamlname: my_macro
version: "1.0"
description: What this macro does.
parameters:
output:
type: string
required: true
description: Where to write results.
example: /tmp/result.txt
preconditions:
- file_exists: /path/to/input
steps:
- id: step1
backend: native_api
action: run_command
params:
command: [my-app, --export, "${output}"]
timeout_ms: 30000
on_failure: fail # or: skip, continue
postconditions:
- file_exists: ${output}
- file_size_gt: [${output}, 100]
outputs:
- name: result_file
path: ${output}
agent_hints:
danger_level: safe # safe | moderate | dangerous
side_effects: [creates_file]
reversible: true--json--dry-runsuccesserrorsuccessmacro info <name>macro run# Step 1: What's available?
cli-anything-openclaw macro list --json
# Step 2: What params does transform_json need?
cli-anything-openclaw macro info transform_json --json
# Step 3: Test safely
cli-anything-openclaw --dry-run macro run transform_json \
--param file=/tmp/config.json \
--param key=theme \
--param value=dark --json
# Step 4: Execute for real
cli-anything-openclaw macro run transform_json \
--param file=/tmp/config.json \
--param key=theme \
--param value=dark --json