GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - geostyler/geostyler-cli

BranchesTags
Open more actions menu

Latest commit

 

History

339 Commits
339 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
src
src
 
 
testdata
testdata
 
 
.commitlintrc.cjs
.commitlintrc.cjs
 
 
.gitignore
.gitignore
 
 
.releaserc
.releaserc
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
bun.lock
bun.lock
 
 
eslint.config.mjs
eslint.config.mjs
 
 
package-binaries.cjs
package-binaries.cjs
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
renovate.json
renovate.json
 
 
rollup.config.mjs
rollup.config.mjs
 
 
test.cjs
test.cjs
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

GeoStyler CLI

A command line interface for GeoStyler to convert between various formats for styling of geographic data.

tl;dr

npx geostyler-cli --output new-qgis-style.qml my-existing.sld

🚀 GeoStyler Code Sprint 2026

We are happy to announce the next online-only GeoStyler Code Sprint from 28.-30.09.2026. Be part of it! More infos on https://geostyler.org.

Requirements

geostyler-cli can either be run as a standalone application or installed using Node.js.

Standalone application

Binaries are available for Linux, MacOS, and Windows on the Releases page. Download the zip file for your operating system, unzip, navigate to the folder and run the geostyler command:

geostyler-cli --output new-qgis-style.qml my-existing.sld

Usage without installation ⚡

Node.js includes npx, this allows you to run commands from a npm package without having to install it.

npx geostyler-cli -s sld -t qgis -o output.qml input.sld

Global installation

Installation 💾

Node.js includes npm - the JavaScript package manager. To install the geostyler command globally:

npm install -g geostyler-cli

You can then use the new geostyler-cli command, e.g.:

geostyler-cli -s sld -t qgis -o output.qml input.sld

To process a folder of files:

geostyler-cli -s sld -t qgis -o /outputdir /inputdir

Update 🚀

npm update -g geostyler-cli

Uninstalling 😔

npm uninstall -g geostyler-cli

Syntax and examples

To convert a single file:

geostyler-cli [options] -o /path/to/output.ext /path/to/input.ext
# example, relying on file extensions to select the parsers
geostyler-cli -o point_simple.sld testdata/point_simple.qml
# example with explicit parsers
geostyler-cli -s qml -t sld -o point_simple.sld testdata/point_simple.qml

To convert all files in a directory:

geostyler-cli [options] -t qgis -o /path/to/output /path/to/input/ [--quiet]
# example
geostyler-cli -s sld -t qgis -o ./output-sld testdata/sld

To output the GeoStyler format to stdout (only available for a single file), don't set an output file or parser:

geostyler-cli [options] /path/to/input.ext
# print the GeoStyler format to stdout (relying on the file extension to select the parser)
geostyler-cli testdata/point_simple.qml
# print an SLD output to stdout
geostyler-cli -t sld testdata/point_simple.qml

Options

  • -h / --help Display the help and exit.
  • -o / --output Output filename or directory. Required when the source is a directory. For a file leave this empty to write to stdout. [string]
  • -s / --source Source parser, either mapbox, mapfile, map sld - the parser will read the version from the file - qgis or qml for QGIS QML files, and ol-flat for OpenLayers FlatStyles. If not given, it will be guessed from the extension of the input file. Mandatory if the target is a directory.
  • -t / --target Target parser, either mapbox, sld, qgis or qml for QGIS QML files. If not given, it will be guessed from the extension of the output file. Mapfiles are not currently supported as target. Mandatory if the target is a directory.
  • --sourceOptions Options for the constructor of the source parser. This must be a comma-separated string like --sourceOptions 'version:1.1.0,debug:true'.
  • --targetOptions Same as sourceOptions, but for the target parser.
  • -v / --version Display the version of the program.
  • --quiet Suppress all interactive output.

Developing

Building the CLI from source requires Bun.

In your clone of the repo, in the root directory:

bun install   # get dependencies
bun run build # build from possibly changed source
# now you can call your build like this:
bun start -- -s sld -t qgis -o output.qml testdata/sld/point_simplepoint.sld

Funding & financial sponsorship

Maintenance and further development of this code can be funded through the GeoStyler Open Collective. All contributions and expenses can transparently be reviewed by anyone; you see what we use the donated money for. Thank you for any financial support you give the GeoStyler project 💞

About

No description, website, or topics provided.

Resources

Readme
BSD-2-Clause license
Activity
Custom properties

Stars

39 stars

Watchers

7 watching

Forks

13 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.