Communitygithub.com

cli-anything-qgis

Stateful QGIS CLI for projects, writable layers, features, layouts, exports, and qgis_process operations using the real QGIS runtime.

cli-anything-qgis 是什么?

cli-anything-qgis is a Claude Code agent skill that stateful QGIS CLI for projects, writable layers, features, layouts, exports, and qgis_process operations using the real QGIS runtime.

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

在你喜欢的 AI 中提问

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

文档

cli-anything-qgis 是做什么的?

Use this skill when you need to inspect or modify QGIS projects from the terminal through the real QGIS runtime.

Requirements

  • QGIS installed with qgis_process on PATH
  • PyQGIS importable from the Python environment running the CLI
  • Python 3.10+

Agent guidance

  • Prefer --json for all machine-driven use.
  • For one-shot commands, pass --project <path> when operating on an existing project.
  • Running cli-anything-qgis with no subcommand starts a stateful REPL.
  • Layout export is backed by real QGIS processing algorithms:
    • native:printlayouttopdf
    • native:printlayouttoimage

What this CLI covers

  • create, open, save, and inspect .qgs / .qgz projects
  • create writable GeoPackage-backed vector layers
  • add features via WKT geometry and typed key=value attributes
  • create print layouts and add map/label items
  • export layouts to PDF or image
  • inspect and run generic qgis_process algorithms
  • inspect session status and history

Command groups

project

  • new -o/--output [--title] [--crs]
  • open PATH
  • save [PATH]
  • info
  • set-crs CRS

layer

  • create-vector --name --geometry --crs [--field name:type ...]
  • list
  • info LAYER
  • remove LAYER

feature

  • add --layer LAYER --wkt WKT [--attr key=value ...]
  • list --layer LAYER [--limit N]

layout

  • create --name [--page-size] [--orientation]
  • list
  • info LAYOUT
  • remove LAYOUT
  • add-map --layout LAYOUT --x --y --width --height [--extent xmin,ymin,xmax,ymax]
  • add-label --layout LAYOUT --text TEXT --x --y --width --height [--font-size N]

export

  • presets
  • pdf OUTPUT --layout LAYOUT [--dpi] [--force-vector] [--force-raster] [--georeference/--no-georeference] [--overwrite]
  • image OUTPUT --layout LAYOUT [--dpi] [--overwrite]

process

  • list
  • help ALGORITHM_ID
  • run ALGORITHM_ID [--param KEY=VALUE ...]

session

  • status
  • history [--limit N]

Examples

Create a project and add a writable layer

cli-anything-qgis --json project new -o demo.qgz --title "Demo" --crs EPSG:4326
cli-anything-qgis --json --project demo.qgz layer create-vector \
  --name places \
  --geometry point \
  --field name:string \
  --field score:int

Add features and inspect them

cli-anything-qgis --json --project demo.qgz feature add \
  --layer places \
  --wkt "POINT(1 2)" \
  --attr name=HQ \
  --attr score=5

cli-anything-qgis --json --project demo.qgz feature list --layer places --limit 10

Create and export a layout

cli-anything-qgis --json --project demo.qgz layout create --name Main
cli-anything-qgis --json --project demo.qgz layout add-map --layout Main --x 10 --y 20 --width 180 --height 120
cli-anything-qgis --json --project demo.qgz layout add-label --layout Main --text "Demo map" --x 10 --y 8 --width 100 --height 10
cli-anything-qgis --json --project demo.qgz export pdf output.pdf --layout Main --overwrite

Inspect or run processing algorithms

cli-anything-qgis --json process help native:buffer
cli-anything-qgis --json --project demo.qgz process run native:buffer \
  --param INPUT=/tmp/demo_data.gpkg|layername=places \
  --param DISTANCE=1 \
  --param SEGMENTS=8 \
  --param END_CAP_STYLE=0 \
  --param JOIN_STYLE=0 \
  --param MITER_LIMIT=2 \
  --param DISSOLVE=false \
  --param OUTPUT=/tmp/buffer.geojson

REPL

cli-anything-qgis

Example interactive flow:

project new -o demo.qgz --title "Demo"
layer create-vector --name places --geometry point --field name:string
feature add --layer places --wkt "POINT(1 2)" --attr name=HQ
layout create --name Main
session status
quit

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

>-

相关技能