@gepetto/cli 0.2.1 → 0.2.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/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @gepetto/cli
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/@gepetto/cli)](https://www.npmjs.com/package/@gepetto/cli)
4
+
3
5
  Gepetto API v2 from the terminal: real estate photo editing (enhance, declutter, furnish, sky, creative restyle, walls
4
6
  and floors, upscale). Made so that a person, or a coding agent such as Claude Code, can go from an empty project to a
5
7
  first render without leaving the terminal. Needs Node 18 or later. Formerly `gepetto-cli`.
@@ -17,6 +19,7 @@ npx @gepetto/cli webhook test http://localhost:3000/api/gepetto # sends a sign
17
19
  npx @gepetto/cli secret # your webhook signing secret
18
20
  npx @gepetto/cli keys # your test and live keys, masked (--show to print them in full)
19
21
  npx @gepetto/cli subscribe # payment link; the live key is written to .env.production.local once paid
22
+ npx @gepetto/cli billing # invoices, payment method and cancellation (Stripe portal)
20
23
  npx @gepetto/cli whoami # or logout
21
24
  ```
22
25
 
package/bin/gepetto.mjs CHANGED
@@ -7,7 +7,7 @@ import path from 'node:path';
7
7
  import crypto from 'node:crypto';
8
8
  import { spawn } from 'node:child_process';
9
9
 
10
- const VERSION = '0.2.1';
10
+ const VERSION = '0.2.3';
11
11
  const API = (process.env.GEPETTO_API_URL || 'https://europe-west1-gepettoai.cloudfunctions.net/v2').replace(/\/$/, '');
12
12
  // The keys go wherever GEPETTO_API_URL points: https only (http allowed for a local server)
13
13
  {
@@ -230,6 +230,13 @@ const commands = {
230
230
  fail('payment_timeout', 'No payment after 30 minutes. Run the command again once paid: the key will be written.');
231
231
  },
232
232
 
233
+ /** The Stripe customer portal of the account: invoices, payment method, cancellation. */
234
+ async billing() {
235
+ const { url } = await api('POST', '/cli/billing', { token: session() });
236
+ out(`Billing (invoices, payment method, cancellation): ${url}`, { event: 'billing', url });
237
+ openBrowser(url);
238
+ },
239
+
233
240
  async run() {
234
241
  const tool = positional[1];
235
242
  if (!TOOLS.includes(tool)) fail('unknown_tool', `Tool: ${TOOLS.join(', ')}. Example: npx @gepetto/cli run declutter --image ./room.jpg`);
@@ -326,6 +333,7 @@ const commands = {
326
333
  webhook test <url> Send a signed success and failure to your webhook endpoint
327
334
  secret Your webhook signing secret
328
335
  subscribe Payment link of the subscription; writes the live key once paid
336
+ billing Invoices, payment method and cancellation (Stripe portal)
329
337
  logout | whoami
330
338
 
331
339
  Every command accepts --json. Docs: https://docs.gepettoapp.com`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gepetto/cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Gepetto API v2 from the terminal: sign in, get an API key, render real estate photos (enhance, declutter, furnish, sky, restyle, walls and floors, upscale), subscribe.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -25,5 +25,12 @@
25
25
  "license": "MIT",
26
26
  "publishConfig": {
27
27
  "access": "public"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/Gepetto-AI/gepetto-cli.git"
32
+ },
33
+ "scripts": {
34
+ "version": "node scripts/sync-version.mjs bin/gepetto.mjs && git add bin/gepetto.mjs"
28
35
  }
29
36
  }