@formant/formant-cli 0.4.5 → 0.5.2
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 +89 -1
- package/dist/base-command.d.ts +17 -0
- package/dist/base-command.js +33 -0
- package/dist/base-command.js.map +1 -1
- package/dist/commands/device/list.d.ts +1 -1
- package/dist/commands/device/list.js +32 -6
- package/dist/commands/device/list.js.map +1 -1
- package/dist/help.js +2 -0
- package/dist/help.js.map +1 -1
- package/oclif.manifest.json +1441 -860
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -36,6 +36,7 @@ This CLI provides programmatic access to all Formant capabilities:
|
|
|
36
36
|
- List available telemetry streams with per-stream data presence (datapoint counts, last seen, freshness)
|
|
37
37
|
- Data-based last seen timestamps and datapoint counts on device listings
|
|
38
38
|
- Filter to devices that have ingested data (`--with-data`)
|
|
39
|
+
- Search by name across **all** devices (online and offline) with `--name`; repeat the flag for multiple names
|
|
39
40
|
|
|
40
41
|
### Telemetry Queries
|
|
41
42
|
- Query historical sensor data (battery, temperature, position, custom metrics)
|
|
@@ -171,12 +172,16 @@ The CLI will automatically load credentials from your `.env` file.
|
|
|
171
172
|
## Quick Start
|
|
172
173
|
|
|
173
174
|
```bash
|
|
174
|
-
# View your organization
|
|
175
|
+
# View your organization (add --toon for compact output, --json for machine-readable)
|
|
175
176
|
fcli org get
|
|
176
177
|
|
|
177
178
|
# List devices with data
|
|
178
179
|
fcli device list --with-data --dev
|
|
179
180
|
|
|
181
|
+
# Look up a device by name (searches all devices, online + offline)
|
|
182
|
+
fcli device list --name "mech-0" --dev --toon
|
|
183
|
+
fcli device list --name "mech-0" --name "mech-1" --dev --toon
|
|
184
|
+
|
|
180
185
|
# Get device details
|
|
181
186
|
fcli device get <device-id> --dev
|
|
182
187
|
|
|
@@ -222,6 +227,8 @@ fcli device list --include-offline # Include offline devices
|
|
|
222
227
|
fcli device list --with-data # Only devices with ingested data
|
|
223
228
|
fcli device list --with-data --days 90 # Widen the search window (default: 30d)
|
|
224
229
|
fcli device list --tag location=warehouse # Filter by tag
|
|
230
|
+
fcli device list --name "mech-0" # Search all devices by name (online + offline)
|
|
231
|
+
fcli device list --name "mech-0" --name "mech-1" # Multiple names (parallel queries, merged)
|
|
225
232
|
|
|
226
233
|
# Device details
|
|
227
234
|
fcli device get <device-id> # Get full device details
|
|
@@ -468,6 +475,7 @@ These flags work with any command:
|
|
|
468
475
|
- `--dev` — Target the dev environment (for testing)
|
|
469
476
|
- `--stage` — Target the stage environment (for staging)
|
|
470
477
|
- `--json` — Output raw JSON instead of formatted tables
|
|
478
|
+
- `--toon` — Output data in TOON (Token-Oriented Object Notation) format
|
|
471
479
|
- `-h, --help` — Show help for any command
|
|
472
480
|
|
|
473
481
|
**Default environment:** Production (unless `--dev` or `--stage` is specified)
|
|
@@ -550,6 +558,60 @@ Use with `jq` for advanced processing:
|
|
|
550
558
|
fcli device list --json | jq '.items[] | select(.online==true) | .name'
|
|
551
559
|
```
|
|
552
560
|
|
|
561
|
+
### TOON
|
|
562
|
+
|
|
563
|
+
**`--toon` is the recommended output format when working with AI tools, LLM prompts, or any context where token efficiency matters.**
|
|
564
|
+
|
|
565
|
+
TOON (Token-Oriented Object Notation) is a compact, schema-aware encoding of structured data that is both human-readable and significantly more token-efficient than JSON — making it ideal for pasting into LLM prompts, storing in context windows, and scripting with AI agents.
|
|
566
|
+
|
|
567
|
+
```bash
|
|
568
|
+
$ fcli org get --toon
|
|
569
|
+
name: Acme Robotics
|
|
570
|
+
id: 6380a48c-0847-4543-a67f-9b7ccc41ec21
|
|
571
|
+
plan: paid
|
|
572
|
+
daysDataRetained: 600
|
|
573
|
+
aiEnabled: true
|
|
574
|
+
investigationsEnabled: true
|
|
575
|
+
flags[19]: settings.role,settings.user,settings.device,...
|
|
576
|
+
billingInfo:
|
|
577
|
+
usagePrices:
|
|
578
|
+
devices: 1100
|
|
579
|
+
dataPoints: 0.00015
|
|
580
|
+
bytes: 3e-9
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
```bash
|
|
584
|
+
$ fcli user list --toon
|
|
585
|
+
items[2]{id,email,firstName,lastName,enabled}:
|
|
586
|
+
4f79f32b-...,alice@acme.io,Alice,Smith,true
|
|
587
|
+
9a1c22de-...,bob@acme.io,Bob,Jones,true
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
Key properties of TOON output:
|
|
591
|
+
|
|
592
|
+
- **Arrays are schema-compressed** — `items[N]{field1,field2,...}:` header followed by rows, rather than repeating field names for every object
|
|
593
|
+
- **Scalars are unquoted** — only strings with special characters are quoted
|
|
594
|
+
- **Nested objects are indented** — structure is preserved but without JSON's punctuation overhead
|
|
595
|
+
- **Null and boolean values are compact** — `null`, `true`, `false` without quotes
|
|
596
|
+
|
|
597
|
+
**When to use `--toon` vs `--json`:**
|
|
598
|
+
|
|
599
|
+
| Use case | Recommended flag |
|
|
600
|
+
|---|---|
|
|
601
|
+
| Pasting into an LLM prompt | `--toon` |
|
|
602
|
+
| AI agent / agentic scripting | `--toon` |
|
|
603
|
+
| Shell scripting with `jq` | `--json` |
|
|
604
|
+
| Saving to a file for later processing | `--json` |
|
|
605
|
+
| Quick human inspection | (default) |
|
|
606
|
+
|
|
607
|
+
```bash
|
|
608
|
+
# Pipe directly into an LLM context or agent prompt
|
|
609
|
+
fcli device list --toon
|
|
610
|
+
fcli event list --severity critical --toon
|
|
611
|
+
fcli investigation runs <id> --toon
|
|
612
|
+
fcli org get --toon
|
|
613
|
+
```
|
|
614
|
+
|
|
553
615
|
## Examples
|
|
554
616
|
|
|
555
617
|
### Monitor fleet health
|
|
@@ -629,6 +691,32 @@ fcli analytics query --sql "SELECT * FROM events WHERE created_at > '2026-01-01'
|
|
|
629
691
|
--json > analytics_export.json
|
|
630
692
|
```
|
|
631
693
|
|
|
694
|
+
### Use with AI tools and LLMs
|
|
695
|
+
|
|
696
|
+
`--toon` produces compact, token-efficient output that is well-suited for LLM prompts and agentic workflows. Use it anywhere you would otherwise paste JSON into a prompt.
|
|
697
|
+
|
|
698
|
+
```bash
|
|
699
|
+
# Summarize your fleet for an LLM
|
|
700
|
+
fcli device list --with-data --toon
|
|
701
|
+
|
|
702
|
+
# Get org context in compact form
|
|
703
|
+
fcli org get --toon
|
|
704
|
+
|
|
705
|
+
# Pipe investigation results into an AI workflow
|
|
706
|
+
fcli investigation runs <investigation-id> --toon
|
|
707
|
+
|
|
708
|
+
# Combine with other tools for agentic scripting
|
|
709
|
+
fcli event list --severity critical --limit 20 --toon | your-ai-tool analyze
|
|
710
|
+
|
|
711
|
+
# Check recent events and device state together
|
|
712
|
+
{
|
|
713
|
+
echo "=== Critical Events ==="
|
|
714
|
+
fcli event list --severity critical --limit 10 --toon
|
|
715
|
+
echo "=== Fleet Status ==="
|
|
716
|
+
fcli device list --include-offline --toon
|
|
717
|
+
} | your-ai-tool "Summarize what's wrong with my fleet"
|
|
718
|
+
```
|
|
719
|
+
|
|
632
720
|
## Development
|
|
633
721
|
|
|
634
722
|
### Build from source
|
package/dist/base-command.d.ts
CHANGED
|
@@ -12,11 +12,28 @@ export declare abstract class BaseCommand<T extends typeof Command> extends Comm
|
|
|
12
12
|
static baseFlags: {
|
|
13
13
|
dev: Interfaces.BooleanFlag<boolean>;
|
|
14
14
|
stage: Interfaces.BooleanFlag<boolean>;
|
|
15
|
+
toon: Interfaces.BooleanFlag<boolean>;
|
|
15
16
|
};
|
|
16
17
|
protected flags: InferredFlags<T>;
|
|
17
18
|
protected args: InferredArgs<T>;
|
|
18
19
|
/** Resolved environment based on --dev / --stage flags. */
|
|
19
20
|
protected get env(): Environment;
|
|
21
|
+
/** Returns true when --toon flag is active. */
|
|
22
|
+
toonEnabled(): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Returns true when either --json or --toon is active.
|
|
25
|
+
* Overriding this ensures human-readable output is suppressed for both flags,
|
|
26
|
+
* without requiring changes to individual command files.
|
|
27
|
+
*/
|
|
28
|
+
jsonEnabled(): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Called by oclif when jsonEnabled() is true and run() returns successfully.
|
|
31
|
+
* When --toon is active, encodes the result as TOON instead of JSON.
|
|
32
|
+
*
|
|
33
|
+
* Note: must write to process.stdout directly — this.log() is suppressed
|
|
34
|
+
* by oclif whenever jsonEnabled() returns true.
|
|
35
|
+
*/
|
|
36
|
+
protected logJson(json: unknown): void;
|
|
20
37
|
init(): Promise<void>;
|
|
21
38
|
/**
|
|
22
39
|
* Make an authenticated GET/POST request to a Formant API.
|
package/dist/base-command.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Command, Flags } from '@oclif/core';
|
|
2
|
+
import { encode } from '@toon-format/toon';
|
|
2
3
|
import { apiRequest } from './lib/api.js';
|
|
3
4
|
import { login } from './lib/auth.js';
|
|
4
5
|
/**
|
|
@@ -18,6 +19,11 @@ export class BaseCommand extends Command {
|
|
|
18
19
|
exclusive: ['dev'],
|
|
19
20
|
helpGroup: 'GLOBAL',
|
|
20
21
|
}),
|
|
22
|
+
toon: Flags.boolean({
|
|
23
|
+
description: 'Output data in TOON (Token-Oriented Object Notation) format',
|
|
24
|
+
exclusive: ['json'],
|
|
25
|
+
helpGroup: 'GLOBAL',
|
|
26
|
+
}),
|
|
21
27
|
};
|
|
22
28
|
flags;
|
|
23
29
|
args;
|
|
@@ -29,6 +35,33 @@ export class BaseCommand extends Command {
|
|
|
29
35
|
return 'stage';
|
|
30
36
|
return 'prod';
|
|
31
37
|
}
|
|
38
|
+
/** Returns true when --toon flag is active. */
|
|
39
|
+
toonEnabled() {
|
|
40
|
+
return Boolean(this.flags?.toon);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Returns true when either --json or --toon is active.
|
|
44
|
+
* Overriding this ensures human-readable output is suppressed for both flags,
|
|
45
|
+
* without requiring changes to individual command files.
|
|
46
|
+
*/
|
|
47
|
+
jsonEnabled() {
|
|
48
|
+
return super.jsonEnabled() || this.toonEnabled();
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Called by oclif when jsonEnabled() is true and run() returns successfully.
|
|
52
|
+
* When --toon is active, encodes the result as TOON instead of JSON.
|
|
53
|
+
*
|
|
54
|
+
* Note: must write to process.stdout directly — this.log() is suppressed
|
|
55
|
+
* by oclif whenever jsonEnabled() returns true.
|
|
56
|
+
*/
|
|
57
|
+
logJson(json) {
|
|
58
|
+
if (this.toonEnabled()) {
|
|
59
|
+
process.stdout.write(encode(json) + '\n');
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
super.logJson(json);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
32
65
|
async init() {
|
|
33
66
|
await super.init();
|
|
34
67
|
const { args, flags } = await this.parse({
|
package/dist/base-command.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-command.js","sourceRoot":"","sources":["../src/base-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,KAAK,EAAa,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"base-command.js","sourceRoot":"","sources":["../src/base-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,KAAK,EAAa,MAAM,aAAa,CAAA;AACtD,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAA;AAExC,OAAO,EAAiB,UAAU,EAAC,MAAM,cAAc,CAAA;AACvD,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAA;AAQnC;;;GAGG;AACH,MAAM,OAAgB,WAAsC,SAAQ,OAAO;IACzE,MAAM,CAAC,cAAc,GAAG,IAAI,CAAA;IAE5B,MAAM,CAAC,SAAS,GAAG;QACjB,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC;YACjB,WAAW,EAAE,4BAA4B;YACzC,SAAS,EAAE,CAAC,OAAO,CAAC;YACpB,SAAS,EAAE,QAAQ;SACpB,CAAC;QACF,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC;YACnB,WAAW,EAAE,8BAA8B;Y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C,cAAc;YACxC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK;YACtB,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM;SACzB,CAAC,CAAA;QAEF,IAAI,CAAC,KAAK,GAAG,KAAyB,CAAA;QACtC,IAAI,CAAC,IAAI,GAAG,IAAuB,CAAA;IACrC,CAAC;IAED;;;OAGG;IACO,KAAK,CAAC,GAAG,CACjB,MAAiB,EACjB,IAAY,EACZ,OAAgH;QAEhH,OAAO,UAAU,CAAI,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;IACvD,CAAC;IAED;;;OAGG;IACO,KAAK,CAAC,QAAQ;QACtB,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAClC,OAAO,IAAI,CAAC,cAAc,CAAA;IAC5B,CAAC;IAEkB,KAAK,CAAC,KAAK,CAAC,GAAgC;QAC7D,MAAM,GAAG,CAAA;IACX,CAAC;IAED;;;OAGG;IACO,iBAAiB,CAAC,OAAe;QACzC,2EAA2E;QAC3E,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC;YAC1D,OAAO,OAAO,CAAA;QAChB,CAAC;QAED,2DAA2D;QAC3D,OAAO,GAAG,OAAO,YAAY,CAAA;IAC/B,CAAC"}
|
|
@@ -6,7 +6,7 @@ export default class DevicesList extends BaseCommand<typeof DevicesList> {
|
|
|
6
6
|
'include-offline': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
7
|
days: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
-
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
name: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
'with-data': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
tag: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
};
|
|
@@ -16,6 +16,7 @@ seen timestamp and datapoint count from analytics.`;
|
|
|
16
16
|
'<%= config.bin %> device list --include-offline --limit 100',
|
|
17
17
|
'<%= config.bin %> device list --tag location=warehouse',
|
|
18
18
|
'<%= config.bin %> device list --name robot --dev --json',
|
|
19
|
+
'<%= config.bin %> device list --name mech-0 --name mech-1 --dev --toon',
|
|
19
20
|
];
|
|
20
21
|
static flags = {
|
|
21
22
|
'include-offline': Flags.boolean({
|
|
@@ -33,7 +34,8 @@ seen timestamp and datapoint count from analytics.`;
|
|
|
33
34
|
}),
|
|
34
35
|
name: Flags.string({
|
|
35
36
|
char: 'n',
|
|
36
|
-
description: 'Filter devices by name (search)',
|
|
37
|
+
description: 'Filter devices by name (search), can be specified multiple times',
|
|
38
|
+
multiple: true,
|
|
37
39
|
}),
|
|
38
40
|
'with-data': Flags.boolean({
|
|
39
41
|
char: 'w',
|
|
@@ -50,8 +52,6 @@ seen timestamp and datapoint count from analytics.`;
|
|
|
50
52
|
const baseBody = {
|
|
51
53
|
enabled: true,
|
|
52
54
|
};
|
|
53
|
-
if (this.flags.name)
|
|
54
|
-
baseBody.query = this.flags.name;
|
|
55
55
|
if (this.flags.tag && this.flags.tag.length > 0) {
|
|
56
56
|
const tags = {};
|
|
57
57
|
for (const t of this.flags.tag) {
|
|
@@ -67,9 +67,35 @@ seen timestamp and datapoint count from analytics.`;
|
|
|
67
67
|
baseBody.tags = tags;
|
|
68
68
|
}
|
|
69
69
|
const limit = this.flags.limit;
|
|
70
|
+
const names = this.flags.name ?? [];
|
|
71
|
+
const hasNameFilter = names.length > 0;
|
|
70
72
|
let filtered;
|
|
71
|
-
if (
|
|
72
|
-
//
|
|
73
|
+
if (hasNameFilter) {
|
|
74
|
+
// When filtering by name, always query all devices (online + offline) so
|
|
75
|
+
// that a device can be found regardless of its current online status.
|
|
76
|
+
// Make one parallel request per name, then merge and deduplicate by id.
|
|
77
|
+
const onlineIds = await this.getOnlineDeviceIds();
|
|
78
|
+
const results = await Promise.all(names.map((name) => this.api('admin', 'devices/query', { body: { ...baseBody, query: name, count: limit } })));
|
|
79
|
+
const seen = new Set();
|
|
80
|
+
filtered = [];
|
|
81
|
+
for (const result of results) {
|
|
82
|
+
for (const device of result.items ?? []) {
|
|
83
|
+
const id = device.id;
|
|
84
|
+
if (!seen.has(id)) {
|
|
85
|
+
seen.add(id);
|
|
86
|
+
filtered.push({
|
|
87
|
+
...device,
|
|
88
|
+
online: onlineIds ? onlineIds.has(id) : isOnlineByState(device),
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// Respect --limit on the merged set
|
|
94
|
+
if (filtered.length > limit)
|
|
95
|
+
filtered = filtered.slice(0, limit);
|
|
96
|
+
}
|
|
97
|
+
else if (this.flags['include-offline'] || this.flags['with-data']) {
|
|
98
|
+
// --include-offline / --with-data: single fetch, enrich with online status
|
|
73
99
|
const result = await this.api('admin', 'devices/query', { body: { ...baseBody, count: limit } });
|
|
74
100
|
const onlineIds = await this.getOnlineDeviceIds();
|
|
75
101
|
filtered = (result.items ?? []).map((device) => ({
|
|
@@ -123,7 +149,7 @@ seen timestamp and datapoint count from analytics.`;
|
|
|
123
149
|
}
|
|
124
150
|
const output = { items: filtered };
|
|
125
151
|
if (!this.jsonEnabled()) {
|
|
126
|
-
const mode = this.flags['with-data'] ? 'with data' : this.flags['include-offline'] ? 'all' : 'online';
|
|
152
|
+
const mode = hasNameFilter ? 'by name' : this.flags['with-data'] ? 'with data' : this.flags['include-offline'] ? 'all' : 'online';
|
|
127
153
|
const days = this.flags.days;
|
|
128
154
|
const columns = [
|
|
129
155
|
{ key: 'name', label: 'NAME', width: 24 },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/device/list.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;AAChE,OAAO,EAAC,gBAAgB,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAA;AAErE,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAA+B;IACtE,MAAM,CAAU,WAAW,GAAG;;;;mDAImB,CAAA;IAEjD,MAAM,CAAU,QAAQ,GAAG;QACzB,+BAA+B;QAC/B,iDAAiD;QACjD,2CAA2C;QAC3C,qDAAqD;QACrD,6DAA6D;QAC7D,wDAAwD;QACxD,yDAAyD;
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/device/list.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;AAChE,OAAO,EAAC,gBAAgB,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAA;AAErE,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAA+B;IACtE,MAAM,CAAU,WAAW,GAAG;;;;mDAImB,CAAA;IAEjD,MAAM,CAAU,QAAQ,GAAG;QACzB,+BAA+B;QAC/B,iDAAiD;QACjD,2CAA2C;QAC3C,qDAAqD;QACrD,6DAA6D;QAC7D,wDAAwD;QACxD,yDAAyD;QACzD,wEAAwE;KACzE,CAAA;IAED,MAAM,CAAU,KAAK,GAAG;QACtB,iBAAiB,EAAE,KAAK,CAAC,OAAO,CAAC;YAC/B,IAAI,EAAE,GAAG;YAC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testing)
|
|
52
52
|
--stage Target the stage environment (for staging)
|
|
53
53
|
--json Output raw JSON instead of formatted tables
|
|
54
|
+
--toon Output data in TOON (Token-Oriented Object Notation) format
|
|
54
55
|
-h, --help Show help for any command
|
|
55
56
|
|
|
56
57
|
AUTHENTICATION
|
|
@@ -133,6 +134,7 @@ EXAMPLES
|
|
|
133
134
|
TIPS
|
|
134
135
|
* Use --json with any command to get machine-readable output for scripting
|
|
135
136
|
* Pipe output to jq for advanced JSON processing: fcli device list --json | jq
|
|
137
|
+
* Use --toon for compact Token-Oriented Object Notation output (great for LLM prompts)
|
|
136
138
|
* Set --dev or --stage to target non-production environments
|
|
137
139
|
* Use fcli <command> --help to see detailed help for any command
|
|
138
140
|
|
package/dist/help.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,IAAI;IACrB,KAAK,CAAC,YAAY;QACnC,MAAM,MAAM,GAAG;;kDAE+B,IAAI,CAAC,MAAM,CAAC,OAAO
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,IAAI;IACrB,KAAK,CAAC,YAAY;QACnC,MAAM,MAAM,GAAG;;kDAE+B,IAAI,CAAC,MAAM,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2IpE,CAAA;QAEG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IAClB,CAAC;CACF"}
|