CLI Overview
qgis-cli
The qgis-cli binary provides command-line access to qgis-rs rendering and serving capabilities.
Commands
| Command | Description |
|---|---|
render | Render a QGIS project to an image |
tiles | Generate tile pyramids |
batch | Batch render multiple extents |
info | Inspect a QGIS project |
serve | Start an HTTP map server |
export | Export features from a layer |
mcp | Serve the same capabilities as an MCP server for AI assistants |
Installation
cargo install qgis-cliOr build from source:
cargo build --release -p qgis-cliQuick Examples
# Render a projectqgis-cli render map.qgs -o map.png
# Generate tilesqgis-cli tiles map.qgs -z 10-14 -b 14,50,15,51 -o ./tiles/
# Start a serverqgis-cli serve map.qgs --port 8080
# Inspect a projectqgis-cli info map.qgs
# Serve the same capabilities to an MCP client over stdioqgis-cli mcp