@littlefriend/cli 0.1.3 → 0.1.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.
Files changed (3) hide show
  1. package/README.md +40 -2
  2. package/dist/index.js +904 -719
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -89,6 +89,7 @@ A project in JSON is:
89
89
  privacyMode: 'aggregate' | 'journey';
90
90
  timezone: string;
91
91
  allowedOrigins: string[]; // empty: every origin
92
+ allowedApps: string[]; // app ids that may send, lowercased; empty: no app
92
93
  campaignAllowTerm: boolean;
93
94
  retentionEventsDays: number; retentionAggregatesDays: number;
94
95
  installVerifiedAt: string | null; createdAt: string;
@@ -218,6 +219,42 @@ The project, whether events arrive, and why any were refused. It is `verify` wit
218
219
  littlefriend projects check --project acme.com
219
220
  ```
220
221
 
222
+ #### `apps list`
223
+
224
+ The project's allowed apps: the bundle ids and package names of the native apps that may send data to it.
225
+
226
+ ```sh
227
+ littlefriend apps list
228
+ ```
229
+
230
+ ```ts
231
+ { allowedApps: string[] }
232
+ ```
233
+
234
+ #### `apps add`
235
+
236
+ Allows an app by its bundle id (iOS, macOS) or package name (Android). The id is stored lowercased, and an id that does not look like `com.acme.shop` is refused before anything is sent. Prints the new list.
237
+
238
+ ```sh
239
+ littlefriend apps add com.acme.shop
240
+ ```
241
+
242
+ ```ts
243
+ { allowedApps: string[] }
244
+ ```
245
+
246
+ #### `apps remove`
247
+
248
+ Stops accepting data from an app and prints the new list. An id that is not listed changes nothing.
249
+
250
+ ```sh
251
+ littlefriend apps remove com.acme.shop
252
+ ```
253
+
254
+ ```ts
255
+ { allowedApps: string[] }
256
+ ```
257
+
221
258
  ### Install
222
259
 
223
260
  #### `snippet`
@@ -262,7 +299,7 @@ littlefriend keys list
262
299
 
263
300
  #### `keys create`
264
301
 
265
- Creates a secret key: `server` for `@littlefriend/node`, `edge` for `@littlefriend/edge` and the agent door, `read` for reading reports.
302
+ Creates a secret key: `server` for `@littlefriend/node`, `edge` for `@littlefriend/edge` and the agent door, `read` for reading reports. `--label` names it in the key list.
266
303
 
267
304
  With `--write-env`, the secret goes straight into the file as `NAME=secret` and is never printed. The name defaults to `LF_SERVER_KEY`, `LF_EDGE_KEY` or `LF_READ_KEY`; change it with `--env-name`. If the file already sets that name, no key is created. The CLI warns when git does not ignore the file.
268
305
 
@@ -422,10 +459,11 @@ The JSON is the API's `FunnelReport`: `{ meta, available, unavailableReason?, wi
422
459
 
423
460
  #### `report`
424
461
 
425
- Quick numbers to check the data looks right: `overview` (the default), `pages`, `sources`, `goals` or `countries`, over `--from` and `--to` (default the last 7 days in the project's time zone).
462
+ Quick numbers to check the data looks right: `overview` (the default), `pages`, `sources`, `goals` or `countries`, over `--from` and `--to` (default the last 7 days in the project's time zone). `--platform web`, `ios`, `macos` or `android` counts one platform only.
426
463
 
427
464
  ```sh
428
465
  littlefriend report sources --from 2026-09-01 --to 2026-09-28
466
+ littlefriend report overview --platform ios
429
467
  ```
430
468
 
431
469
  The JSON is the API's report response, with `meta.range` holding the dates used.