@formant/formant-cli 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -7
- package/dist/commands/query/index.d.ts +7 -5
- package/dist/commands/query/index.js +96 -24
- package/dist/commands/query/index.js.map +1 -1
- package/dist/help.js +1 -1
- package/oclif.manifest.json +1070 -1139
- package/package.json +1 -1
- package/dist/commands/query/latest-values.d.ts +0 -15
- package/dist/commands/query/latest-values.js +0 -128
- package/dist/commands/query/latest-values.js.map +0 -1
package/README.md
CHANGED
|
@@ -39,8 +39,9 @@ This CLI provides programmatic access to all Formant capabilities:
|
|
|
39
39
|
|
|
40
40
|
### Telemetry Queries
|
|
41
41
|
- Query historical sensor data (battery, temperature, position, custom metrics)
|
|
42
|
-
- Retrieve latest values
|
|
43
|
-
-
|
|
42
|
+
- Retrieve latest values with `--latest-values-only`
|
|
43
|
+
- Auto-discover all streams with `--all-streams`
|
|
44
|
+
- Filter by time range, device, and stream type
|
|
44
45
|
- Export data as JSON for analysis
|
|
45
46
|
|
|
46
47
|
### Telemetry Ingestion
|
|
@@ -258,15 +259,32 @@ fcli event get <event-id> # Get event details
|
|
|
258
259
|
|
|
259
260
|
### Query
|
|
260
261
|
|
|
261
|
-
Retrieve historical telemetry and sensor data.
|
|
262
|
+
Retrieve historical telemetry and sensor data. `--start` and `--end` are always required.
|
|
262
263
|
|
|
263
264
|
```bash
|
|
264
265
|
# Historical data
|
|
265
266
|
fcli query --device <device-id> --stream battery_level \
|
|
266
267
|
--start 2026-01-01 --end 2026-01-02
|
|
267
268
|
|
|
268
|
-
#
|
|
269
|
-
fcli query
|
|
269
|
+
# Multiple streams in one query
|
|
270
|
+
fcli query --device <device-id> --stream heat.current --stream power.available \
|
|
271
|
+
--start 2026-02-01 --end 2026-02-20
|
|
272
|
+
|
|
273
|
+
# Multiple devices in one query
|
|
274
|
+
fcli query --device <id1> --device <id2> --stream battery_level \
|
|
275
|
+
--start 2026-02-01 --end 2026-02-20
|
|
276
|
+
|
|
277
|
+
# Aggregated data (downsample to hourly)
|
|
278
|
+
fcli query --device <device-id> --stream temperature \
|
|
279
|
+
--start 2026-01-01 --end 2026-02-01 --aggregate hour
|
|
280
|
+
|
|
281
|
+
# Latest value per stream (within the time range)
|
|
282
|
+
fcli query --device <device-id> --stream battery_level \
|
|
283
|
+
--start 2026-01-01 --end 2026-02-01 --latest-values-only
|
|
284
|
+
|
|
285
|
+
# Auto-discover and query all streams on a device
|
|
286
|
+
fcli query --device <device-id> --all-streams \
|
|
287
|
+
--start 2026-01-01 --end 2026-02-01 --latest-values-only
|
|
270
288
|
|
|
271
289
|
# Common streams: battery_level, temperature, cpu_usage, memory_usage, location
|
|
272
290
|
```
|
|
@@ -486,6 +504,27 @@ spot.localization text data 16962 2026-02-19T2
|
|
|
486
504
|
spot.hand.image custom config — — —
|
|
487
505
|
```
|
|
488
506
|
|
|
507
|
+
```bash
|
|
508
|
+
$ fcli query --device <device-id> --stream heat.current --stream power.available \
|
|
509
|
+
--start 2026-02-01 --end 2026-02-20 --dev
|
|
510
|
+
|
|
511
|
+
Telemetry Data (dev environment):
|
|
512
|
+
|
|
513
|
+
Stream: heat.current (numeric) Device: 01397354-d17a-4b53-ac27-61753de7918c
|
|
514
|
+
Points: 1
|
|
515
|
+
|
|
516
|
+
TIME VALUE
|
|
517
|
+
──────────────────────────────────────────────────────────────────────────────
|
|
518
|
+
2026-02-18T21:15:38.491Z 47
|
|
519
|
+
|
|
520
|
+
Stream: power.available (numeric) Device: 01397354-d17a-4b53-ac27-61753de7918c
|
|
521
|
+
Points: 1
|
|
522
|
+
|
|
523
|
+
TIME VALUE
|
|
524
|
+
──────────────────────────────────────────────────────────────────────────────
|
|
525
|
+
2026-02-18T21:15:38.520Z 72
|
|
526
|
+
```
|
|
527
|
+
|
|
489
528
|
### JSON
|
|
490
529
|
|
|
491
530
|
Machine-readable JSON for scripting and automation:
|
|
@@ -557,8 +596,8 @@ fcli investigation trigger <investigation-id> --input "Device stopped responding
|
|
|
557
596
|
# 3. Check investigation runs
|
|
558
597
|
fcli investigation runs <investigation-id>
|
|
559
598
|
|
|
560
|
-
# 4. Query relevant telemetry
|
|
561
|
-
fcli query --device <device-id> --stream temperature \
|
|
599
|
+
# 4. Query relevant telemetry (multiple streams and/or devices at once)
|
|
600
|
+
fcli query --device <device-id> --stream temperature --stream battery_level \
|
|
562
601
|
--start 2026-02-17T10:00:00Z --end 2026-02-17T12:00:00Z
|
|
563
602
|
```
|
|
564
603
|
|
|
@@ -4,12 +4,14 @@ export default class Query extends BaseCommand<typeof Query> {
|
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
6
|
aggregate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
'all-streams': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
days: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
device: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
end: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'latest-values-only': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
12
|
limit: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
-
start: import("@oclif/core/interfaces").OptionFlag<string
|
|
12
|
-
stream: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
start: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
stream: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
15
|
type: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
16
|
};
|
|
15
17
|
static summary: string;
|
|
@@ -5,7 +5,11 @@ export default class Query extends BaseCommand {
|
|
|
5
5
|
static description = `Query telemetry stream data for a device over a time range.
|
|
6
6
|
|
|
7
7
|
Returns time-series datapoints for the specified stream(s). Supports aggregation
|
|
8
|
-
for downsampling large datasets, and --latest to get only the most recent value.
|
|
8
|
+
for downsampling large datasets, and --latest-values-only to get only the most recent value.
|
|
9
|
+
|
|
10
|
+
Use --all-streams with --latest-values-only to automatically discover and query all
|
|
11
|
+
streams — both from the device configuration and from actual ingested data
|
|
12
|
+
(unconfigured streams included).
|
|
9
13
|
|
|
10
14
|
Stream types: numeric, text, image, video, location, json, bitset, battery, health,
|
|
11
15
|
"numeric set", "point cloud", localization, "transform tree", file.
|
|
@@ -15,7 +19,10 @@ hour, 4 hours, 12 hours, day, week, month, year.`;
|
|
|
15
19
|
static examples = [
|
|
16
20
|
'<%= config.bin %> query --device <id> --stream battery_level --start 2026-01-01 --end 2026-01-02',
|
|
17
21
|
'<%= config.bin %> query --device <id> --stream speed --aggregate hour --start 2026-01-01 --end 2026-02-01',
|
|
18
|
-
'<%= config.bin %> query --device <id> --stream battery_level --
|
|
22
|
+
'<%= config.bin %> query --device <id> --stream battery_level --stream temperature --start 2026-01-01 --end 2026-01-02',
|
|
23
|
+
'<%= config.bin %> query --device <id1> --device <id2> --stream battery_level --start 2026-01-01 --end 2026-01-02',
|
|
24
|
+
'<%= config.bin %> query --device <id> --stream battery_level --start 2026-01-01 --end 2026-02-01 --latest-values-only',
|
|
25
|
+
'<%= config.bin %> query --device <id> --all-streams --start 2026-01-01 --end 2026-02-01 --latest-values-only',
|
|
19
26
|
'<%= config.bin %> query --device <id> --stream temperature --type numeric --json',
|
|
20
27
|
];
|
|
21
28
|
static flags = {
|
|
@@ -23,15 +30,24 @@ hour, 4 hours, 12 hours, day, week, month, year.`;
|
|
|
23
30
|
char: 'a',
|
|
24
31
|
description: 'Aggregation level for downsampling',
|
|
25
32
|
}),
|
|
33
|
+
'all-streams': Flags.boolean({
|
|
34
|
+
description: 'Query all streams for the device — from config and from ingested data (requires single --device and --latest-values-only)',
|
|
35
|
+
}),
|
|
36
|
+
days: Flags.integer({
|
|
37
|
+
default: 14,
|
|
38
|
+
description: 'How many days back to look for unconfigured streams when using --all-streams',
|
|
39
|
+
}),
|
|
26
40
|
device: Flags.string({
|
|
27
41
|
char: 'd',
|
|
28
|
-
description: 'Device ID
|
|
42
|
+
description: 'Device ID(s), can be specified multiple times',
|
|
43
|
+
multiple: true,
|
|
29
44
|
required: true,
|
|
30
45
|
}),
|
|
31
46
|
end: Flags.string({
|
|
32
47
|
description: 'End time (ISO 8601)',
|
|
48
|
+
required: true,
|
|
33
49
|
}),
|
|
34
|
-
latest: Flags.boolean({
|
|
50
|
+
'latest-values-only': Flags.boolean({
|
|
35
51
|
description: 'Only return the most recent value per stream',
|
|
36
52
|
}),
|
|
37
53
|
limit: Flags.integer({
|
|
@@ -40,12 +56,12 @@ hour, 4 hours, 12 hours, day, week, month, year.`;
|
|
|
40
56
|
}),
|
|
41
57
|
start: Flags.string({
|
|
42
58
|
description: 'Start time (ISO 8601)',
|
|
59
|
+
required: true,
|
|
43
60
|
}),
|
|
44
61
|
stream: Flags.string({
|
|
45
62
|
char: 's',
|
|
46
63
|
description: 'Stream name(s), can be specified multiple times',
|
|
47
64
|
multiple: true,
|
|
48
|
-
required: true,
|
|
49
65
|
}),
|
|
50
66
|
type: Flags.string({
|
|
51
67
|
description: 'Filter by stream type',
|
|
@@ -53,31 +69,76 @@ hour, 4 hours, 12 hours, day, week, month, year.`;
|
|
|
53
69
|
};
|
|
54
70
|
static summary = 'Query telemetry stream data';
|
|
55
71
|
async run() {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
72
|
+
let streamNames = this.flags.stream ?? [];
|
|
73
|
+
// --all-streams validation
|
|
74
|
+
if (this.flags['all-streams']) {
|
|
75
|
+
if (!this.flags['latest-values-only']) {
|
|
76
|
+
this.error('--all-streams requires --latest-values-only');
|
|
77
|
+
}
|
|
78
|
+
if (this.flags.device.length !== 1) {
|
|
79
|
+
this.error('--all-streams requires exactly one --device');
|
|
80
|
+
}
|
|
81
|
+
const deviceId = this.flags.device[0];
|
|
82
|
+
const discovered = new Set();
|
|
83
|
+
// ── Config-based discovery ──────────────────────────────────────────────
|
|
84
|
+
const device = await this.api('admin', `devices/${deviceId}`, {
|
|
85
|
+
method: 'GET',
|
|
86
|
+
});
|
|
87
|
+
const configVersion = device.desiredConfigurationVersion;
|
|
88
|
+
if (configVersion) {
|
|
89
|
+
const config = await this.api('admin', `devices/${deviceId}/configurations/${configVersion}`, { method: 'GET' });
|
|
90
|
+
const doc = config.document;
|
|
91
|
+
const telemetry = doc?.telemetry;
|
|
92
|
+
const configStreams = telemetry?.streams || [];
|
|
93
|
+
for (const s of configStreams) {
|
|
94
|
+
const name = s.name;
|
|
95
|
+
if (name)
|
|
96
|
+
discovered.add(name);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// ── Data-based discovery (metadata endpoint) ───────────────────────────
|
|
100
|
+
const since = new Date();
|
|
101
|
+
since.setDate(since.getDate() - this.flags.days);
|
|
102
|
+
try {
|
|
103
|
+
const metaResult = await this.api('query', 'metadata', {
|
|
104
|
+
body: {
|
|
105
|
+
deviceIds: [deviceId],
|
|
106
|
+
start: since.toISOString(),
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
for (const item of metaResult?.items ?? []) {
|
|
110
|
+
if (item.name)
|
|
111
|
+
discovered.add(item.name);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
catch {
|
|
115
|
+
// metadata endpoint failure is non-fatal
|
|
116
|
+
}
|
|
117
|
+
streamNames = [...discovered];
|
|
118
|
+
if (streamNames.length === 0) {
|
|
119
|
+
this.error('No streams found for this device (neither configured nor in ingested data)');
|
|
120
|
+
}
|
|
121
|
+
if (!this.jsonEnabled()) {
|
|
122
|
+
this.log(`\nDiscovered ${streamNames.length} streams (config + data, last ${this.flags.days}d).\n`);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if (streamNames.length === 0) {
|
|
126
|
+
this.error('Specify --stream names or use --all-streams with --latest-values-only');
|
|
59
127
|
}
|
|
60
128
|
const body = {
|
|
61
|
-
deviceIds:
|
|
62
|
-
names:
|
|
129
|
+
deviceIds: this.flags.device,
|
|
130
|
+
names: streamNames,
|
|
131
|
+
start: this.normalizeDateTime(this.flags.start),
|
|
132
|
+
end: this.normalizeDateTime(this.flags.end),
|
|
63
133
|
};
|
|
64
|
-
if (this.flags.start)
|
|
65
|
-
body.start = this.normalizeDateTime(this.flags.start);
|
|
66
|
-
if (this.flags.end)
|
|
67
|
-
body.end = this.normalizeDateTime(this.flags.end);
|
|
68
134
|
if (this.flags.type)
|
|
69
135
|
body.types = [this.flags.type];
|
|
70
136
|
if (this.flags.aggregate)
|
|
71
137
|
body.aggregate = this.flags.aggregate;
|
|
72
|
-
if (this.flags
|
|
138
|
+
if (this.flags['latest-values-only'])
|
|
73
139
|
body.latestOnly = true;
|
|
74
140
|
if (this.flags.limit)
|
|
75
141
|
body.limit = this.flags.limit;
|
|
76
|
-
// If using --latest and no time range given, use a reasonable default
|
|
77
|
-
if (this.flags.latest && !this.flags.start) {
|
|
78
|
-
body.start = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString();
|
|
79
|
-
body.end = new Date().toISOString();
|
|
80
|
-
}
|
|
81
142
|
const result = await this.api('query', 'queries', { body });
|
|
82
143
|
if (!this.jsonEnabled()) {
|
|
83
144
|
this.log(`\nTelemetry Data (${this.env} environment):\n`);
|
|
@@ -90,10 +151,21 @@ hour, 4 hours, 12 hours, day, week, month, year.`;
|
|
|
90
151
|
{ key: 'time', label: 'TIME', width: 28 },
|
|
91
152
|
{ key: 'value', label: 'VALUE', width: 50 },
|
|
92
153
|
];
|
|
93
|
-
const rows = points.map((p) =>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
154
|
+
const rows = points.map((p) => {
|
|
155
|
+
// Points can be [timestamp_ms, value] tuples or {time, value} objects
|
|
156
|
+
if (Array.isArray(p)) {
|
|
157
|
+
const [ts, val] = p;
|
|
158
|
+
return {
|
|
159
|
+
time: new Date(ts).toISOString(),
|
|
160
|
+
value: typeof val === 'object' ? JSON.stringify(val) : val,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
const obj = p;
|
|
164
|
+
return {
|
|
165
|
+
time: obj.time,
|
|
166
|
+
value: typeof obj.value === 'object' ? JSON.stringify(obj.value) : obj.value,
|
|
167
|
+
};
|
|
168
|
+
});
|
|
97
169
|
this.log(formatTable(rows, columns));
|
|
98
170
|
this.log('');
|
|
99
171
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/query/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAc,WAAW,EAAC,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/query/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAc,WAAW,EAAC,MAAM,yBAAyB,CAAA;AAShE,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,WAAyB;IAC1D,MAAM,CAAU,WAAW,GAAG;;;;;;;;;;;;;iDAaiB,CAAA;IAE/C,MAAM,CAAU,QAAQ,GAAG;QACzB,kGAAkG;QAClG,2GAA2G;QAC3G,uHAAuH;QACvH,kHAAkH;QAClH,uHAAuH;QACvH,8GAA8G;QAC9G,kFAAkF;KACnF,CAAA;IAED,MAAM,CAAU,K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AAM,EAAE,KAAK,EAAE,EAAE,EAAC;wBACvC,EAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAC;qBAC1C,CAAA;oBAED,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;wBAC5B,sEAAsE;wBACtE,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;4BACrB,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,GAAG,CAAsB,CAAA;4BACxC,OAAO;gCACL,IAAI,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE;gCAChC,KAAK,EAAE,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG;6BAC3D,CAAA;wBACH,CAAC;wBAED,MAAM,GAAG,GAAG,CAA4B,CAAA;wBACxC,OAAO;4BACL,IAAI,EAAE,GAAG,CAAC,IAAI;4BACd,KAAK,EAAE,OAAO,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK;yBAC7E,CAAA;oBACH,CAAC,CAAC,CAAA;oBAEF,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAA;oBACpC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;gBACd,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC"}
|
package/dist/help.js
CHANGED
|
@@ -75,7 +75,7 @@ EXAMPLES
|
|
|
75
75
|
|
|
76
76
|
# Telemetry queries
|
|
77
77
|
$ fcli query --device <id> --stream battery_level --start 2026-01-01 --end 2026-01-02
|
|
78
|
-
$ fcli query
|
|
78
|
+
$ fcli query --device <id> --stream battery_level --latest-values-only
|
|
79
79
|
$ fcli device streams <device-id> # List available streams
|
|
80
80
|
|
|
81
81
|
# Ingest telemetry data
|