Skip to content

CLI Overview

qgis-cli

The qgis-cli binary provides command-line access to qgis-rs rendering and serving capabilities.

Commands

CommandDescription
renderRender a QGIS project to an image
tilesGenerate tile pyramids
batchBatch render multiple extents
infoInspect a QGIS project
serveStart an HTTP map server
exportExport features from a layer
mcpServe the same capabilities as an MCP server for AI assistants

Installation

Terminal window
cargo install qgis-cli

Or build from source:

Terminal window
cargo build --release -p qgis-cli

Quick Examples

Terminal window
# Render a project
qgis-cli render map.qgs -o map.png
# Generate tiles
qgis-cli tiles map.qgs -z 10-14 -b 14,50,15,51 -o ./tiles/
# Start a server
qgis-cli serve map.qgs --port 8080
# Inspect a project
qgis-cli info map.qgs
# Serve the same capabilities to an MCP client over stdio
qgis-cli mcp