You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/cli/README.md
+10-14Lines changed: 10 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,9 @@ Command Line Interface (CLI) for [STAC](https://stacspec.org/), named `stacrs`.
11
11
## Installation
12
12
13
13
```sh
14
-
cargo install stac-cli
14
+
cargo install stac-cli -F duckdb # to use libduckdb on your system
15
+
# or
16
+
cargo install stac-cli -F duckdb-bundled # to build libduckdb on install (slow)
15
17
```
16
18
17
19
Then:
@@ -46,7 +48,7 @@ $ stacrs validate item.json
46
48
47
49
**stacrs** provides the following subcommands:
48
50
49
-
-`stacrs search`: searches STAC APIs and geoparquet files
51
+
-`stacrs search`: searches STAC APIs and, if the `duckdb` feature is enabled, geoparquet files
50
52
-`stacrs serve`: serves a STAC API
51
53
-`stacrs translate`: converts STAC from one format to another
52
54
-`stacrs validate`: validates a STAC value
@@ -55,20 +57,14 @@ Use the `--help` flag to see all available options for the CLI and the subcomman
55
57
56
58
## Features
57
59
58
-
This crate has two features:
60
+
This crate has three features:
59
61
60
-
-`pgstac`: enable a [pgstac](https://github.com/stac-utils/pgstac) backend for `stacrs serve` (enabled by default)
61
-
-`duckdb-bundled`: bundle DuckDB by building it from source, instead of using a local installation (enabled by default)
62
+
-`pgstac`: enable a [pgstac](https://github.com/stac-utils/pgstac) backend for `stacrs serve`
63
+
-`duckdb`: build with DuckDB support, which enables searching [stac-geoparquet](https://github.com/stac-utils/stac-geoparquet) (requires DuckDB to be present on your system)
64
+
-`duckdb-bundled`: bundle DuckDB by building it from source, instead of using a local installation (does _not_ require DuckDB to be present on your system)
62
65
63
-
### DuckDB
64
-
65
-
If you have DuckDB installed locally and want to use that shared library (instead of building it when you install), disable the `duckdb-bundled` feature:
> If you're using the `duckdb` feature, set `DUCKDB_LIB_DIR` to the directory containing your **libduckdb**. If you're on macos and using [Homebrew](https://brew.sh/), this might be `export DUCKDB_LIB_DIR=/opt/homebrew/lib`
The **stac-rs** command-line interface can be installed two ways.
8
8
If you have Rust, use `cargo`:
9
9
10
-
```shell
11
-
cargo install stac-cli
10
+
```sh
11
+
cargo install stac-cli -F duckdb # to use libduckdb on your system
12
+
# or
13
+
cargo install stac-cli -F duckdb-bundled # to build libduckdb on install (slow)
12
14
```
13
15
14
-
If you have Python, use `pip`:
16
+
The CLI is called **stacrs**:
15
17
16
18
```shell
17
-
python -m pip install stacrs
19
+
stacrs --help
18
20
```
19
21
20
-
The CLI is called **stacrs**:
22
+
If you don't have DuckDB on your system, you can also use the Python wheel, which includes **libduckdb**:
21
23
22
24
```shell
23
-
stacrs --help
25
+
python -m pip install stacrs
24
26
```
25
27
26
28
For examples of using the CLI, check out the slides from [@gadomski's](https://github.com/gadomski/) 2024 FOSS4G-NA presentation [here](https://www.gadom.ski/2024-09-FOSS4G-NA-stac-rs/).
0 commit comments