💻 Command Line Interface#

The fetchez command line tool allows you to chain modules and hooks together.

fetchez#

Fetch geospatial data with ease.

Fetchez is a streaming ETL pipeline for geospatial data.
It allows you to download geospatial data from local or remote sources,
pipe that data through processing hooks (like clipping or reprojecting),
and save the results to disk. All in a single command or a YAML recipe.
Core Concepts:
1. Modules : Data Sources (see fetchez modules)
2. Hooks : Processing Steps (see fetchez hooks)
3. Streams : Data Streaming (see fetchez streams)
4. Recipes : YAML pipeline definitions (see fetchez recipes)
5. Pipelines : Run full data processing pipelines (see fetchez run)

Usage

fetchez [OPTIONS] COMMAND [ARGS]...

Options

--version#

Show the version and exit.

--verbose#

Enable verbose debug logging.

--quiet#

Suppress non-error output.

hooks#

Discover, search, and learn about data processors.

Hooks are modular processing steps (filters, transforms, algorithms) that manipulate data streams or files in a pipeline.

How to use Hooks:
1. In YAML Recipes: Defined under hooks (per-module) or global_hooks.
2. In CLI Commands: Appended directly to data sources using the –hook switch
or globally with –globl-hook.
* Hooks take a fetchez entry dictionary as input and they return a fetchez dictionary
as output.
* Along the way, they may manipulate that entry dictionary in different ways, such as
by modifying entry values, creating artifacts, adding data streams, adding metadata,
etc.
* Use fetchez hooks info <hook-name> to get more information about what a hook does.
Hooks run in different stages of the pipeline:
1. Manifest : Runs on the initial file manifest before any fetching begins.
2. File : Runs of a fetched or local file.
3. Stream : Runs on an in-memory data stream of the fetched file.
4. Collection : Runs on the final collection of data that has been through the
previous stages.
This command group lets you explore the available Data ‘Hooks’ and the multi-hook
‘Presets’ that can be injected into Fetchez pipelines..

Usage

fetchez hooks [OPTIONS] COMMAND [ARGS]...

info#

Show arguments and YAML recipe examples for a specific hook.

Usage

fetchez hooks info [OPTIONS] NAME

Arguments

NAME#

Required argument

list#

List all available processing hooks grouped by category.

Usage

fetchez hooks list [OPTIONS]

Options

-s, --search <search>#

Filter hooks by name or keyword.

presets#

Discover, inspect, and copy processing macros.

Presets are YAML macros that chain multiple processing Hooks together
under a single name. If you frequently run the exact same sequence of
filters, you can save them as a Preset and call them with one word.
Usage:
Presets act exactly like Hooks. You can pass them to –hook, –global-hook,
or list them in your Recipe’s hook list.

Usage

fetchez hooks presets [OPTIONS] COMMAND [ARGS]...
copy#

Copy a preset to your local ~/.fetchez/ folder for editing.

Usage

fetchez hooks presets copy [OPTIONS] NAME

Arguments

NAME#

Required argument

dump#

Print the raw YAML definition to the terminal.

Usage

fetchez hooks presets dump [OPTIONS] NAME

Arguments

NAME#

Required argument

info#

Print a clean, readable summary of a preset’s contents.

Usage

fetchez hooks presets info [OPTIONS] NAME

Arguments

NAME#

Required argument

list#

List all available built-in and local presets.

Usage

fetchez hooks presets list [OPTIONS]

modules#

Discover, search, and learn about data sources.

Modules are the starting point of any Fetchez pipeline. They are responsible
for discovering and downloading data from remote agencies (like NOAA, USGS,
Copernicus) or loading it from your local file system.
This command group lets you explore and run the available Data ‘Modules’ and
‘Bundles’ that give access to geospatial data around the world.

Usage

fetchez modules [OPTIONS] COMMAND [ARGS]...

bundles#

Discover, inspect, and copy module groups.

Bundles are pre-configured YAML lists of Modules. Instead of manually
typing out multiple different data sources and their specific arguments,
you can call a single Bundle that contains them all.
Usage:
Bundles act exactly like Modules. You can pass them directly to fetchez run.
As such, Bundles can reference other Bundles as well as Modules.

Usage

fetchez modules bundles [OPTIONS] COMMAND [ARGS]...
copy#

Copy a module bundle to your local ~/.fetchez/ folder for editing.

Usage

fetchez modules bundles copy [OPTIONS] NAME

Arguments

NAME#

Required argument

dump#

Print the raw YAML definition to the terminal.

Usage

fetchez modules bundles dump [OPTIONS] NAME

Arguments

NAME#

Required argument

info#

Print a clean, readable summary of a bundle’s contents.

Usage

fetchez modules bundles info [OPTIONS] NAME

Arguments

NAME#

Required argument

list#

List all available built-in and local bundles.

Usage

fetchez modules bundles list [OPTIONS]

info#

Get detailed metadata and available CLI arguments for a module.

Usage

fetchez modules info [OPTIONS] NAME

Arguments

NAME#

Required argument

list#

List all available modules grouped by category.

Usage

fetchez modules list [OPTIONS]

Options

-s, --search <search>#

Search by name, description, agency, or tag.

update-cache#

Forces a clean rescan of all built-in, Globato, and user-defined modules.

Use this if you recently installed a new extension or added a custom Python plugin to your ~/.fetchez/modules/ folder and it isn’t showing up.

Usage

fetchez modules update-cache [OPTIONS]

pipeline#

Fetch/download data and execute processing pipelines.

How CLI Pipelines Work:
The run command allows you to chain multiple Data Modules together
and apply Processing Hooks to them.
* Module Arguments follow the module name (e.g., copernicus –datatype 3).
* Module Hooks (–hook) apply only to the module they follow.
* Global Hooks (–global-hook) apply to all data flowing through the pipeline.
Syntax:
fetchez run -R <W/E/S/N> [–global-hook <name>] <module_1> [–hook <name>] <module_2> …
* Run fetchez modules to learn more about supported modules and extensions..
* Run fetchez hooks to learn more about supported hooks and extensions.

Usage

fetchez pipeline [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...

Options

-R, --region <region>#
Bounding box (W/E/S/N)
Region Formats:
xmin/xmax/ymin/ymax : Bounding box
loc:”City,State” : Geocode place name
file.geojson : Bounding box(es) of vector file
--region-srs <region_srs>#

Set the SRS of the input bounding box (default: EPSG:4326).

--global-hook <global_hook>#

Attach a global processing hook.

--schema <schema>#

Apply a validation schema (e.g., ‘crm’).

--threads <threads>#

Number of parallel download threads (default: 1).

--export <export>#

Export to YAML instead of executing.

--shared-cache <shared_cache>#

Centralized directory to cache fetched data.

recipes#

Execute, Discover, inspect, and copy complete pipeline workflows.

Recipes are YAML files that define an entire ETL pipeline from start to finish.
They contain the project metadata, the requested Data Modules, and the
Processing Hooks used to filter and process the data.
Recipes make your data pipelines 100% reproducible. You can version-control
them, share them with colleagues, or run them in batch mode over multiple regions.
This command group lets you explore and run the available ‘Recipes’ that hold the
instructions and the ‘Schemas’ that can modify them.

Usage

fetchez recipes [OPTIONS] COMMAND [ARGS]...

copy#

Copy a recipe to your local ~/.fetchez/ folder for editing.

Usage

fetchez recipes copy [OPTIONS] NAME

Arguments

NAME#

Required argument

dump#

Print the raw YAML definition to the terminal.

Usage

fetchez recipes dump [OPTIONS] NAME

Arguments

NAME#

Required argument

info#

Print a clean, readable summary of a recipe’s contents.

Usage

fetchez recipes info [OPTIONS] NAME

Arguments

NAME#

Required argument

list#

List all available built-in and local recipes.

Usage

fetchez recipes list [OPTIONS]

run#

Execute a YAML recipe by registry name or file path.

Usage

fetchez recipes run [OPTIONS] NAME

Options

-R, --region <region>#
Bounding box (W/E/S/N)
Region Formats:
xmin/xmax/ymin/ymax : Bounding box
loc:”City,State” : Geocode place name
file.geojson : Bounding box(es) of vector file
-D, --outdir <outdir>#

Base output directory for recipe outputs.

--region-srs <region_srs>#

Set the SRS of the input bounding box (default: EPSG:4326).

--shared-cache <shared_cache>#

Centralized directory to cache fetched data.

Arguments

NAME#

Required argument

schemas#

Discover, search, and learn about recipe schemas.

Schemas are strict validation rulesets that can be applied to Recipes.
They ensure that any data flowing through the pipeline adheres to specific
domain standards (e.g., forcing all output to be in EPSG:4326, or requiring
mandatory metadata tags).

Usage

fetchez recipes schemas [OPTIONS] COMMAND [ARGS]...
info#

Show arguments and YAML recipe examples for a specific hook.

Usage

fetchez recipes schemas info [OPTIONS] NAME

Arguments

NAME#

Required argument

list#

List all available processing schemas grouped by category.

Usage

fetchez recipes schemas list [OPTIONS]

Options

-s, --search <search>#

Filter schemas by name or keyword.

translate#

Translate a YAML recipe into a fetchez CLI command string or JSON.

Usage

fetchez recipes translate [OPTIONS] NAME

Options

--json#

Convert the YAML recipe directly to JSON.

Arguments

NAME#

Required argument

validate#

Check a recipe for syntax errors, logical issues, and missing dependencies.

Usage

fetchez recipes validate [OPTIONS] NAME

Arguments

NAME#

Required argument

region#

Generate and manipulate spatial bounding boxes and tilesets.

Region Formats:
xmin/xmax/ymin/ymax : Bounding box
loc:”City,State” : Geocode place name
file.geojson : Bounding box(es) of vector file

Usage

fetchez region [OPTIONS] COMMAND [ARGS]...

Options

--version#

Show the version and exit.

buffer#

Expand a bounding box by a given percentage.

Example: fetchez regions –region -120/-119/34/35 buffer –pct 10

Usage

fetchez region buffer [OPTIONS]

Options

-R, --region <region_str>#

Required Bounding box (W/E/S/N)

--pct <pct>#

Percentage to buffer the region (default: 5.0).

-F, --format <format>#
Options:

gmt | bbox | wkt | geojson | fn

echo#

Parse a region and echo it to stdout.

Useful for geocoding a location and piping it to another command. Example: globato region echo –region loc:”San Diego, CA” -F wkt

Usage

fetchez region echo [OPTIONS]

Options

-R, --region <region_str>#

Required Bounding box (W/E/S/N)

-F, --format <format>#

Output format.

Options:

gmt | bbox | wkt | geojson | fn

split#

Split a region into a GeoJSON tileset for batch processing.

Example: fetchez region split loc:”California” –size 0.5 -O cali_tiles.geojson

Usage

fetchez region split [OPTIONS]

Options

-R, --region <region_str>#

Required Bounding box (W/E/S/N)

--size <size>#

Required Tile size in decimal degrees (e.g., 0.25 for 1/4 degree tiles).

-O, --out <out>#

Required Output GeoJSON file to save the tileset.

--prefix <prefix>#

Prefix for the generated tile names (default: ‘tile’).

transform#

Transform a region to a new coordinate reference system.

Densifies the boundary before projecting to ensure safe encapsulation.

Example: fetchez region transform loc:”San Francisco” –t-srs EPSG:3857

Usage

fetchez region transform [OPTIONS]

Options

-R, --region <region_str>#

Required Bounding box (W/E/S/N)

--t-srs <t_srs>#

Required Target spatial reference system (e.g., EPSG:3857).

--s-srs <s_srs>#

Source spatial reference system (default: EPSG:4326).

-F, --format <format>#

Output format.

Options:

gmt | bbox | wkt | geojson | fn

streams#

Discover, search, and learn about streams.

When Fetchez downloads a file (like a GeoTIFF or NetCDF), it can use Streams
to read the data piece-by-piece in memory. This allows for control over how
to process different datasets.
This command group lets you explore the internal ‘Readers’ that parse the
files, and the ‘Profiles’ that tell those readers exactly how to behave.

Usage

fetchez streams [OPTIONS] COMMAND [ARGS]...

profiles#

Discover, inspect, and copy stream format profiles.

Different datasets are formatted differently (e.g., one NetCDF uses ‘lon’
and ‘lat’, another uses ‘x’ and ‘y’). Profiles are YAML dictionaries that
tell a Reader exactly how to parse a specific dataset’s format.

Usage

fetchez streams profiles [OPTIONS] COMMAND [ARGS]...
copy#

Copy a reader profile to your local ~/.fetchez/ folder for editing.

Usage

fetchez streams profiles copy [OPTIONS] NAME

Arguments

NAME#

Required argument

dump#

Print the raw YAML definition to the terminal.

Usage

fetchez streams profiles dump [OPTIONS] NAME

Arguments

NAME#

Required argument

info#

Print a clean, readable summary of a bundle’s contents.

Usage

fetchez streams profiles info [OPTIONS] NAME

Arguments

NAME#

Required argument

list#

List all available built-in and local profiles.

Usage

fetchez streams profiles list [OPTIONS]

Options

-s, --search <search>#

Filter profiles by name or keyword.

readers#

Discover, search, and learn about stream format readers.

Readers are the underlying Python classes (like ‘rasterio-point-reader’ or
‘csvreader’) that open downloaded files and convert them into standard
streams or chunks for processing.
Usage:
You rarely call Readers directly. They are automatically triggered by the
stream-init hook based on the file extension or the data’s ‘Profile’,
defined by the modules’ entry[‘data_type’].
Format reader streams can be initiated with the stream-init hook which
will populate entry[‘stream’] and entry[‘stream-type’] in the pipeline.

Usage

fetchez streams readers [OPTIONS] COMMAND [ARGS]...
info#

Show arguments and YAML recipe examples for a specific reader.

Usage

fetchez streams readers info [OPTIONS] NAME

Arguments

NAME#

Required argument

list#

List all available stream readers grouped by category.

Usage

fetchez streams readers list [OPTIONS]

Options

-s, --search <search>#

Filter readers by name or keyword.