@remotedraw/cli 0.2.1 → 0.3.0

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
@@ -7,17 +7,25 @@ for your chosen stack.
7
7
 
8
8
  ## Install
9
9
 
10
- RemoteDraw requires Node.js 20 or newer.
10
+ RemoteDraw requires Node.js 20 or newer. Use whichever package manager your
11
+ project already uses — the CLI reads the project's lockfile and `packageManager`
12
+ field, and prints its own next steps in that manager's commands.
11
13
 
12
14
  ```sh
13
- npm install --global @remotedraw/cli
15
+ npm install -g @remotedraw/cli # npm
16
+ pnpm add -g @remotedraw/cli # pnpm
17
+ bun add -g @remotedraw/cli # bun
14
18
  remotedraw --version
15
19
  ```
16
20
 
17
- You can also run it without installing globally:
21
+ Yarn Berry has no global install, so run it straight from the registry — which
22
+ also works everywhere else, when you would rather not install anything:
18
23
 
19
24
  ```sh
20
- npx @remotedraw/cli@latest
25
+ yarn dlx @remotedraw/cli # Yarn
26
+ npx @remotedraw/cli@latest # npm
27
+ pnpm dlx @remotedraw/cli # pnpm
28
+ bunx @remotedraw/cli # bun
21
29
  ```
22
30
 
23
31
  ## Start here
@@ -159,8 +167,10 @@ remotedraw update # install the latest published version
159
167
  remotedraw update --check # report it without installing
160
168
  ```
161
169
 
162
- `update` detects whether the binary came from npm, pnpm, yarn, or bun and runs
163
- that package manager. Other commands check the registry at most once a day and
170
+ `update` detects whether the binary came from npm, pnpm, yarn, or bun and
171
+ whether it was run through `npx`/`pnpm dlx`/`yarn dlx`/`bunx`, which fetch the
172
+ latest release every time and so have nothing to update — then runs that
173
+ manager's own command. Other commands check the registry at most once a day and
164
174
  print a one-line notice when a newer version exists; that notice only appears on
165
175
  an interactive terminal, and `REMOTEDRAW_CLI_NO_UPDATE_CHECK=1`, `CI`, or
166
176
  `NO_UPDATE_NOTIFIER` disable it.
@@ -235,6 +245,24 @@ remotedraw agent --path .agents/skills/remotedraw --force
235
245
  remotedraw agent --path .claude/skills/remotedraw --force
236
246
  ```
237
247
 
248
+ Before scaffolding into an existing app, read it first. `scan` names the web,
249
+ server, and iOS projects in a tree, where an `rd_sk_` key may live, any
250
+ RemoteDraw wiring already present, the integration options that fit, and the
251
+ product questions to settle with the user before building:
252
+
253
+ ```sh
254
+ remotedraw scan --format json
255
+ remotedraw scan --path apps/customer-web
256
+ ```
257
+
258
+ When the integration already has its files and only needs credentials,
259
+ provision without scaffolding (and without `--force`):
260
+
261
+ ```sh
262
+ remotedraw project create --name "Field Notes" --env server # writes server/.env.local
263
+ remotedraw project create --name "Field Notes" --format json # prints the key once
264
+ ```
265
+
238
266
  ## Command reference
239
267
 
240
268
  ```text
@@ -251,6 +279,8 @@ doctor Check project config, packages, and environment variables.
251
279
  create-input Create or print a test input request payload.
252
280
  examples List or install example projects.
253
281
  agent Print or install the RemoteDraw agent skill.
282
+ scan Read a codebase and propose where RemoteDraw fits.
283
+ project Create a dashboard project and API key without scaffolding.
254
284
  ```
255
285
 
256
286
  Run `remotedraw <command> --help` for command-specific options.
package/dist/cli.d.ts CHANGED
@@ -2,8 +2,8 @@ import { type WizardDefinition, type WizardTerminal } from "./setup-wizard.js";
2
2
  import { type CloudRuntime } from "./cloud.js";
3
3
  import { type UpdateRuntime } from "./update.js";
4
4
  export declare const CLI_VERSION: string;
5
- export declare const REMOTEDRAW_SDK_RANGE = "^0.2.0";
6
- export declare const REMOTEDRAW_CLI_RANGE = "^0.2.0";
5
+ export declare const REMOTEDRAW_SDK_RANGE = "^0.3.0";
6
+ export declare const REMOTEDRAW_CLI_RANGE = "^0.3.0";
7
7
  export type CliResult = {
8
8
  exitCode: number;
9
9
  stdout: string;
@@ -64,7 +64,9 @@ export declare function createRemoteDrawProject(plan: IntegrationPlan, outputDir
64
64
  dryRun?: boolean;
65
65
  force?: boolean;
66
66
  }): Promise<string[]>;
67
- export declare function projectSetupDefinition(): WizardDefinition;
67
+ export declare function projectSetupDefinition(detected?: {
68
+ packageManager?: PackageManagerChoice;
69
+ }): WizardDefinition;
68
70
  type PayloadOptions = {
69
71
  preset: PresetChoice;
70
72
  label: string;
@@ -76,8 +78,6 @@ export declare function createSessionPayload(options: PayloadOptions): {
76
78
  externalId: string;
77
79
  markupPreset: "approval" | "sketch" | "photoMarkup" | "pdfMarkup" | "mapMarkup" | "screenMarkup" | "designReview" | "pointer";
78
80
  target: {
79
- kind: string;
80
- label: string;
81
81
  metadata: {
82
82
  descriptor: {
83
83
  version: number;
@@ -107,6 +107,18 @@ export declare function createSessionPayload(options: PayloadOptions): {
107
107
  };
108
108
  };
109
109
  };
110
+ coordinateSpace?: {
111
+ width: number;
112
+ height: number;
113
+ bounds: {
114
+ minX: number;
115
+ minY: number;
116
+ maxX: number;
117
+ maxY: number;
118
+ };
119
+ };
120
+ kind: string;
121
+ label: string;
110
122
  };
111
123
  };
112
124
  /**
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAQA,OAAO,EAIL,KAAK,gBAAgB,EAGrB,KAAK,cAAc,EAEpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAYL,KAAK,YAAY,EAElB,MAAM,YAAY,CAAC;AAqBpB,OAAO,EAOL,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;AAMrB,eAAO,MAAM,WAAW,QAGT,CAAC;AAQhB,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAC7C,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAE7C,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAIF,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI;IACpD,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,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