@owlmetry/cli 0.1.2 → 0.1.3

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
@@ -6262,10 +6262,19 @@ projectsCommand.command("view <id>").description("View project details").action(
6262
6262
  const project = await client.getProject(id);
6263
6263
  output(globals.format, project, () => formatProjectDetail(project));
6264
6264
  });
6265
- projectsCommand.command("create").description("Create a new project").requiredOption("--team-id <id>", "Team ID").requiredOption("--name <name>", "Project name").requiredOption("--slug <slug>", "Project slug").action(async (opts, cmd) => {
6265
+ projectsCommand.command("create").description("Create a new project").option("--team-id <id>", "Team ID (defaults to active team)").requiredOption("--name <name>", "Project name").requiredOption("--slug <slug>", "Project slug").action(async (opts, cmd) => {
6266
6266
  const { client, globals } = createClient(cmd);
6267
+ let teamId = opts.teamId;
6268
+ if (!teamId) {
6269
+ const config = loadConfig();
6270
+ if (!config) {
6271
+ throw new Error("No team ID specified and no config found. Use --team-id or run `owlmetry auth verify` first.");
6272
+ }
6273
+ const resolved = getActiveProfile(config, globals.team);
6274
+ teamId = resolved.teamId;
6275
+ }
6267
6276
  const project = await client.createProject({
6268
- team_id: opts.teamId,
6277
+ team_id: teamId,
6269
6278
  name: opts.name,
6270
6279
  slug: opts.slug
6271
6280
  });
@@ -7174,7 +7183,7 @@ var switchCommand = new Command("switch").description("Switch active team profil
7174
7183
  });
7175
7184
 
7176
7185
  // src/index.ts
7177
- var program2 = new Command().name("owlmetry").version("0.1.2").description("OwlMetry CLI \u2014 query metrics and manage your apps from the terminal").addOption(
7186
+ var program2 = new Command().name("owlmetry").version("0.1.3").description("OwlMetry CLI \u2014 query metrics and manage your apps from the terminal").addOption(
7178
7187
  new Option("--format <format>", "Output format").choices(["table", "json", "log"]).default("table")
7179
7188
  ).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");
7180
7189
  program2.addCommand(authCommand);
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: owlmetry-cli
3
- version: 0.1.0
3
+ version: 0.1.3
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
@@ -121,7 +121,7 @@ Projects group apps by product and scope metrics and funnels. Create one project
121
121
  ```bash
122
122
  owlmetry projects --format json # List all
123
123
  owlmetry projects view <id> --format json # View details + apps
124
- owlmetry projects create --team-id <id> --name <name> --slug <slug> --format json
124
+ owlmetry projects create --name <name> --slug <slug> [--team-id <id>] --format json
125
125
  owlmetry projects update <id> --name <new-name> --format json
126
126
  ```
127
127
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: owlmetry-node
3
- version: 0.1.0
3
+ version: 0.1.3
4
4
  description: >-
5
5
  Integrate the OwlMetry Node.js SDK into a backend service for server-side
6
6
  analytics, event tracking, metrics, funnels, and A/B experiments. Use when
@@ -59,13 +59,13 @@ Owl.configure({
59
59
 
60
60
  ## Next Steps — Codebase Instrumentation
61
61
 
62
- Once `Owl.configure()` is in place and the project builds, **stop and ask the user** which area they'd like to instrument first. Present these three options:
62
+ Once `Owl.configure()` is in place and the project builds successfully, **you MUST stop here and ask the user** which area they'd like to instrument first — even if the user's original prompt asked you to "instrument the app." Do not proceed with any code changes until the user chooses. Present these three options:
63
63
 
64
64
  1. **Event & error logging** — Audit the codebase for request handlers, error paths, background jobs, and key operations. Add `Owl.info()`, `Owl.warn()`, `Owl.error()` calls at meaningful points throughout the service. This is SDK-only — no CLI setup required beyond what's already done.
65
65
  2. **Structured metrics** — Identify operations worth measuring (API response times, database queries, external service calls, etc.). Add `Owl.startOperation()` / `Owl.recordMetric()` to track durations and success rates. **Requires CLI first:** each metric slug must be defined on the server via `owlmetry metrics create` (use the `/owlmetry-cli` skill) before the SDK can emit events for it.
66
66
  3. **Funnel tracking** — Identify server-side user journeys (sign-up flow, payment processing, onboarding steps). Add `Owl.track()` calls at each step to measure drop-off. **Requires CLI first:** the funnel definition (with steps and event filters) must be created via `owlmetry funnels create` (use the `/owlmetry-cli` skill) before tracking makes sense.
67
67
 
68
- Wait for the user to choose before proceeding. For whichever option they pick, do a thorough audit of the entire codebase to find all relevant locations, then present a summary of proposed changes before making any edits.
68
+ After the user chooses, do a thorough audit of the entire codebase to find all relevant locations, then present a summary of proposed changes before making any edits.
69
69
 
70
70
  ## Buffering and Delivery
71
71
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: owlmetry-swift
3
- version: 0.1.0
3
+ version: 0.1.3
4
4
  description: >-
5
5
  Integrate the OwlMetry Swift SDK into an iOS or macOS app for analytics,
6
6
  event tracking, metrics, funnels, and A/B experiments. Use when
@@ -99,13 +99,13 @@ Auto-detects: bundle ID, debug mode (`#if DEBUG`). Auto-generates: session ID (f
99
99
 
100
100
  ## Next Steps — Codebase Instrumentation
101
101
 
102
- Once `Owl.configure()` is in place and the project builds, **stop and ask the user** which area they'd like to instrument first. Present these three options:
102
+ Once `Owl.configure()` is in place and the project builds successfully, **you MUST stop here and ask the user** which area they'd like to instrument first — even if the user's original prompt asked you to "instrument the app." Do not proceed with any code changes until the user chooses. Present these three options:
103
103
 
104
104
  1. **Event & error logging** — Audit the codebase for user actions, screen views, error handling, and key flows. Add `Owl.info()`, `Owl.warn()`, `Owl.error()` calls at meaningful points. This is SDK-only — no CLI setup required beyond what's already done.
105
105
  2. **Structured metrics** — Identify operations worth measuring (network requests, data loading, image processing, etc.). Add `Owl.startOperation()` / `Owl.recordMetric()` to track durations and success rates. **Requires CLI first:** each metric slug must be defined on the server via `owlmetry metrics create` (use the `/owlmetry-cli` skill) before the SDK can emit events for it.
106
106
  3. **Funnel tracking** — Identify user journeys (onboarding, checkout, key conversions). Add `Owl.track()` calls at each step to measure drop-off. **Requires CLI first:** the funnel definition (with steps and event filters) must be created via `owlmetry funnels create` (use the `/owlmetry-cli` skill) before tracking makes sense.
107
107
 
108
- Wait for the user to choose before proceeding. For whichever option they pick, do a thorough audit of the entire codebase to find all relevant locations, then present a summary of proposed changes before making any edits.
108
+ After the user chooses, do a thorough audit of the entire codebase to find all relevant locations, then present a summary of proposed changes before making any edits.
109
109
 
110
110
  ## Log Events
111
111
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmetry/cli",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
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",