@formant/formant-cli 0.4.4 → 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 +11 -5
- package/dist/commands/query/index.d.ts +6 -4
- package/dist/commands/query/index.js +76 -18
- package/dist/commands/query/index.js.map +1 -1
- package/dist/help.js +1 -1
- package/oclif.manifest.json +1061 -1132
- 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,7 +259,7 @@ 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
|
|
@@ -277,8 +278,13 @@ fcli query --device <id1> --device <id2> --stream battery_level \
|
|
|
277
278
|
fcli query --device <device-id> --stream temperature \
|
|
278
279
|
--start 2026-01-01 --end 2026-02-01 --aggregate hour
|
|
279
280
|
|
|
280
|
-
# Latest
|
|
281
|
-
fcli query
|
|
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
|
|
282
288
|
|
|
283
289
|
# Common streams: battery_level, temperature, cpu_usage, memory_usage, location
|
|
284
290
|
```
|
|
@@ -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
|
+
'all-streams': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
days: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
9
|
device: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
-
end: import("@oclif/core/interfaces").OptionFlag<string
|
|
9
|
-
latest: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
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.
|
|
@@ -17,7 +21,8 @@ hour, 4 hours, 12 hours, day, week, month, year.`;
|
|
|
17
21
|
'<%= config.bin %> query --device <id> --stream speed --aggregate hour --start 2026-01-01 --end 2026-02-01',
|
|
18
22
|
'<%= config.bin %> query --device <id> --stream battery_level --stream temperature --start 2026-01-01 --end 2026-01-02',
|
|
19
23
|
'<%= config.bin %> query --device <id1> --device <id2> --stream battery_level --start 2026-01-01 --end 2026-01-02',
|
|
20
|
-
'<%= config.bin %> query --device <id> --stream battery_level --latest',
|
|
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',
|
|
21
26
|
'<%= config.bin %> query --device <id> --stream temperature --type numeric --json',
|
|
22
27
|
];
|
|
23
28
|
static flags = {
|
|
@@ -25,6 +30,13 @@ hour, 4 hours, 12 hours, day, week, month, year.`;
|
|
|
25
30
|
char: 'a',
|
|
26
31
|
description: 'Aggregation level for downsampling',
|
|
27
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
|
+
}),
|
|
28
40
|
device: Flags.string({
|
|
29
41
|
char: 'd',
|
|
30
42
|
description: 'Device ID(s), can be specified multiple times',
|
|
@@ -33,8 +45,9 @@ hour, 4 hours, 12 hours, day, week, month, year.`;
|
|
|
33
45
|
}),
|
|
34
46
|
end: Flags.string({
|
|
35
47
|
description: 'End time (ISO 8601)',
|
|
48
|
+
required: true,
|
|
36
49
|
}),
|
|
37
|
-
latest: Flags.boolean({
|
|
50
|
+
'latest-values-only': Flags.boolean({
|
|
38
51
|
description: 'Only return the most recent value per stream',
|
|
39
52
|
}),
|
|
40
53
|
limit: Flags.integer({
|
|
@@ -43,12 +56,12 @@ hour, 4 hours, 12 hours, day, week, month, year.`;
|
|
|
43
56
|
}),
|
|
44
57
|
start: Flags.string({
|
|
45
58
|
description: 'Start time (ISO 8601)',
|
|
59
|
+
required: true,
|
|
46
60
|
}),
|
|
47
61
|
stream: Flags.string({
|
|
48
62
|
char: 's',
|
|
49
63
|
description: 'Stream name(s), can be specified multiple times',
|
|
50
64
|
multiple: true,
|
|
51
|
-
required: true,
|
|
52
65
|
}),
|
|
53
66
|
type: Flags.string({
|
|
54
67
|
description: 'Filter by stream type',
|
|
@@ -56,31 +69,76 @@ hour, 4 hours, 12 hours, day, week, month, year.`;
|
|
|
56
69
|
};
|
|
57
70
|
static summary = 'Query telemetry stream data';
|
|
58
71
|
async run() {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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');
|
|
62
127
|
}
|
|
63
128
|
const body = {
|
|
64
129
|
deviceIds: this.flags.device,
|
|
65
|
-
names:
|
|
130
|
+
names: streamNames,
|
|
131
|
+
start: this.normalizeDateTime(this.flags.start),
|
|
132
|
+
end: this.normalizeDateTime(this.flags.end),
|
|
66
133
|
};
|
|
67
|
-
if (this.flags.start)
|
|
68
|
-
body.start = this.normalizeDateTime(this.flags.start);
|
|
69
|
-
if (this.flags.end)
|
|
70
|
-
body.end = this.normalizeDateTime(this.flags.end);
|
|
71
134
|
if (this.flags.type)
|
|
72
135
|
body.types = [this.flags.type];
|
|
73
136
|
if (this.flags.aggregate)
|
|
74
137
|
body.aggregate = this.flags.aggregate;
|
|
75
|
-
if (this.flags
|
|
138
|
+
if (this.flags['latest-values-only'])
|
|
76
139
|
body.latestOnly = true;
|
|
77
140
|
if (this.flags.limit)
|
|
78
141
|
body.limit = this.flags.limit;
|
|
79
|
-
// If using --latest and no time range given, use a reasonable default
|
|
80
|
-
if (this.flags.latest && !this.flags.start) {
|
|
81
|
-
body.start = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString();
|
|
82
|
-
body.end = new Date().toISOString();
|
|
83
|
-
}
|
|
84
142
|
const result = await this.api('query', 'queries', { body });
|
|
85
143
|
if (!this.jsonEnabled()) {
|
|
86
144
|
this.log(`\nTelemetry Data (${this.env} environment):\n`);
|
|
@@ -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,W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AAC,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
|