Communitygithub.com

cli-anything-macrocli

GUI 워크플로우를 CLI 기반 매크로로 변환하여 에이전트가 GUI에 직접 접근하지 않고도 다양한 백엔드를 통해 안정적으로 작업을 실행할 수 있게 해주는 도구입니다.

cli-anything-macrocli란 무엇인가요?

MacroCLI는 기존 GUI 워크플로우를 파라미터화된 CLI 호출 가능 매크로로 변환하는 에이전트 도구입니다. 에이전트는 GUI에 직접 접근하지 않고 안정적인 CLI를 통해 매크로를 호출하며, 런타임은 네이티브 플러그인/API, 파일 변환, 시맨틱 UI 제어, 사전 컴파일된 GUI 매크로 재생 등 최적의 백엔드로 실행을 라우팅합니다. 주요 기능으로는 매크로 목록 조회, 파라미터 검사, 드라이런 실행, 실제 실행, 세션 관리 등이 있으며, 모든 명령어는 `--json` 플래그를 지원하여 기계가 읽기 쉬운 JSON 출력을 제공합니다. 각 매크로는 YAML 파일로 정의되며, `macro define` 명령어로 쉽게 스캐폴딩할 수 있습니다. 이 도구는 Claude Code, Cursor, Codex 등 다양한 AI 에이전트 플랫폼과 함께 사용하기에 적합하며, Python 3.10+ 환경에서 pip로 간단히 설치할 수 있습니다. 에이전트는 `--dry-run`을 통해 부작용 없이 파라미터를 검증하고, `success` 필드로 성공 여부를 확인할 수 있습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-macrocli

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

MacroCLI CLI

개요

MacroCLI는 가치 있는 GUI 워크플로우를 파라미터화된 CLI 호출 가능 매크로로 변환합니다. 에이전트는 GUI에 직접 접근하지 않고 안정적인 CLI를 통해 매크로를 호출하며, 런타임은 최적의 백엔드(네이티브 플러그인/API, 파일 변환, 시맨틱 UI 제어, 또는 사전 컴파일된 GUI 매크로 재생)로 실행을 라우팅합니다.

설치

cd macrocli/agent-harness
pip install -e .

요구 사항: Python 3.10+, PyYAML, click, prompt-toolkit.

빠른 시작 (에이전트용)

# 1. 사용 가능한 매크로 확인
cli-anything-macrocli macro list --json

# 2. 매크로 파라미터 검사
cli-anything-macrocli macro info export_file --json

# 3. 부작용 없이 파라미터 확인을 위한 드라이런
cli-anything-macrocli --dry-run macro run export_file \
    --param output=/tmp/test.txt --json

# 4. 매크로 실행
cli-anything-macrocli macro run export_file \
    --param output=/tmp/result.txt --json

# 5. 사용 가능한 백엔드 확인
cli-anything-macrocli backends --json

명령어 참조

전역 플래그

플래그설명
--json기계가 읽을 수 있는 JSON 출력을 stdout으로 출력
--dry-run모든 단계를 시뮬레이션하고 부작용은 건너뜀
--session-id <id>명명된 세션을 재개하거나 생성

macro 그룹

명령어설명
macro list사용 가능한 모든 매크로 나열
macro info <name>매크로 스키마(파라미터, 단계, 조건) 표시
macro run <name> --param k=v매크로 실행
macro dry-run <name> --param k=v부작용 없이 시뮬레이션
macro validate [name]구조 유효성 검사
macro define <name>새 매크로 YAML 스캐폴딩

session 그룹

명령어설명
session status세션 통계 표시
session history최근 실행 기록 표시
session save세션을 디스크에 저장
session list저장된 모든 세션 나열

backends

cli-anything-macrocli backends --json
# 출력: native_api, file_transform, semantic_ui, gui_macro, recovery
# 및 각각이 현재 환경에서 사용 가능한지 여부.

매크로 파라미터

--param key=value로 파라미터를 전달합니다. 여러 개는 반복합니다:

cli-anything-macrocli macro run transform_json \
    --param file=/path/to/data.json \
    --param key=settings.theme \
    --param value=dark \
    --json

출력 형식 (--json)

--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" 필드에서 이유를 확인하세요. 종료 코드는 실패 시 1입니다.

실행 백엔드

백엔드는 매크로 단계 정의에 따라 자동으로 선택됩니다:

백엔드트리거사용 사례
native_apibackend: native_api서브프로세스 / 셸 명령어
file_transformbackend: file_transformXML, JSON, 텍스트 파일 편집
semantic_uibackend: semantic_ui접근성 / 키보드 단축키
gui_macrobackend: gui_macro사전 컴파일된 좌표 재생
recoverybackend: recovery재시도 / 폴백 오케스트레이션

매크로 작성

매크로는 cli_anything/macrocli/macro_definitions/ 디렉토리의 YAML 파일입니다. 다음 명령어로 스캐폴딩하세요:

cli-anything-macrocli macro define my_macro --output \
    cli_anything/macrocli/macro_definitions/examples/my_macro.yaml

최소 스키마:

name: my_macro
version: "1.0"
description: 이 매크로가 수행하는 작업.

parameters:
  output:
    type: string
    required: true
    description: 결과를 쓸 위치.
    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  # 또는: 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

에이전트 사용 규칙

  1. 프로그래매틱 출력을 위해 항상 --json을 사용하세요.
  2. 부작용이 있는 매크로를 실행하기 전에 --dry-run으로 파라미터를 검증하세요.
  3. success 필드를 확인하세요 — 종료 코드만으로 성공을 가정하지 마세요.
  4. success가 false일 때 error 필드를 읽어 무엇이 실패했는지 확인하세요.
  5. macro run을 호출하기 전에 macro info <name>으로 파라미터를 확인하세요.
  6. 모든 파일 파라미터에 절대 경로를 사용하세요.

예제 워크플로우

# 1단계: 무엇이 가능한가?
cli-anything-macrocli macro list --json

# 2단계: transform_json에 어떤 파라미터가 필요한가?
cli-anything-macrocli macro info transform_json --json

# 3단계: 안전하게 테스트
cli-anything-macrocli --dry-run macro run transform_json \
    --param file=/tmp/config.json \
    --param key=theme \
    --param value=dark --json

# 4단계: 실제 실행
cli-anything-macrocli macro run transform_json \
    --param file=/tmp/config.json \
    --param key=theme \
    --param value=dark --json

버전

1.0.0

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

cli-anything-adguardhome

>-

cli-anything-anygen

>-

cli-anything-audacity

>-

cli-anything-blender

>-

cli-anything-browser

Browser automation CLI using DOMShell MCP server. Maps Chrome

cli-anything-calibre

>-

cli-anything-ccswitch

CLI interface for CC Switch — manage AI coding tool configurations from the terminal

cli-anything-chromadb

>-

cli-anything-cloudanalyzer

Command-line interface for CloudAnalyzer — Agent-friendly harness for CloudAnalyzer, a QA platform for mapping, localization, and perception outputs. Supports 27 commands across 8 groups: point cloud evaluation, trajectory evaluation, ground segmentation QA, config-driven quality gates, baseline evolution, processing, visualization, and interactive REPL.

cli-anything-cloudcompare

Command-line interface for CloudCompare — Agent-friendly harness for CloudCompare, the open-source 3D point cloud and mesh processing software. Supports 41 commands across 9 groups: project management, session control, point cloud operations (subsample, filter, segment, analyze), mesh operations, distance computation (C2C, C2M), transformations (ICP, matrix), export (LAS/LAZ/PLY/PCD/OBJ/STL/E57), and interactive REPL.

cli-anything-comfyui

>-

cli-anything-dify-workflow

Wrapper for the Dify workflow DSL CLI. Create, inspect, validate, edit, and export Dify workflow files through a CLI-Anything harness.

cli-anything-drawio

>-

cli-anything-eez-studio

Use EEZ Studio from the command line: inspect and modify native .eez-project files, edit LVGL screens/widgets, manage SCPI commands, and invoke the real EEZ Studio backend for LVGL builds.

cli-anything-eth2-quickstart

>-

cli-anything-exa

>-

cli-anything-firefly-iii

Firefly III CLI - Personal finance management via CLI-Anything

cli-anything-freecad

Complete CLI harness for FreeCAD parametric 3D CAD modeler (258 commands). Covers ALL workbenches: Part (29 primitives + boolean + mirror + loft + sweep), Sketcher (26 cmds: geometry + constraints + editing), PartDesign (38 cmds: pad/pocket/groove/fillet/chamfer/patterns/hole/datum), Assembly (11 cmds), Mesh (16 cmds), TechDraw (15 cmds: views + dimensions + PDF/SVG), Draft (33 cmds: 2D shapes + arrays + transforms), FEM (12 cmds), CAM/CNC (10 cmds), Surface (6 cmds), Spreadsheet (7 cmds), Import (13 formats), Export (17 formats), Measure (12 cmds), Materials (21 presets). Headless FreeCAD export to STEP/IGES/STL/OBJ/DXF/PDF/glTF/3MF.

cli-anything-gimp

>-

cli-anything-godot

>-

관련 스킬