22 releases (5 breaking)

0.5.3 Feb 20, 2025
0.5.0 Jan 31, 2025
0.4.1 Oct 22, 2024
0.1.0 Apr 29, 2024
0.0.1 May 20, 2022

#1009 in Science

Download history 5/week @ 2024-12-04 16/week @ 2024-12-11 116/week @ 2025-01-29 14/week @ 2025-02-05 196/week @ 2025-02-12 644/week @ 2025-02-19 41/week @ 2025-02-26

900 downloads per month

MIT/Apache

2MB
9K SLoC

stac-cli

GitHub Workflow Status docs.rs Crates.io Crates.io Contributor Covenant

Command Line Interface (CLI) for STAC, named stacrs.

Installation

cargo install stac-cli

Then:

# Search
$ stacrs search https://landsatlook.usgs.gov/stac-server \
    --collections landsat-c2l2-sr \
    --intersects '{"type": "Point", "coordinates": [-105.119, 40.173]}' \
    --sortby='-properties.datetime' \
    --max-items 1000 \
    items.parquet

# Translate formats
$ stacrs translate items.parquet items.ndjson
$ stacrs translate items.ndjson items.json

# Migrate STAC versions
$ stacrs translate item-v1.0.json item-v1.1.json --migrate

# Search stac-geoparquet (no API server required)
$ stac search items.parquet

# Server
$ stacrs serve items.parquet  # Opens a STAC API server on http://localhost:7822

# Validate
$ stacrs validate item.json

Usage

stacrs provides the following subcommands:

  • stacrs search: searches STAC APIs and geoparquet files
  • stacrs serve: serves a STAC API
  • stacrs translate: converts STAC from one format to another
  • stacrs validate: validates a STAC value

Use the --help flag to see all available options for the CLI and the subcommands:

Features

This crate has two features:

  • pgstac: enable a pgstac backend for stacrs serve (enabled by default)

Other info

This crate is part of the stac-rs monorepo, see its README for contributing and license information.

Dependencies

~88MB
~1.5M SLoC