@owlmetry/cli 0.1.13 → 0.1.14
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
|
});
|
|
@@ -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.14").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.14
|
|
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
|
|
@@ -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
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmetry/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
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",
|