CLI reference¶
trackiwi <command>, or python3 -m trackiwi <command> from a clone. trackiwi <command> --help is authoritative for options. Source: trackiwi/cli.py
(build_parser).
Commands¶
Command |
Reads |
Writes |
What it does |
|---|---|---|---|
|
stdin, terminal |
config file |
Authenticate and store the session. |
|
config file |
removes config file |
Revoke the session on the server, then remove the local credentials. |
|
API |
nothing |
List devices: id, name. Not cached. |
|
API |
nothing |
List recorded tours: id, name, tracker id, start, end. Not cached. |
|
API |
nothing |
List alarms: id, tracker id, type, acknowledged, recorded at. Prints no coordinates. Not cached. |
|
API |
nothing |
List markers: id, name (field names unverified). Not cached. |
|
API |
nothing |
List marker categories: id, name, colour. Not cached. |
|
API |
nothing |
List active share links: id, name (field names unverified). Cannot create or revoke one. Not cached. |
|
API |
cache |
Fetch new positions into the cache; |
|
cache |
stdout or file |
Export cached positions. See export formats. |
|
cache |
nothing |
Estimate each vehicle’s heading from the cache. Offline. Defaults: |
|
InfluxDB |
nothing |
Probe the configured InfluxDB target: connectivity, auth, bucket. |
|
cache |
InfluxDB, |
Send cached positions not yet mirrored. |
|
API, cache |
cache, InfluxDB |
|
|
nothing |
removes cache |
Delete the position cache and its |
export and purge never create the cache. export takes --format (required, gpx,
geojson or csv). --from and --to are inclusive UTC days, YYYY-MM-DD.
The tab-separated listings print a field the API does not send as -. Timestamps in the
listings are printed as the API sends them (ISO 8601), not as epoch seconds.
Exit codes¶
Code |
Meaning |
|---|---|
|
Success. |
|
Error: network, API, bad arguments to the tool’s own logic, an interrupted run, or a dead output stream (except in |
|
Authentication required: not logged in, or the session was rejected. |
argparse also exits 2 for its own usage errors (an unknown flag, a missing --format), so
a 2 alone does not prove an authentication failure. Check stderr: it says
authentication required: ... for the real thing.
Files and environment¶
What |
Default location |
Notes |
|---|---|---|
Session |
|
Mode |
Position cache |
|
SQLite, mode |
InfluxDB target |
|
Mode |
|
environment |
Overrides the same key in |
|
environment |
The InfluxDB 2.x token, unless |
|
compose environment |
Seconds between runs of the ingest container (default 600). |
The requirements behind these rules are in the requirements; the units table explains the position fields.