@meterapp/car-image 1.14.0 → 1.14.1

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  CLI and MCP server for the **Car Image API** by Meter — studio-quality, transparent-background renders of any vehicle in the open [`@meterapp/vehicle-db`](https://github.com/MeterApp/vehicle-db) catalog (1,600 makes, 41,975 models, 1990–2027; [browse them](https://carimage.dev/cars?ref=npm-cli)). Eight camera views, any paint color (fifteen named presets or any hex), PNG/WebP/JPG up to 1024 px, at any width × height, transparent or on a solid background. Plus stable vehicle ids, free VIN decoding and textured 3D models (GLB, USDZ, FBX).
4
4
 
5
- **Pricing:** 1 credit per image (cached or generated) · Free 100 credits at signup (evaluation and personal projects) · Pro $29/mo 25,000 credits a month (commercial license while active) · Business $99/mo 150,000 credits · $1 per 100 credits beyond the allowance, purchased credits never expire. A 3D model is 100 credits, once per vehicle and color, and hosting it is free; VIN decoding, catalog lookups, polling and downloads are free.
5
+ **Pricing:** 1 credit per image (cached or generated) · Free 100 credits at signup (evaluation and personal projects) · Pro $29/mo 25,000 credits a month (commercial license that the renders keep after the plan ends) · Business $99/mo 150,000 credits · $1 per 100 credits beyond the allowance, purchased credits never expire. A 3D model is 100 credits, once per vehicle and color, and hosting it is free; VIN decoding, catalog lookups, polling and downloads are free.
6
6
 
7
7
 
8
8
  For vehicle images in chat, resolve the vehicle, call `create_car_image_urls` once (7-day TTL, unlimited uses, renewal off unless requested), and paste each returned `data[].markdown` directly in the final reply, outside code fences. State expiry and reuse unexpired URLs. The MCP response includes the same signed URL in `url`; REST responses are unchanged. Use `get_car_image` for explicit file or byte requests. Do not call both paid tools for one chat image. If inline display is unavailable, link the existing URL rather than minting another.
@@ -47,7 +47,7 @@ Six commands cover what most people do; the rest are in the next table and behin
47
47
  | Command | What it does |
48
48
  | --- | --- |
49
49
  | `car-image` | Interactive onboarding on a TTY (login if needed → `whoami` → free quick check → next steps). Prints help when not interactive. |
50
- | `whoami` (alias `status`) · `logout` | Credits (≈ $), auto-reload, payment method, 30-day usage, masked key prefix and scopes, base URL · remove the stored key. |
50
+ | `whoami` (alias `status`) · `logout` | Credits (≈ $), auto-reload, payment method, the plan and what its license allows, 30-day usage, masked key prefix and scopes, base URL · remove the stored key. |
51
51
  | `resolve <free text…>` | Free text → exact parameters (with the vehicle id), candidates, confidence (`high`, `medium` or `low`) and a ready-to-run `car-image get …`. |
52
52
  | `check <file.csv\|file.json\|-> [--out <file>] [--format csv\|json] [--json]` (alias `coverage`) | Checks which vehicles of a list the catalog carries, each read the way `get` reads it; `--out` writes the file back with `status`, `vehicle_id`, the catalog spelling, `match`, `reason` and `suggested_vehicle_id` beside each row. Any length, 2,000 vehicles per request. Free, key required. See [Backfill a catalog](#backfill-a-catalog). |
53
53
  | `options` · `describe [operationId\|path\|all] [--json]` | Views (with yaw), colors, sizes, fit modes, backgrounds, trim limits, formats, pricing, catalog coverage, vehicle ids · the REST API explained from `/openapi.json`. |
@@ -2,10 +2,16 @@ import { CREDITS_PER_DOLLAR } from "@meterapp/car-image-sdk";
2
2
  import { maskKey } from "../config.js";
3
3
  import { CliError } from "../errors.js";
4
4
  import { creditsToUsd, formatInteger, keyValues, printJson } from "../output.js";
5
+ /** What each plan's license means, in one line: the renders a paid plan delivers keep their license after the plan ends (/terms#license). */
6
+ const LICENSE_LINES = {
7
+ evaluation: "evaluation and personal projects; a paid plan carries the commercial license",
8
+ commercial: "commercial license; what you render on this plan stays licensed after it ends",
9
+ "commercial+export": "commercial license, plus export or a catalog copy by written agreement",
10
+ };
5
11
  export const whoamiCommand = {
6
12
  name: "whoami",
7
13
  aliases: ["status"],
8
- summary: "Show credits, usage, key and base URL for the current account",
14
+ summary: "Show credits, plan and license, usage, key and base URL for the current account",
9
15
  usage: "car-image whoami [--json]",
10
16
  async run(ctx) {
11
17
  const { io, clientContext } = ctx;
@@ -25,6 +31,8 @@ export const whoamiCommand = {
25
31
  ["Auto-reload", data.auto_reload ? "on" : "off"],
26
32
  ["Payment method", data.has_payment_method ? "on file" : "none"],
27
33
  ];
34
+ if (data.plan)
35
+ rows.push(["Plan", `${data.plan.name}${data.plan.active ? "" : " (inactive)"} (${LICENSE_LINES[data.plan.license] ?? data.plan.license})`]);
28
36
  if (usage) {
29
37
  const hitRate = Number.isFinite(usage.cache_hit_rate) ? `${Math.round(usage.cache_hit_rate * (usage.cache_hit_rate <= 1 ? 100 : 1))}% cache hits` : "";
30
38
  rows.push(["Usage (30d)", `${formatInteger(usage.requests)} requests, ${formatInteger(usage.images)} images${hitRate ? `, ${hitRate}` : ""}`]);
@@ -1 +1 @@
1
- {"version":3,"file":"whoami.js","sourceRoot":"","sources":["../../src/commands/whoami.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEjF,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC9C,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,CAAC,QAAQ,CAAC;IACnB,OAAO,EAAE,+DAA+D;IACxE,KAAK,EAAE,2BAA2B;IAClC,KAAK,CAAC,GAAG,CAAC,GAAmB;QAC3B,MAAM,EAAE,EAAE,EAAE,aAAa,EAAE,GAAG,GAAG,CAAC;QAClC,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;YAC1B,MAAM,IAAI,QAAQ,CAAC,gBAAgB,EAAE,CAAC,EAAE,iDAAiD,CAAC,CAAC;QAC7F,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACrD,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC;YACZ,S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CAAC,MAAM,CAAC,MAAM,aAAa,CAAC,SAAS,IAAI,SAAS,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC;QACrM,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/C,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;QACtC,EAAE,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,IAAI,CAAC,OAAO,GAAG,EAAE,EAAE,CAAC;YACtB,EAAE,CAAC,MAAM,CAAC,gEAAgE,aAAa,CAAC,OAAO,+BAA+B,CAAC,CAAC;QAClI,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;CACF,CAAC"}
package/dist/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /** Kept in sync with package.json by `src/version.test.ts`. */
2
- export const CLI_VERSION = "1.14.0";
2
+ export const CLI_VERSION = "1.14.1";
3
3
  export const PACKAGE_NAME = "@meterapp/car-image";
4
4
  export const BIN_NAME = "car-image";
5
5
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meterapp/car-image",
3
- "version": "1.14.0",
3
+ "version": "1.14.1",
4
4
  "description": "CLI and MCP server for the Car Image API by Meter: studio-quality, transparent-background vehicle renders for agents, apps and browsers. Login, fetch images in any paint color and make logos, mint signed URLs, decode VINs, build 3D models, request missing vehicles, run diagnostics, configure agents.",
5
5
  "license": "MIT",
6
6
  "author": "Meter <support@carimage.dev> (https://meterapp.co)",