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. skysat*
means SkySatCollect
and SkySatScene
. 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 None
init None
help¶
Get command help
Usage: help [OPTIONS] [COMMAND]
init¶
Login using email/password
Usage: init [OPTIONS]
Name |
Description |
Format |
---|---|---|
The email address associated with your Planet credentials. |
TEXT |
|
password |
Account password. Will not be saved. |
TEXT |
Data API¶
create-search None
download None
filter None
saved-search None
search None
searches None
stats None
create-search¶
Create a saved search
Usage: create-search [OPTIONS]
Name |
Description |
Format |
---|---|---|
pretty |
Format JSON output |
BOOLEAN |
name |
TEXT |
|
asset-type |
Specify asset type(s) permissions |
|
sort |
Specify sort ordering as published/acquired asc/desc |
FIELD ORDER… |
item-type |
Specify item type(s) |
|
filter-json |
Use the specified filter DEFAULT: @- |
|
geom |
Specify a geometry filter as geojson. |
|
string-in |
Filter field by string in. |
|
number-in |
Filter field by numeric in. |
|
range |
Filter field by numeric range. |
|
date |
Filter field by date. |
download¶
Activate and download
Usage: download [OPTIONS]
Name |
Description |
Format |
---|---|---|
limit |
Limit the number of items. Default: None |
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. |
|
range |
Filter field by numeric range. |
|
number-in |
Filter field by numeric in. |
|
string-in |
Filter field by string in. |
|
geom |
Specify a geometry filter as geojson. |
|
filter-json |
Use the specified filter DEFAULT: @- |
|
item-type |
Specify item type(s) |
|
sort |
Specify sort ordering as published/acquired asc/desc |
FIELD ORDER… |
asset-type |
Specify asset type(s) |
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]
Name |
Description |
Format |
---|---|---|
filter-json |
Use the specified filter DEFAULT: @- |
|
geom |
Specify a geometry filter as geojson. |
|
string-in |
Filter field by string in. |
|
number-in |
Filter field by numeric in. |
|
range |
Filter field by numeric range. |
|
date |
Filter field by date. |
saved-search¶
Execute a saved search
Usage: saved-search [OPTIONS] [SEARCH_ID]
Name |
Description |
Format |
---|---|---|
sort |
Specify sort ordering as published/acquired asc/desc |
FIELD ORDER… |
pretty |
Format JSON output |
BOOLEAN |
limit |
Limit the number of items. Default: 100 DEFAULT: 100 |
NUMBER |
search¶
Execute a quick search.
Usage: search [OPTIONS]
Name |
Description |
Format |
---|---|---|
limit |
Limit the number of items. Default: 100 DEFAULT: 100 |
NUMBER |
pretty |
Format JSON output |
BOOLEAN |
asset-type |
Specify asset type(s) permissions |
|
sort |
Specify sort ordering as published/acquired asc/desc |
FIELD ORDER… |
item-type |
Specify item type(s) |
|
filter-json |
Use the specified filter DEFAULT: @- |
|
geom |
Specify a geometry filter as geojson. |
|
string-in |
Filter field by string in. |
|
number-in |
Filter field by numeric in. |
|
range |
Filter field by numeric range. |
|
date |
Filter field by date. |
searches¶
List searches
Usage: searches [OPTIONS]
Name |
Description |
Format |
---|---|---|
quick |
Quick searches |
BOOLEAN |
saved |
Saved searches (default) DEFAULT: True |
BOOLEAN |
limit |
Limit the number of items. Default: 10 DEFAULT: 10 |
NUMBER |
stats¶
Get search stats
Usage: stats [OPTIONS]
Name |
Description |
Format |
---|---|---|
interval |
Specify the interval to aggregate by. DEFAULT: month |
[hour|day|month|week|year] |
date |
Filter field by date. |
|
range |
Filter field by numeric range. |
|
number-in |
Filter field by numeric in. |
|
string-in |
Filter field by string in. |
|
geom |
Specify a geometry filter as geojson. |
|
filter-json |
Use the specified filter DEFAULT: @- |
|
item-type |
Specify item type(s) |
|
sort |
Specify sort ordering as published/acquired asc/desc |
FIELD ORDER… |
asset-type |
Specify asset type(s) permissions |
|
pretty |
Format JSON output |
BOOLEAN |