Communitygithub.com

CLI-Anything OpenRefine

通过代理原生CLI使用OpenRefine进行数据导入、应用JSON操作历史、检查行、导出清洗后的数据以及管理会话的撤销/重做。

CLI-Anything OpenRefine 是什么?

CLI-Anything OpenRefine 技能为 AI 代理提供了一个原生命令行接口,使其能够自动化执行 OpenRefine 的数据清洗和转换工作流。该技能允许代理导入混乱的 CSV 或 TSV 数据,应用可复用的 JSON 操作历史记录,检查和预览数据行,以及将清洗后的结果导出为 CSV 或 TSV 格式。它支持通过 JSON 输出实现无状态的一键命令,以及通过会话文件实现有状态的、可中断恢复的多步骤工作流。核心优势在于它以纯命令行方式运行,无需图形界面,使得数据清理任务可以被编码、版本控制和集成到 CI/CD 管道中。该技能在 openrefine/agent-harness 之上运行,需要预先安装 Python 并启动 OpenRefine 服务。操作历史可以被保存为 JSON 文件,用于跨不同数据集重复使用清洗逻辑,从而实现高度可复现的数据预处理。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-openrefine

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

CLI-Anything OpenRefine 是做什么的?

当任务需要通过自动化代理工作流进行OpenRefine数据清洗、转换、可复用操作历史或CSV/TSV导出时,使用此技能。

前提条件

安装工具集:

cd openrefine/agent-harness
python -m pip install -e .

在运行后端命令前启动 OpenRefine:

openrefine -i 127.0.0.1 -p 3333

使用 OPENREFINE_URL=http://127.0.0.1:3333 或传递 --base-url 设置自定义服务器。

代理命令规则

  • 在每个一次性命令上优先使用 --json。
  • 对隔离的任务状态使用 --session <path>。
  • 在行操作、应用、导出、撤销或重做命令之前,先导入或打开一个项目。
  • 现有的 OpenRefine 操作历史 JSON 可以直接传递给 data apply。
  • 生成的文件是标准的 OpenRefine 操作 JSON 和导出的 CSV/TSV 数据。

常用命令

cli-anything-openrefine --json server ping
cli-anything-openrefine --json project list
cli-anything-openrefine --json --session run/session.json project import messy.csv --name cleanup
cli-anything-openrefine --json --session run/session.json data rows --limit 10
cli-anything-openrefine --json ops text-transform run/trim.json --column Name --expression 'value.trim()'
cli-anything-openrefine --json --session run/session.json data apply run/trim.json
cli-anything-openrefine --json --session run/session.json data export run/clean.csv --format csv
cli-anything-openrefine --json --session run/session.json session undo
cli-anything-openrefine --json --session run/session.json session redo

REPL

不带子命令运行 cli-anything-openrefine 即可进入 REPL。

对于自动化用户旅程,通过 stdin 传输以换行符分隔的 REPL 命令。 重定向的流会自动使用仅 ASCII 的输入/输出路径,而交互式终端则保留 Unicode 横幅、提示历史和样式:

printf 'help\nexit\n' | cli-anything-openrefine

当 REPL 被重定向时,Unicode 载荷会被渲染为可逆的 ASCII 反斜杠转义,防止旧版 Windows 输出编码将成功命令变为失败的旅程。

管道化工作流在 exit 或 EOF 时,如果有任何命令失败,则返回非零退出状态,允许 CI 检测到不成功的用户旅程。

错误处理

当设置了 --json 时,命令失败会将包含 ok: false 的 JSON 对象写入 stderr。

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

>-

相关技能