@remotedraw/cli 0.1.2 → 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AxioSozo Services B.V.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -39,6 +39,59 @@ To see the available integration paths without starting the wizard:
39
39
  remotedraw guide
40
40
  ```
41
41
 
42
+ ## Language
43
+
44
+ The first interactive run asks which language the CLI should speak, listing each
45
+ language under its own name:
46
+
47
+ ```text
48
+ ? Language / Taal
49
+ ❯ ◉ English en
50
+ ○ Nederlands nl
51
+ ```
52
+
53
+ The answer is stored once in your user config directory and reused by every
54
+ later command, so the question is asked once per machine rather than once per
55
+ run. Change it at any time:
56
+
57
+ ```sh
58
+ remotedraw language # pick interactively, or list the current setting
59
+ remotedraw language nl # set it directly
60
+ ```
61
+
62
+ Non-interactive callers never see the prompt. A run without a stored choice, a
63
+ TTY, or an override speaks English. To force a language for one command or for a
64
+ whole CI job:
65
+
66
+ ```sh
67
+ remotedraw doctor --language nl
68
+ REMOTEDRAW_LANGUAGE=nl remotedraw doctor
69
+ ```
70
+
71
+ Precedence is `--language` (or `--lang`), then `REMOTEDRAW_LANGUAGE` /
72
+ `REMOTEDRAW_LANG`, then the stored choice, then English. An unrecognized code
73
+ fails with the list of supported languages rather than guessing.
74
+
75
+ Machine-readable output is **always English** regardless of the stored
76
+ language: `--format json` on any command, and `create-input --json`. It is a
77
+ data interchange format for CI and coding agents, not chrome for the operator,
78
+ and enum `value`s are identifiers that are never translated. Passing
79
+ `--language <code>` on that same invocation is a deliberate request and does
80
+ localize the human-readable `label`, `summary`, and `explanation` fields; a
81
+ stored choice or an environment variable does not. JSON `error.code` values are
82
+ declared at the point the error is raised, so they never change with language.
83
+
84
+ Localization covers CLI chrome only: prompts, help, summaries, doctor output,
85
+ and error messages. **Everything the CLI writes into your project stays
86
+ English** — generated code, comments, README files, `package.json` fields, and
87
+ API request payloads. Those artifacts are committed, reviewed, diffed, and read
88
+ by teammates and coding agents who may not share your CLI language, and they sit
89
+ next to English API identifiers and documentation.
90
+
91
+ Currently shipping English and Dutch. A language is added by dropping one
92
+ catalog file into `src/locales/` and registering it in `src/locales/index.ts`;
93
+ no call site changes, and anything a catalog omits falls back to English.
94
+
42
95
  ## Create a new app
43
96
 
44
97
  Start the interactive project creator:
@@ -88,7 +141,29 @@ remotedraw doctor
88
141
  ```
89
142
 
90
143
  It checks the project configuration, installed packages, environment values,
91
- and—when credentials are available—the RemoteDraw API connection.
144
+ the installed CLI version, and—when credentials are available—the RemoteDraw
145
+ API connection.
146
+
147
+ Without an override, commands talk to `https://api.remotedraw.com`. Doctor
148
+ prints the API base URL it resolved and where that value came from, so a
149
+ `.env.local` pointing at a non-production deployment is visible rather than
150
+ silent.
151
+
152
+ ## Update the CLI
153
+
154
+ `npm install -g` pins the version it installed and never revisits it, so a
155
+ global RemoteDraw CLI stays on whatever release you first installed:
156
+
157
+ ```sh
158
+ remotedraw update # install the latest published version
159
+ remotedraw update --check # report it without installing
160
+ ```
161
+
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
164
+ print a one-line notice when a newer version exists; that notice only appears on
165
+ an interactive terminal, and `REMOTEDRAW_CLI_NO_UPDATE_CHECK=1`, `CI`, or
166
+ `NO_UPDATE_NOTIFIER` disable it.
92
167
 
93
168
  Useful account commands:
94
169
 
@@ -156,7 +231,8 @@ The CLI can also print or install the RemoteDraw skill for coding agents:
156
231
 
157
232
  ```sh
158
233
  remotedraw agent --print-skill
159
- remotedraw agent --path ~/.codex/skills/remotedraw --force
234
+ remotedraw agent --path .agents/skills/remotedraw --force
235
+ remotedraw agent --path .claude/skills/remotedraw --force
160
236
  ```
161
237
 
162
238
  ## Command reference
@@ -164,6 +240,7 @@ remotedraw agent --path ~/.codex/skills/remotedraw --force
164
240
  ```text
165
241
  guide Choose an integration path and SDK.
166
242
  options Print setup choices and compatibility metadata.
243
+ language Choose the language of this CLI.
167
244
  login Authorize this computer through the dashboard.
168
245
  logout Revoke and remove this computer's CLI credential.
169
246
  whoami Show the signed-in RemoteDraw account.
package/dist/cli.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  import { type WizardDefinition, type WizardTerminal } from "./setup-wizard.js";
2
2
  import { type CloudRuntime } from "./cloud.js";
3
+ import { type UpdateRuntime } from "./update.js";
3
4
  export declare const CLI_VERSION: string;
5
+ export declare const REMOTEDRAW_SDK_RANGE = "^0.1.0";
6
+ export declare const REMOTEDRAW_CLI_RANGE = "^0.2.0";
4
7
  export type CliResult = {
5
8
  exitCode: number;
6
9
  stdout: string;
@@ -27,14 +30,16 @@ export type CliPrompter = {
27
30
  text: (options: TextPromptOptions) => Promise<string>;
28
31
  select: <T extends string>(options: SelectPromptOptions<T>) => Promise<T>;
29
32
  };
30
- export type CliRuntime = CloudRuntime & {
33
+ export type CliRuntime = CloudRuntime & UpdateRuntime & {
31
34
  cwd: string;
35
+ /** Absolute path of the running binary; drives update-command detection. */
36
+ binPath?: string;
32
37
  prompts?: CliPrompter;
33
38
  wizardTerminal?: WizardTerminal | undefined;
34
39
  };
35
- declare const targetChoices: readonly ["web", "desktop", "ios", "headless"];
36
- declare const senderChoices: readonly ["remotedraw-ios", "embedded-web", "own-ios", "headless"];
37
- declare const sdkChoices: readonly ["react", "svelte", "js", "swift", "headless"];
40
+ export declare const targetChoices: readonly ["web", "desktop", "ios", "headless"];
41
+ export declare const senderChoices: readonly ["remotedraw-ios", "embedded-web", "own-ios", "headless"];
42
+ export declare const sdkChoices: readonly ["react", "svelte", "js", "swift", "headless"];
38
43
  declare const presetChoices: readonly ["signature", "initials", "approval", "sketch", "photoMarkup", "pdfMarkup", "mapMarkup", "screenMarkup", "designReview", "pointer"];
39
44
  declare const packageManagerChoices: readonly ["npm", "pnpm", "yarn", "bun"];
40
45
  type TargetChoice = (typeof targetChoices)[number];
@@ -136,6 +141,12 @@ export declare function createSessionPayload(options: PayloadOptions): {
136
141
  label: string;
137
142
  };
138
143
  };
144
+ /**
145
+ * The skill a coding agent installs is the same file this repository
146
+ * documents. `docs/agents/remotedraw/SKILL.md` is the single source; the
147
+ * module below is generated from it by `bun run generate:skill`, and
148
+ * tests/agent-skill.test.ts fails if the two drift apart again.
149
+ */
139
150
  export declare function agentSkillMarkdown(): string;
140
151
  export {};
141
152
  //# sourceMappingURL=cli.d.ts.map
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAOA,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,cAAc,EAEpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EASL,KAAK,YAAY,EAElB,MAAM,YAAY,CAAC;AAMpB,eAAO,MAAM,WAAW,QAGT,CAAC;AAE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