@remotedraw/cli 0.1.3 → 0.2.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/LICENSE +21 -0
- package/README.md +56 -1
- package/dist/cli.d.ts +15 -39
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1020 -804
- package/dist/cloud.d.ts +13 -0
- package/dist/cloud.d.ts.map +1 -1
- package/dist/cloud.js +61 -14
- package/dist/errors.d.ts +16 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +13 -0
- package/dist/generated/agent-skill.d.ts +2 -0
- package/dist/generated/agent-skill.d.ts.map +1 -0
- package/dist/generated/agent-skill.js +4 -0
- package/dist/i18n.d.ts +74 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +178 -0
- package/dist/index.js +17 -1
- package/dist/locales/catalog.d.ts +21 -0
- package/dist/locales/catalog.d.ts.map +1 -0
- package/dist/locales/catalog.js +1 -0
- package/dist/locales/en.d.ts +414 -0
- package/dist/locales/en.d.ts.map +1 -0
- package/dist/locales/en.js +440 -0
- package/dist/locales/index.d.ts +430 -0
- package/dist/locales/index.d.ts.map +1 -0
- package/dist/locales/index.js +27 -0
- package/dist/locales/nl.d.ts +10 -0
- package/dist/locales/nl.d.ts.map +1 -0
- package/dist/locales/nl.js +432 -0
- package/dist/setup-wizard.d.ts +1 -1
- package/dist/setup-wizard.d.ts.map +1 -1
- package/dist/setup-wizard.js +50 -36
- package/dist/telemetry.d.ts +73 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +145 -0
- package/dist/update.d.ts.map +1 -1
- package/dist/update.js +8 -3
- package/package.json +11 -4
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:
|
|
@@ -178,7 +231,8 @@ The CLI can also print or install the RemoteDraw skill for coding agents:
|
|
|
178
231
|
|
|
179
232
|
```sh
|
|
180
233
|
remotedraw agent --print-skill
|
|
181
|
-
remotedraw agent --path
|
|
234
|
+
remotedraw agent --path .agents/skills/remotedraw --force
|
|
235
|
+
remotedraw agent --path .claude/skills/remotedraw --force
|
|
182
236
|
```
|
|
183
237
|
|
|
184
238
|
## Command reference
|
|
@@ -186,6 +240,7 @@ remotedraw agent --path ~/.codex/skills/remotedraw --force
|
|
|
186
240
|
```text
|
|
187
241
|
guide Choose an integration path and SDK.
|
|
188
242
|
options Print setup choices and compatibility metadata.
|
|
243
|
+
language Choose the language of this CLI.
|
|
189
244
|
login Authorize this computer through the dashboard.
|
|
190
245
|
logout Revoke and remove this computer's CLI credential.
|
|
191
246
|
whoami Show the signed-in RemoteDraw account.
|
package/dist/cli.d.ts
CHANGED
|
@@ -2,6 +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
7
|
export type CliResult = {
|
|
6
8
|
exitCode: number;
|
|
7
9
|
stdout: string;
|
|
@@ -35,10 +37,10 @@ export type CliRuntime = CloudRuntime & UpdateRuntime & {
|
|
|
35
37
|
prompts?: CliPrompter;
|
|
36
38
|
wizardTerminal?: WizardTerminal | undefined;
|
|
37
39
|
};
|
|
38
|
-
declare const targetChoices: readonly ["web", "desktop", "ios", "headless"];
|
|
39
|
-
declare const senderChoices: readonly ["remotedraw-ios", "embedded-web", "own-ios", "headless"];
|
|
40
|
-
declare const sdkChoices: readonly ["react", "svelte", "js", "swift", "headless"];
|
|
41
|
-
declare const presetChoices: readonly ["
|
|
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"];
|
|
43
|
+
declare const presetChoices: readonly ["approval", "sketch", "photoMarkup", "pdfMarkup", "mapMarkup", "screenMarkup", "designReview", "pointer"];
|
|
42
44
|
declare const packageManagerChoices: readonly ["npm", "pnpm", "yarn", "bun"];
|
|
43
45
|
type TargetChoice = (typeof targetChoices)[number];
|
|
44
46
|
type SenderChoice = (typeof senderChoices)[number];
|
|
@@ -72,35 +74,12 @@ type PayloadOptions = {
|
|
|
72
74
|
export declare function createSessionPayload(options: PayloadOptions): {
|
|
73
75
|
expiresInMs?: number;
|
|
74
76
|
externalId: string;
|
|
75
|
-
markupPreset: "
|
|
77
|
+
markupPreset: "approval" | "sketch" | "photoMarkup" | "pdfMarkup" | "mapMarkup" | "screenMarkup" | "designReview" | "pointer";
|
|
76
78
|
target: {
|
|
79
|
+
kind: string;
|
|
80
|
+
label: string;
|
|
77
81
|
metadata: {
|
|
78
82
|
descriptor: {
|
|
79
|
-
version: number;
|
|
80
|
-
privacy: string;
|
|
81
|
-
surfaceRole: string;
|
|
82
|
-
inputIntent: "signature" | "initials";
|
|
83
|
-
label: string;
|
|
84
|
-
components: {
|
|
85
|
-
id: "signature" | "initials";
|
|
86
|
-
role: string;
|
|
87
|
-
inputIntent: "signature" | "initials";
|
|
88
|
-
required: boolean;
|
|
89
|
-
bounds: {
|
|
90
|
-
minX: number;
|
|
91
|
-
minY: number;
|
|
92
|
-
maxX: number;
|
|
93
|
-
maxY: number;
|
|
94
|
-
};
|
|
95
|
-
}[];
|
|
96
|
-
phoneHints: {
|
|
97
|
-
preferredLayout: string;
|
|
98
|
-
preferredTool: string;
|
|
99
|
-
primaryActionLabel: string;
|
|
100
|
-
showUndo: boolean;
|
|
101
|
-
showClear: boolean;
|
|
102
|
-
};
|
|
103
|
-
} | {
|
|
104
83
|
version: number;
|
|
105
84
|
privacy: string;
|
|
106
85
|
surfaceRole: string;
|
|
@@ -113,7 +92,6 @@ export declare function createSessionPayload(options: PayloadOptions): {
|
|
|
113
92
|
showUndo?: never;
|
|
114
93
|
showClear?: never;
|
|
115
94
|
};
|
|
116
|
-
components?: never;
|
|
117
95
|
} | {
|
|
118
96
|
version: number;
|
|
119
97
|
privacy: string;
|
|
@@ -127,18 +105,16 @@ export declare function createSessionPayload(options: PayloadOptions): {
|
|
|
127
105
|
showUndo: boolean;
|
|
128
106
|
showClear: boolean;
|
|
129
107
|
};
|
|
130
|
-
components?: never;
|
|
131
108
|
};
|
|
132
109
|
};
|
|
133
|
-
inputMapping?: "surface";
|
|
134
|
-
coordinateSpace?: {
|
|
135
|
-
width: number;
|
|
136
|
-
height: number;
|
|
137
|
-
};
|
|
138
|
-
kind: string;
|
|
139
|
-
label: string;
|
|
140
110
|
};
|
|
141
111
|
};
|
|
112
|
+
/**
|
|
113
|
+
* The skill a coding agent installs is the same file this repository
|
|
114
|
+
* documents. `docs/agents/remotedraw/SKILL.md` is the single source; the
|
|
115
|
+
* module below is generated from it by `bun run generate:skill`, and
|
|
116
|
+
* tests/agent-skill.test.ts fails if the two drift apart again.
|
|
117
|
+
*/
|
|
142
118
|
export declare function agentSkillMarkdown(): string;
|
|
143
119
|
export {};
|
|
144
120
|
//# 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":"AAQA,OAAO,EAIL,KAAK,gBAAgB,EAGrB,KAAK,cAAc,EAEpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,
|
|
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;A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