@formo/cli 1.0.2 → 1.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Formo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -10,6 +10,23 @@ npm install -g @formo/cli
10
10
  npx @formo/cli
11
11
  ```
12
12
 
13
+ ## Install the Formo Analytics agent skill
14
+
15
+ This repository also ships the [`formo-analytics`](skills/formo-analytics/SKILL.md) skill for Claude Code, Codex, and other [Agent Skills](https://agentskills.io)-compatible tools. It teaches agents to use Formo's MCP server, CLI, and REST API for project-scoped product and onchain analytics.
16
+
17
+ Install it in the current project:
18
+
19
+ ```bash
20
+ npx skills add https://github.com/getformo/cli/tree/main/skills/formo-analytics
21
+ ```
22
+
23
+ Or install it globally for Claude Code and Codex:
24
+
25
+ ```bash
26
+ npx skills add getformo/cli --skill formo-analytics --global \
27
+ --agent claude-code --agent codex
28
+ ```
29
+
13
30
  ## Authentication
14
31
 
15
32
  Save your API key locally:
@@ -24,7 +41,7 @@ Or set the `FORMO_API_KEY` environment variable — it takes precedence over the
24
41
  export FORMO_API_KEY=formo_abc123
25
42
  ```
26
43
 
27
- Get your API key from `Settings → API Keys` in the [Formo dashboard](https://app.formo.so).
44
+ Get your API key from `Settings → API` in the [Formo dashboard](https://app.formo.so).
28
45
 
29
46
  For local development or proxying, override API hosts with:
30
47
 
@@ -191,7 +208,7 @@ Get a single alert by ID.
191
208
 
192
209
  ```bash
193
210
  formo alerts create --name "High value tx" --trigger-type event \
194
- --trigger-filters '[{"name":"event","operator":"equals","value":"transaction"}]' \
211
+ --trigger-filters '[{"name":"event","operator":"eq","value":"transaction"}]' \
195
212
  --recipient '[{"type":"email","value":["alerts@myapp.com"]}]'
196
213
  ```
197
214
 
@@ -384,7 +401,7 @@ Pre-built analytics pipes — the same data that powers the Formo dashboard —
384
401
  |---|---|
385
402
  | `--date-from` | Inclusive start date `YYYY-MM-DD` (default: 7 days before `--date-to`) |
386
403
  | `--date-to` | Inclusive end date `YYYY-MM-DD` (default: today) |
387
- | `--filters` | JSON array of `[{field,op,value}]`. Use `in`/`notIn` with a pipe-delimited value (e.g. `"chrome\|firefox"`) |
404
+ | `--filters` | JSON array of `[{field,op,value}]`. Use `in`/`nin` with a pipe-delimited value (e.g. `"chrome\|firefox"`) |
388
405
  | `--params` | JSON object of pipe-specific params merged into the query (e.g. `{"limit":10,"group_by":"device"}`) |
389
406
 
390
407
  ```bash
@@ -392,7 +409,7 @@ formo analytics kpis
392
409
  formo analytics kpis --date-from 2026-04-01 --date-to 2026-04-30 --params '{"group_by":"device"}'
393
410
  formo analytics funnel --date-from 2026-04-01 --date-to 2026-04-30 --params '{"steps":[{"type":"event","event":"page","name":"page::0","filters":[]},{"type":"track","event":"connect","name":"connect::1","filters":[]}],"window_seconds":86400}'
394
411
  formo analytics top_wallets --date-from 2026-04-01 --date-to 2026-04-30 --params '{"limit":10}'
395
- formo analytics retention --filters '[{"field":"location","op":"equals","value":"US"}]'
412
+ formo analytics retention --filters '[{"field":"location","op":"eq","value":"US"}]'
396
413
  ```
397
414
 
398
415
  > Requires `query:read` scope. Run `formo analytics <pipe> --help` for the pipe-specific params accepted via `--params`.
@@ -448,7 +465,7 @@ formo events ingest --event '{"type":"track","channel":"cli","version":"1","anon
448
465
  | Field | Type | Description |
449
466
  |---|---|---|
450
467
  | `field` | `string` | Typed path (see prefixes below) |
451
- | `op` | `string` | `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `in`, `nin` |
468
+ | `op` | `string` | `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`, `contains` (social fields only), `notEmpty` / `isEmpty` (value-less existence checks). Long-form spellings (`equals`, `greater`, `includes`, …) are retired — the API rejects them with a `400` naming the token |
452
469
  | `value` | `any` | Value to compare against |
453
470
  | `scope` | `string` | _(token filters only)_ `any` or `protocol` |
454
471
  | `appId` | `string` | _(token filters with `scope: protocol`)_ e.g. `aave-v3` |
@@ -15,7 +15,7 @@ exports.analytics = incur_1.Cli.create('analytics', {
15
15
  const PIPES = [
16
16
  { name: 'kpis', description: 'Traffic KPIs: visitors, pageviews, bounce rate, session duration' },
17
17
  { name: 'event_timeseries', description: 'Event counts over time' },
18
- { name: 'funnel', description: 'Conversion funnel across ordered steps. --params: steps (JSON array of {type,event,name,filters?}), window_seconds, funnel_type, breakdown' },
18
+ { name: 'funnel', description: 'Conversion funnel across ordered steps. --params: steps (JSON array of {type,event,name,filters?}), window_seconds, funnel_type, group_by, limit, attribution' },
19
19
  { name: 'flow', description: 'User path/flow analysis. --params: start_step / end_step (JSON {type,event,...}), global_filters, window_seconds, max_steps' },
20
20
  { name: 'frequency', description: 'Engagement frequency distribution' },
21
21
  { name: 'lifecycle', description: 'User lifecycle stages (new, returning, power, resurrected, churned)' },
@@ -123,7 +123,7 @@ const sharedOptions = incur_1.z.object({
123
123
  .string()
124
124
  .optional()
125
125
  .describe('JSON array of filter conditions: [{"field","op","value"}]. ' +
126
- 'Use op "in"/"notIn" with a pipe-delimited value (e.g. "chrome|firefox").'),
126
+ 'Use op "in"/"nin" with a pipe-delimited value (e.g. "chrome|firefox").'),
127
127
  params: incur_1.z
128
128
  .string()
129
129
  .optional()
@@ -230,7 +230,9 @@ exports.profiles.command('search', {
230
230
  'Chains: chains.balance or chains.{chain_id}.balance. ' +
231
231
  'Apps: apps.{app_id}.balance. Tokens: tokens.{address}.balance ' +
232
232
  '(optional "scope":"any"|"protocol" + "appId"). Labels: labels.{tag_id}. ' +
233
- 'op: eq, neq, gt, gte, lt, lte, in, nin.'),
233
+ 'op: eq, neq, gt, gte, lt, lte, in, nin, contains, notEmpty, isEmpty ' +
234
+ '(contains = substring, social fields only; notEmpty/isEmpty = value-less existence checks on string fields). ' +
235
+ 'Long-form spellings (equals, notEquals, greater, greaterOrEqual, less, lessOrEqual, notIn, includes) are retired; the API rejects them with a 400 naming the token.'),
234
236
  logic: incur_1.z
235
237
  .enum(['and', 'or'])
236
238
  .optional()
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ function loginGuide() {
23
23
  ui_1.color.boldGreen("How to get your API key:"),
24
24
  "",
25
25
  ` ${ui_1.color.white("1.")} Go to ${ui_1.color.cyan(DASHBOARD_URL)}`,
26
- ` ${ui_1.color.white("2.")} Navigate to ${ui_1.color.bold("Settings")} → ${ui_1.color.bold("API Keys")}`,
26
+ ` ${ui_1.color.white("2.")} Navigate to ${ui_1.color.bold("Settings")} → ${ui_1.color.bold("API")}`,
27
27
  ` ${ui_1.color.white("3.")} Click ${ui_1.color.bold('"Create API Key"')} and copy the key`,
28
28
  ` ${ui_1.color.white("4.")} Run:`,
29
29
  "",
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@formo/cli",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "packageManager": "pnpm@11.1.2",
5
5
  "description": "Formo API CLI — query profiles and analytics data",
6
+ "license": "MIT",
6
7
  "repository": {
7
8
  "type": "git",
8
9
  "url": "git+https://github.com/getformo/cli.git"
@@ -29,7 +30,7 @@
29
30
  "test:watch": "mocha --watch"
30
31
  },
31
32
  "dependencies": {
32
- "axios": "^1.15.2",
33
+ "axios": "^1.18.0",
33
34
  "incur": "^0.3.4"
34
35
  },
35
36
  "overrides": {