Communitygithub.com

cli-anything-qgis

Zustandsbehaftetes QGIS-CLI für Projekte, beschreibbare Layer, Features, Layouts, Exporte und qgis_process-Operationen mit der echten QGIS-Laufzeit.

Was ist cli-anything-qgis?

Diese Fähigkeit bietet ein zustandsbehaftetes Kommandozeilen-Interface (CLI) für die echte QGIS-Laufzeitumgebung. Sie ermöglicht Entwicklern, interaktiv oder scriptgesteuert QGIS-Projekte zu erstellen, zu öffnen, zu speichern und zu inspizieren. Mit Kommandogruppen für Projekt, Layer, Features, Layouts, Exporte und QGIS-Prozessalgorithmen deckt sie die wichtigsten GIS-Workflows ab. Das CLI unterstützt sowohl einmalige Befehle als auch einen REPL-Modus (Read-Eval-Print-Loop) und nutzt die native QGIS-Engine für Operationen wie Layer-Erstellung, Feature-Hinzufügung, Drucklayout-Generierung und PDF/Image-Export. Die Ausgabe im JSON-Format erleichtert die maschinelle Auswertung und die Integration in Automatisierungspipelines, was besonders für DevOps- und CI/CD-Workflows mit GIS-Daten nützlich ist.

Funktioniert mit~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-qgis

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

Was macht cli-anything-qgis?

Verwenden Sie diese Fähigkeit, wenn Sie QGIS-Projekte über das Terminal mit der echten QGIS-Laufzeit inspizieren oder bearbeiten möchten.

Voraussetzungen

  • QGIS installiert mit qgis_process im PATH
  • PyQGIS importierbar aus der Python-Umgebung, die das CLI ausführt
  • Python 3.10+

Anleitung für Agenten

  • Für maschinelle Verwendung --json bevorzugen.
  • Für einmalige Befehle --project <Pfad> übergeben, wenn auf einem vorhandenen Projekt gearbeitet wird.
  • cli-anything-qgis ohne Unterbefehl startet einen zustandsbehafteten REPL.
  • Der Layoutexport wird durch echte QGIS-Verarbeitungsalgorithmen unterstützt:
    • native:printlayouttopdf
    • native:printlayouttoimage

Was dieses CLI abdeckt

  • .qgs-/qgz-Projekte erstellen, öffnen, speichern und inspizieren
  • beschreibbare, auf GeoPackage basierende Vektor-Layer erstellen
  • Features hinzufügen per WKT-Geometrie und typisierten Schlüssel=Wert-Attributen
  • Drucklayouts erstellen und Karten-/Beschriftungselemente hinzufügen
  • Layouts als PDF oder Bild exportieren
  • generische qgis_process-Algorithmen inspizieren und ausführen
  • Sitzungsstatus und -verlauf inspizieren

Befehlgruppen

project

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

layer

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

feature

  • add --layer LAYER --wkt WKT [--attr schlüssel=wert ...]
  • 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 AUSGABE --layout LAYOUT [--dpi] [--force-vector] [--force-raster] [--georeference/--no-georeference] [--overwrite]
  • image AUSGABE --layout LAYOUT [--dpi] [--overwrite]

process

  • list
  • help ALGORITHMUS_ID
  • run ALGORITHMUS_ID [--param SCHLÜSSEL=WERT ...]

session

  • status
  • history [--limit N]

Beispiele

Ein Projekt erstellen und einen beschreibbaren Layer hinzufügen

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

Features hinzufügen und inspizieren

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

Ein Layout erstellen und exportieren

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

Verarbeitungsalgorithmen inspizieren oder ausführen

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

Beispiel für interaktiven Ablauf:

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

>-

Verwandte Skills