@owlmetry/cli 0.1.13 → 0.1.15
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/dist/index.cjs
CHANGED
|
@@ -6691,20 +6691,18 @@ init_cjs_shims();
|
|
|
6691
6691
|
function formatMetricsTable(metrics) {
|
|
6692
6692
|
if (metrics.length === 0) return source_default.dim("No metrics defined");
|
|
6693
6693
|
const lines = [
|
|
6694
|
-
source_default.bold("Slug".padEnd(30) + "Name".padEnd(30)
|
|
6695
|
-
"\u2500".repeat(
|
|
6694
|
+
source_default.bold("Slug".padEnd(30) + "Name".padEnd(30)),
|
|
6695
|
+
"\u2500".repeat(60)
|
|
6696
6696
|
];
|
|
6697
6697
|
for (const m of metrics) {
|
|
6698
|
-
|
|
6699
|
-
lines.push(`${m.slug.padEnd(30)}${m.name.padEnd(30)}${status}`);
|
|
6698
|
+
lines.push(`${m.slug.padEnd(30)}${m.name.padEnd(30)}`);
|
|
6700
6699
|
}
|
|
6701
6700
|
return lines.join("\n");
|
|
6702
6701
|
}
|
|
6703
6702
|
function formatMetricDetail(metric) {
|
|
6704
6703
|
const lines = [
|
|
6705
6704
|
source_default.bold(metric.name),
|
|
6706
|
-
source_default.dim(`slug: ${metric.slug}`)
|
|
6707
|
-
`Status: ${metric.status === "active" ? source_default.green("active") : source_default.yellow("paused")}`
|
|
6705
|
+
source_default.dim(`slug: ${metric.slug}`)
|
|
6708
6706
|
];
|
|
6709
6707
|
if (metric.description) lines.push(`
|
|
6710
6708
|
${metric.description}`);
|
|
@@ -6834,12 +6832,11 @@ metricsCommand.command("query <slug>").description("Query metric aggregation").r
|
|
|
6834
6832
|
});
|
|
6835
6833
|
output(globals.format, result, () => formatQueryResult(result));
|
|
6836
6834
|
});
|
|
6837
|
-
metricsCommand.command("update <slug>").description("Update a metric definition").requiredOption("--project-id <id>", "Project ID").option("--name <name>", "New name").option("--description <desc>", "New description").
|
|
6835
|
+
metricsCommand.command("update <slug>").description("Update a metric definition").requiredOption("--project-id <id>", "Project ID").option("--name <name>", "New name").option("--description <desc>", "New description").action(async (slug, opts, cmd) => {
|
|
6838
6836
|
const { client, globals } = createClient(cmd);
|
|
6839
6837
|
const metric = await client.updateMetric(slug, opts.projectId, {
|
|
6840
6838
|
name: opts.name,
|
|
6841
|
-
description: opts.description
|
|
6842
|
-
status: opts.status
|
|
6839
|
+
description: opts.description
|
|
6843
6840
|
});
|
|
6844
6841
|
output(globals.format, metric, () => formatMetricDetail(metric));
|
|
6845
6842
|
});
|
|
@@ -6986,14 +6983,14 @@ funnelsCommand.command("delete <slug>").description("Delete a funnel definition"
|
|
|
6986
6983
|
await client.deleteFunnel(slug, opts.projectId);
|
|
6987
6984
|
console.log(source_default.green(`Funnel "${slug}" deleted.`));
|
|
6988
6985
|
});
|
|
6989
|
-
funnelsCommand.command("query <slug>").description("Query funnel analytics").requiredOption("--project-id <id>", "Project ID").option("--since <date>", "Start time (e.g. 1h, 30m, 7d, or ISO 8601)").option("--until <date>", "End time (e.g. 1h, 30m, 7d, or ISO 8601)").option("--
|
|
6986
|
+
funnelsCommand.command("query <slug>").description("Query funnel analytics").requiredOption("--project-id <id>", "Project ID").option("--since <date>", "Start time (e.g. 1h, 30m, 7d, or ISO 8601)").option("--until <date>", "End time (e.g. 1h, 30m, 7d, or ISO 8601)").option("--closed", "Use closed (sequential) mode. Users must complete each step in order.").option("--app-version <version>", "Filter by app version").option("--environment <env>", "Filter by environment (ios, ipados, macos, android, web, backend)").option("--experiment <name:variant>", "Filter by experiment (format: name:variant)").option("--group-by <field>", "Group by: environment, app_version, or experiment:<name>").addOption(
|
|
6990
6987
|
new Option("--data-mode <mode>", "Data mode: production, development, or all").choices(["production", "development", "all"]).default("production")
|
|
6991
6988
|
).action(async (slug, opts, cmd) => {
|
|
6992
6989
|
const { client, globals } = createClient(cmd);
|
|
6993
6990
|
const result = await client.queryFunnel(slug, opts.projectId, {
|
|
6994
6991
|
since: opts.since,
|
|
6995
6992
|
until: opts.until,
|
|
6996
|
-
mode: opts.
|
|
6993
|
+
mode: opts.closed ? "closed" : "open",
|
|
6997
6994
|
app_version: opts.appVersion,
|
|
6998
6995
|
environment: opts.environment,
|
|
6999
6996
|
experiment: opts.experiment,
|
|
@@ -7172,7 +7169,7 @@ var switchCommand = new Command("switch").description("Switch active team profil
|
|
|
7172
7169
|
});
|
|
7173
7170
|
|
|
7174
7171
|
// src/index.ts
|
|
7175
|
-
var program2 = new Command().name("owlmetry").version("0.1.
|
|
7172
|
+
var program2 = new Command().name("owlmetry").version("0.1.15").description("OwlMetry CLI \u2014 query metrics and manage your apps from the terminal").addOption(
|
|
7176
7173
|
new Option("--format <format>", "Output format").choices(["table", "json", "log"]).default("table")
|
|
7177
7174
|
).option("--endpoint <url>", "OwlMetry API server URL").option("--api-key <key>", "API key").option("--ingest-endpoint <url>", "OwlMetry ingest endpoint URL (for SDKs; defaults to API endpoint for self-hosted)").option("--team <name-or-id>", "Use a specific team profile for this command");
|
|
7178
7175
|
program2.addCommand(authCommand);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: owlmetry-cli
|
|
3
|
-
version: 0.1.
|
|
3
|
+
version: 0.1.15
|
|
4
4
|
description: >-
|
|
5
5
|
Install the OwlMetry CLI, sign up, and manage projects, apps, metrics,
|
|
6
6
|
funnels, and events. Use when adding OwlMetry to a project, querying
|
|
@@ -161,7 +161,7 @@ owlmetry apps update <id> --name <name> --format json
|
|
|
161
161
|
owlmetry metrics list --project-id <id> --format json
|
|
162
162
|
owlmetry metrics view <slug> --project-id <id> --format json
|
|
163
163
|
owlmetry metrics create --project-id <id> --name <name> --slug <slug> [--lifecycle] [--description <desc>] --format json
|
|
164
|
-
owlmetry metrics update <slug> --project-id <id> [--name <name>] [--
|
|
164
|
+
owlmetry metrics update <slug> --project-id <id> [--name <name>] [--description <desc>] --format json
|
|
165
165
|
owlmetry metrics delete <slug> --project-id <id>
|
|
166
166
|
owlmetry metrics events <slug> --project-id <id> [--phase <phase>] [--user-id <id>] [--since <time>] [--until <time>] --format json
|
|
167
167
|
owlmetry metrics query <slug> --project-id <id> [--since <time>] [--until <time>] [--app-id <id>] [--user-id <id>] [--group-by <field>] --format json
|
|
@@ -172,7 +172,7 @@ owlmetry funnels view <slug> --project-id <id> --format json
|
|
|
172
172
|
owlmetry funnels create --project-id <id> --name <name> --slug <slug> --steps-file <path> [--description <desc>] --format json
|
|
173
173
|
owlmetry funnels update <slug> --project-id <id> --steps-file <path> --format json
|
|
174
174
|
owlmetry funnels delete <slug> --project-id <id>
|
|
175
|
-
owlmetry funnels query <slug> --project-id <id> [--since <time>] [--until <time>] [--
|
|
175
|
+
owlmetry funnels query <slug> --project-id <id> [--since <time>] [--until <time>] [--closed] [--group-by <field>] --format json
|
|
176
176
|
|
|
177
177
|
# Events
|
|
178
178
|
owlmetry events [--project-id <id>] [--app-id <id>] [--level <level>] [--user-id <id>] [--session-id <id>] [--since <time>] [--limit <n>] --format json
|
|
@@ -228,7 +228,7 @@ The metric definition must exist on the server **before** the SDK emits events f
|
|
|
228
228
|
owlmetry metrics list --project-id <id> --format json # List all
|
|
229
229
|
owlmetry metrics view <slug> --project-id <id> --format json # View details
|
|
230
230
|
owlmetry metrics create --project-id <id> --name <name> --slug <slug> [--lifecycle] [--description <desc>] --format json
|
|
231
|
-
owlmetry metrics update <slug> --project-id <id> [--name <name>] [--
|
|
231
|
+
owlmetry metrics update <slug> --project-id <id> [--name <name>] [--description <desc>] --format json
|
|
232
232
|
owlmetry metrics delete <slug> --project-id <id>
|
|
233
233
|
```
|
|
234
234
|
|
|
@@ -240,9 +240,9 @@ Funnels measure how users progress through a multi-step flow and where they drop
|
|
|
240
240
|
|
|
241
241
|
Step definitions match directly on the step name passed to `track()` in the SDK — no prefix or transformation needed.
|
|
242
242
|
|
|
243
|
-
Funnels support two analysis modes:
|
|
244
|
-
- **Closed mode** (
|
|
245
|
-
- **Open mode** (
|
|
243
|
+
Both modes group events by `user_id` — events with no `user_id` are excluded from funnel analytics. Funnels support two analysis modes:
|
|
244
|
+
- **Closed mode** (`--closed` on query): sequential — a user must complete steps in order. The system uses each user's earliest timestamp per step and requires strict chronological ordering (step 2 must occur after step 1). Use for linear flows like onboarding or checkout.
|
|
245
|
+
- **Open mode** (default): independent — each step counts distinct users separately, regardless of other steps.
|
|
246
246
|
|
|
247
247
|
Maximum 20 steps per funnel.
|
|
248
248
|
|
|
@@ -325,10 +325,10 @@ owlmetry metrics query <slug> --project-id <id> [--since <time>] [--until <time>
|
|
|
325
325
|
Funnel queries return conversion rates and drop-off between steps. The output shows how many users entered each step and what percentage continued to the next. Use `--group-by` to segment results and compare conversion across environments, app versions, or A/B experiment variants.
|
|
326
326
|
|
|
327
327
|
```bash
|
|
328
|
-
owlmetry funnels query <slug> --project-id <id> [--since <time>] [--until <time>] [--
|
|
328
|
+
owlmetry funnels query <slug> --project-id <id> [--since <time>] [--until <time>] [--closed] [--app-version <v>] [--environment <env>] [--experiment <name:variant>] [--group-by environment|app_version|experiment:<name>] [--data-mode <mode>] --format json
|
|
329
329
|
```
|
|
330
330
|
|
|
331
|
-
`--
|
|
331
|
+
`--closed` = closed (sequential) funnel mode. Without this flag, open mode is used (steps evaluated independently).
|
|
332
332
|
|
|
333
333
|
### Audit Logs
|
|
334
334
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmetry/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "OwlMetry CLI — manage projects, apps, metrics, funnels, and events from the terminal. Includes AI skill files for agent-assisted development.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|