Stateful QGIS CLI for projects, writable layers, features, layouts, exports, and qgis_process operations using the real QGIS runtime.
Use this skill when you need to inspect or modify QGIS projects from the terminal through the real QGIS runtime.
qgis_process on PATH--json for all machine-driven use.--project <path> when operating on an existing project.cli-anything-qgis with no subcommand starts a stateful REPL.native:printlayouttopdfnative:printlayouttoimage.qgs / .qgz projectskey=value attributesqgis_process algorithmsprojectnew -o/--output [--title] [--crs]open PATHsave [PATH]infoset-crs CRSlayercreate-vector --name --geometry --crs [--field name:type ...]listinfo LAYERremove LAYERfeatureadd --layer LAYER --wkt WKT [--attr key=value ...]list --layer LAYER [--limit N]layoutcreate --name [--page-size] [--orientation]listinfo LAYOUTremove LAYOUTadd-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]exportpresetspdf OUTPUT --layout LAYOUT [--dpi] [--force-vector] [--force-raster] [--georeference/--no-georeference] [--overwrite]image OUTPUT --layout LAYOUT [--dpi] [--overwrite]processlisthelp ALGORITHM_IDrun ALGORITHM_ID [--param KEY=VALUE ...]sessionstatushistory [--limit N]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
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
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
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
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