CLI Reference

Command Line Concepts

Some forward material.

Option Types Formatting

FILTER

Specify a Data API search filter provided as JSON. @- specifies stdin and @filename specifies reading from a file named ‘filename’. Otherwise, the value is assumed to be JSON.

GEOM

Specify a geometry in GeoJSON format either as an inline value, stdin, or a file. @- specifies stdin and @filename specifies reading from a file named ‘filename’. Otherwise, the value is assumed to be GeoJSON.

FIELD VALUES…

Specifies an ‘in’ query where FIELD is a property of the item-type and VALUES is space or comma separated text or numbers.

FIELD COMP VALUE…

A comparison query format where FIELD is a property of the item-type and COMP is one of lt, lte, gt, gte and VALUE is the number or date to compare against.

Note: ISO-8601 variants are supported. For example, 2017 is short for 2017-01-01T00:00:00+00:00.

ASSET-TYPE

Specify Asset-Type(s) of interest. Case-insenstive, supports glob-matching, e.g. visual* specifies visual and visual_xml.

ITEM-TYPE

Specify Item-Type(s) of interest. Case-insensitive, supports glob-matching, e.g. psscene* means PSScene3Band and PSScene4Band. The all value specifies every Item-Type.

General Options

--workers
The number of concurrent downloads when requesting multiple scenes. - Default 4
--verbose
Specify verbosity
--api-key
Valid API key - or via ENV variable PL_API_KEY
--base-url
Change the base Planet API URL or ENV PL_API_BASE_URL - Default https://api.planet.com/
--version
Show the version and exit.

General Commands

help Get command help

init Login using email/password

help

Get command help

Usage: help [OPTIONS] [COMMAND]

init

Login using email/password

Usage: init [OPTIONS]

Options
Name Description Format
email The email address associated with your Planet credentials. TEXT
password Account password. Will not be saved. TEXT

Data API

create-search Create a saved search

download Activate and download

filter Output a AND filter as JSON to stdout.

saved-search Execute a saved search

search Execute a quick search.

searches List searches

stats Get search stats

download

Activate and download

Usage: download [OPTIONS]

Options
Name Description Format
limit Limit the number of items. NUMBER
dest

Location to download files to

DEFAULT: .

DIRECTORY
quiet Disable ANSI control output BOOLEAN
activate-only Only activate the items. Outputs URLS for downloading. BOOLEAN
dry-run Only report the number of items that would be downloaded. BOOLEAN
search-id Use the specified search TEXT
date Filter field by date. FIELD COMP VALUE…
range Filter field by numeric range. FIELD COMP VALUE…
number-in Filter field by numeric in. FIELD VALUES…
string-in Filter field by string in. FIELD VALUES…
geom Specify a geometry filter as geojson. GEOM
filter-json

Use the specified filter

DEFAULT: @-

FILTER
item-type Specify item type(s) ITEM-TYPE
sort Specify sort ordering as published/acquired asc/desc FIELD ORDER…
asset-type Specify asset type(s) ASSET-TYPE

filter

Output a AND filter as JSON to stdout.

If provided using –filter-json, combine the filters.

The output is suitable for use in other commands via the –filter-json option.

Usage: filter [OPTIONS]

Options
Name Description Format
filter-json

Use the specified filter

DEFAULT: @-

FILTER
geom Specify a geometry filter as geojson. GEOM
string-in Filter field by string in. FIELD VALUES…
number-in Filter field by numeric in. FIELD VALUES…
range Filter field by numeric range. FIELD COMP VALUE…
date Filter field by date. FIELD COMP VALUE…

searches

List searches

Usage: searches [OPTIONS]

Options
Name Description Format
quick Quick searches BOOLEAN
saved

Saved searches (default)

DEFAULT: True

BOOLEAN

stats

Get search stats

Usage: stats [OPTIONS]

Options
Name Description Format
interval

Specify the interval to aggregate by.

DEFAULT: month

[hour|day|month|week|year]
date Filter field by date. FIELD COMP VALUE…
range Filter field by numeric range. FIELD COMP VALUE…
number-in Filter field by numeric in. FIELD VALUES…
string-in Filter field by string in. FIELD VALUES…
geom Specify a geometry filter as geojson. GEOM
filter-json

Use the specified filter

DEFAULT: @-

FILTER
item-type Specify item type(s) ITEM-TYPE
sort Specify sort ordering as published/acquired asc/desc FIELD ORDER…
asset-type Specify asset type(s) permissions ASSET-TYPE
pretty Format JSON output BOOLEAN