Skip to content

A Midnight Commander-style TUI for managing GeoServer instances - upload layers and styles, browse workspaces, stores, and layers

License

Notifications You must be signed in to change notification settings

kartoza/kartoza-cloudbench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kartoza GeoServer Client

A Midnight Commander-style TUI (Terminal User Interface) for managing GeoServer instances. Browse local geospatial files and upload them to GeoServer with ease.

Go Version License

Features

TUI (Terminal User Interface)

  • Dual-panel interface - Local filesystem on the left, GeoServer explorer on the right
  • Connection manager - Store and manage multiple GeoServer connections with credentials
  • Geospatial file detection - Automatically identifies Shapefiles, GeoPackage, GeoTIFF, GeoJSON, SLD, and CSS files
  • GeoServer hierarchy browser - Navigate workspaces, data stores, coverage stores, layers, styles, and layer groups
  • Upload support - Upload local files to GeoServer and publish as services with progress tracking
  • CRUD operations - Create, edit, and delete workspaces, data stores, and coverage stores
  • Layer preview - Built-in MapLibre web viewer with WMS/WFS support, attribute viewing, and metadata display
  • Animated dialogs - Smooth spring-based animations using Harmonica physics
  • Vim-style navigation - Use familiar j/k keys for navigation

Web UI

  • Modern React interface - Beautiful Chakra UI-based web application
  • Tree browser - Hierarchical view of all GeoServer resources
  • Layer metadata editing - Comprehensive metadata management including title, abstract, keywords, and attribution
  • GeoWebCache management - Seed, reseed, and truncate cached tiles with real-time progress
  • Map preview - Interactive map preview with WMS/WMTS support
  • Server synchronization - Replicate resources between GeoServer instances with animated UI

Installation

Using Nix (recommended)

nix run github:kartoza/kartoza-geoserver-client

From source

git clone https://github.com/kartoza/kartoza-geoserver-client.git
cd kartoza-geoserver-client
go build -o geoserver-client .
./geoserver-client

Development

nix develop  # Enter development shell
go run .     # Run the TUI application

Web UI

nix develop  # Enter development shell
go run . web # Run the web server on port 8080

Or visit http://localhost:8080 after starting the web server.

Usage

Keyboard Shortcuts

Global

Key Action
Tab Switch between panels
? / F1 Toggle help
q / Ctrl+C Quit

Navigation

Key Action
/ k Move up
/ j Move down
Enter / l Open / Expand
Backspace / h Go back / Collapse
PgUp / PgDn Page up / down
Home / End Go to start / end

Actions

Key Action
Space Select file
i View resource information
c Open connection manager
u Upload selected files
r Refresh current view

Connection Manager

Key Action
a Add new connection
e Edit connection
d Delete connection
t Test connection
Enter Connect to selected

GeoServer Tree (CRUD Operations)

Key Action
n Create new item (workspace, store)
e Edit/rename selected item
d Delete selected item
o Preview layer in browser

Workspace Creation/Edit Wizard

When creating or editing a workspace, a wizard provides access to:

  • Basic Info - Workspace name, default workspace option, isolated workspace option
  • Services - Toggle which OGC services are enabled for this workspace (WMTS, WMS, WCS, WPS, WFS)
  • Settings - Enable/disable workspace-specific settings

Layer Edit Wizard

When editing a layer (press e on a layer), you can configure:

  • Enabled - Whether the layer is enabled for service requests
  • Advertised - Whether the layer appears in GetCapabilities documents
  • Queryable - Whether the layer supports GetFeatureInfo (vector layers only)

Store Edit Wizard

When editing a data store or coverage store, you can configure:

  • Name - The store name
  • Enabled - Whether the store is enabled
  • Description - Optional description

These settings match the options available in the GeoServer web admin interface.

Store Creation Wizard

When creating a data store or coverage store, a wizard guides you through:

  1. Type Selection - Choose the store type (PostGIS, Shapefile Directory, GeoPackage, etc.)
  2. Configuration - Enter the required connection parameters for your chosen type

Supported Data Store Types:

  • PostGIS - Connect to PostgreSQL/PostGIS databases
  • Directory of Shapefiles - Reference a folder containing shapefiles
  • GeoPackage - Connect to GeoPackage files
  • Web Feature Service (WFS) - Connect to external WFS services

Supported Coverage Store Types (Raster):

  • GeoTIFF - Single GeoTIFF raster file
  • World Image - PNG/JPEG/GIF with world file (.pgw, .jgw, .gfw)
  • Image Mosaic - Directory of images forming a mosaic
  • Image Pyramid - Multi-resolution image pyramid
  • ArcGrid - ESRI ASCII Grid format (.asc)
  • GeoPackage (Raster) - Raster tiles in GeoPackage format

Form Editing (vim-style)

Key Action
j / k Navigate between fields
Enter Edit field / Accept value
Esc Cancel edit / Go back
Ctrl+S Save form

Layer Preview

Press o on any layer in the GeoServer tree to open an interactive map preview in your browser. The preview includes:

  • MapLibre GL - Hardware-accelerated WebGL map rendering with OpenStreetMap basemap
  • WMS layer overlay - Displays the layer via GeoServer's WMS service
  • Feature query - Click on vector layers to view feature attributes
  • Metadata panel - View layer details, workspace, and service endpoints
  • Attributes table - Browse feature attributes for vector layers

Web UI Features

Server Synchronization

Replicate GeoServer configurations between instances. Access via Settings (gear icon) > "Sync Server(s)":

  1. Select Source - Choose the source GeoServer (read-only) from the left panel
  2. Add Destinations - Drag or select destination servers to the right panel
  3. Configure Options - Select which resources to sync:
    • Workspaces
    • Data Stores
    • Coverage Stores
    • Layers
    • Styles
    • Layer Groups
  4. Start Sync - Click the sync button to begin replication
  5. Monitor Progress - Watch real-time progress with animated indicators
  6. Save Configuration - Save sync setups for easy reloading

Features:

  • Animated UI - Visual feedback with pulsing icons and flowing arrows
  • Real-time progress - Per-destination progress bars and activity logs
  • Stop controls - Stop individual syncs or all at once
  • Additive sync - Only adds or updates missing resources (non-destructive)

GeoWebCache Management

Manage tile caching for optimal performance:

  • Seed - Pre-generate cached tiles for faster access
  • Reseed - Regenerate existing cached tiles
  • Truncate - Clear cached tiles to free storage
  • Progress monitoring - Track seeding operations in real-time

Layer Metadata

Edit comprehensive layer metadata:

  • Title, abstract, and keywords
  • Attribution information
  • Coordinate reference systems
  • Bounding boxes
  • Service endpoint configuration

Configuration

Configuration is stored in ~/.config/kartoza-geoserver-client/config.json:

{
  "connections": [
    {
      "id": "uuid",
      "name": "My GeoServer",
      "url": "https://geoserver.example.com/geoserver",
      "username": "admin",
      "password": "geoserver"
    }
  ],
  "active_connection": "uuid",
  "last_local_path": "/home/user/geodata",
  "sync_configs": [
    {
      "id": "sync-uuid",
      "name": "Production to Staging",
      "source_id": "uuid",
      "destination_ids": ["dest-uuid-1", "dest-uuid-2"],
      "options": {
        "workspaces": true,
        "datastores": true,
        "coveragestores": true,
        "layers": true,
        "styles": true,
        "layergroups": true
      },
      "created_at": "2024-01-15T10:30:00Z"
    }
  ]
}

Supported File Types

Type Extensions Upload Target
Shapefile .shp, .zip Data Store
GeoPackage .gpkg Data Store
GeoTIFF .tif, .tiff Coverage Store
GeoJSON .geojson, .json Data Store
SLD Style .sld Styles
CSS Style .css Styles

GeoServer REST API

This client uses the GeoServer REST API for all operations. Ensure your GeoServer instance has the REST API enabled and your user has appropriate permissions.

Required Permissions

  • Read access to workspaces, stores, layers, and styles
  • Write access for uploading data and creating resources

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

About

A Midnight Commander-style TUI for managing GeoServer instances - upload layers and styles, browse workspaces, stores, and layers

Resources

License

Stars

Watchers

Forks

Packages

No packages published