Installation#

Prerequisites#

  • Go 1.24 or later
  • Access to a GeoServer instance with REST API enabled

Build from Source#

Clone the repository and build:

1
2
3
git clone https://gitlab.com/aice/geoserver-cli.git
cd geoserver-cli
go build -o geoserver-cli ./cmd/geoserver-cli

Verify Installation#

Check that the CLI is working:

1
2
./geoserver-cli --help
./geoserver-cli version

Development Setup#

For development, install the required tools:

1
2
3
4
5
# Install git hooks (pre-commit checks)
./scripts/setup-git-hooks.sh

# Install development tools (golangci-lint)
./scripts/install-tools.sh

If you use direnv, add this to your .envrc:

1
PATH_add ./bin

Adding to PATH#

For convenience, add the binary to your PATH:

1
2
3
4
5
6
7
8
9
# Move to a directory in PATH
sudo mv geoserver-cli /usr/local/bin/

# Or create a symlink
ln -s $(pwd)/geoserver-cli /usr/local/bin/geoserver-cli

# Verify
which geoserver-cli
geoserver-cli version

Platform-Specific Notes#

macOS#

On macOS, you may need to allow the binary on first run:

1
2
# If you get a security warning
xattr -d com.apple.quarantine geoserver-cli

Linux#

Ensure the binary is executable:

1
chmod +x geoserver-cli

Windows#

Use Git Bash or WSL for the best experience. Native Windows builds work but may have path differences.

Docker Installation#

Run the CLI in Docker (no local Go installation required):

1
2
3
4
5
# Pull the image (when available)
docker pull registry.gitlab.com/aice/geoserver-cli:latest

# Run a command
docker run --rm registry.gitlab.com/aice/geoserver-cli:latest version

Next Steps#

  1. Configure your GeoServer connection
  2. Follow the Quick Start guide
  3. Explore Commands reference