@remotedraw/cli 0.1.1 → 0.1.2
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 +167 -49
- package/package.json +3 -8
package/README.md
CHANGED
|
@@ -1,53 +1,114 @@
|
|
|
1
|
-
#
|
|
1
|
+
# RemoteDraw CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Set up RemoteDraw in a new or existing app from your terminal. The CLI guides
|
|
4
|
+
you through choosing an integration, signs in through the RemoteDraw dashboard,
|
|
5
|
+
creates the matching project and development API key, and writes starter code
|
|
6
|
+
for your chosen stack.
|
|
4
7
|
|
|
5
|
-
##
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
RemoteDraw requires Node.js 20 or newer.
|
|
6
11
|
|
|
7
12
|
```sh
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
bun run cli -- login
|
|
11
|
-
bun run cli -- whoami
|
|
12
|
-
bun run cli
|
|
13
|
-
bun run cli -- new
|
|
14
|
-
bun run cli -- new --app-name MijnApp --target web --sender remotedraw-ios --sdk react
|
|
15
|
-
bun run cli -- init --target web --sender embedded-web --sdk react
|
|
16
|
-
bun run cli -- doctor
|
|
17
|
-
bun run cli -- agent --print-skill
|
|
13
|
+
npm install --global @remotedraw/cli
|
|
14
|
+
remotedraw --version
|
|
18
15
|
```
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
binary, for example `npx @remotedraw/cli@latest guide`.
|
|
17
|
+
You can also run it without installing globally:
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
same deterministic help as `remotedraw --help` and never waits for input.
|
|
19
|
+
```sh
|
|
20
|
+
npx @remotedraw/cli@latest
|
|
21
|
+
```
|
|
27
22
|
|
|
28
|
-
|
|
29
|
-
interactive prompts. Both routes use the same project validation, templates,
|
|
30
|
-
and file writer.
|
|
23
|
+
## Start here
|
|
31
24
|
|
|
32
|
-
|
|
33
|
-
the wizard:
|
|
25
|
+
Run the guided setup:
|
|
34
26
|
|
|
35
27
|
```sh
|
|
36
|
-
remotedraw
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
remotedraw
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
On the first run, the CLI opens `dashboard.remotedraw.com` and displays a
|
|
32
|
+
short confirmation code. Approve that code in the browser, then return to the
|
|
33
|
+
terminal. The setup wizard will help you choose a target, sender experience,
|
|
34
|
+
SDK, and starter preset before it writes anything.
|
|
35
|
+
|
|
36
|
+
To see the available integration paths without starting the wizard:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
remotedraw guide
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Create a new app
|
|
43
|
+
|
|
44
|
+
Start the interactive project creator:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
remotedraw new
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Or provide the setup choices directly:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
remotedraw new \
|
|
54
|
+
--app-name MyApp \
|
|
55
|
+
--target web \
|
|
56
|
+
--sender remotedraw-ios \
|
|
57
|
+
--sdk react
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Add RemoteDraw to an existing app
|
|
61
|
+
|
|
62
|
+
Run `init` from the project you want to update:
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
cd my-existing-app
|
|
66
|
+
remotedraw init
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
You can also choose the integration explicitly:
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
remotedraw init \
|
|
73
|
+
--target web \
|
|
74
|
+
--sender embedded-web \
|
|
75
|
+
--sdk react
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Before writing, the interactive flow shows a review and asks for explicit
|
|
79
|
+
confirmation. Existing files are protected unless you intentionally pass
|
|
80
|
+
`--force`.
|
|
81
|
+
|
|
82
|
+
## Check an integration
|
|
83
|
+
|
|
84
|
+
Use `doctor` after setup or when troubleshooting:
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
remotedraw doctor
|
|
41
88
|
```
|
|
42
89
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
90
|
+
It checks the project configuration, installed packages, environment values,
|
|
91
|
+
and—when credentials are available—the RemoteDraw API connection.
|
|
92
|
+
|
|
93
|
+
Useful account commands:
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
remotedraw login
|
|
97
|
+
remotedraw whoami
|
|
98
|
+
remotedraw logout
|
|
99
|
+
```
|
|
47
100
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
101
|
+
## Generated files and credentials
|
|
102
|
+
|
|
103
|
+
Depending on your selected integration, `new` and `init` create or update:
|
|
104
|
+
|
|
105
|
+
- `remotedraw.config.json`
|
|
106
|
+
- `.env.example`
|
|
107
|
+
- `.env.local`
|
|
108
|
+
- starter files under `src/remotedraw`
|
|
109
|
+
|
|
110
|
+
The generated `.env.local` contains the project runtime values and should stay
|
|
111
|
+
gitignored:
|
|
51
112
|
|
|
52
113
|
```dotenv
|
|
53
114
|
REMOTEDRAW_API_BASE_URL=https://api.remotedraw.com
|
|
@@ -55,25 +116,82 @@ REMOTEDRAW_PROJECT_ID=...
|
|
|
55
116
|
REMOTEDRAW_API_KEY=rd_sk_...
|
|
56
117
|
```
|
|
57
118
|
|
|
58
|
-
The account-level `rd_cli_...` credential is
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
`remotedraw logout` to revoke it.
|
|
62
|
-
|
|
119
|
+
The account-level `rd_cli_...` credential is stored separately with restricted
|
|
120
|
+
file permissions in `$XDG_CONFIG_HOME/remotedraw/config.json` or
|
|
121
|
+
`~/.config/remotedraw/config.json`. It is never copied into a project. Run
|
|
122
|
+
`remotedraw logout` to revoke and remove it.
|
|
123
|
+
|
|
124
|
+
Use `--offline` when you only want local scaffolding and do not want to create a
|
|
125
|
+
RemoteDraw cloud project.
|
|
126
|
+
|
|
127
|
+
## Automation and coding agents
|
|
128
|
+
|
|
129
|
+
CI and coding agents should use the machine-readable, non-interactive flow:
|
|
130
|
+
|
|
131
|
+
```sh
|
|
132
|
+
remotedraw options --format json
|
|
133
|
+
|
|
134
|
+
remotedraw new \
|
|
135
|
+
--non-interactive \
|
|
136
|
+
--offline \
|
|
137
|
+
--dry-run \
|
|
138
|
+
--format json \
|
|
139
|
+
--app-name AgentDesk \
|
|
140
|
+
--target web \
|
|
141
|
+
--sender remotedraw-ios \
|
|
142
|
+
--sdk react \
|
|
143
|
+
--preset sketch \
|
|
144
|
+
--package-manager npm
|
|
145
|
+
|
|
146
|
+
remotedraw doctor --format json
|
|
147
|
+
```
|
|
63
148
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
149
|
+
`--non-interactive` prevents prompts and browser authorization. JSON dry runs
|
|
150
|
+
return the resolved plan, defaults, files, warnings, cloud mode, and suggested
|
|
151
|
+
next commands. Inspect the result before rerunning without `--dry-run`.
|
|
67
152
|
|
|
68
|
-
|
|
153
|
+
For authenticated CI provisioning, provide `REMOTEDRAW_CLI_TOKEN` as a secret.
|
|
69
154
|
|
|
70
|
-
|
|
155
|
+
The CLI can also print or install the RemoteDraw skill for coding agents:
|
|
71
156
|
|
|
72
157
|
```sh
|
|
73
158
|
remotedraw agent --print-skill
|
|
74
159
|
remotedraw agent --path ~/.codex/skills/remotedraw --force
|
|
75
160
|
```
|
|
76
161
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
162
|
+
## Command reference
|
|
163
|
+
|
|
164
|
+
```text
|
|
165
|
+
guide Choose an integration path and SDK.
|
|
166
|
+
options Print setup choices and compatibility metadata.
|
|
167
|
+
login Authorize this computer through the dashboard.
|
|
168
|
+
logout Revoke and remove this computer's CLI credential.
|
|
169
|
+
whoami Show the signed-in RemoteDraw account.
|
|
170
|
+
new Create a new app with RemoteDraw starter code.
|
|
171
|
+
init Add RemoteDraw starter code to an existing project.
|
|
172
|
+
dev Print the local sandbox workflow for an integration.
|
|
173
|
+
doctor Check project config, packages, and environment variables.
|
|
174
|
+
create-input Create or print a test input request payload.
|
|
175
|
+
examples List or install example projects.
|
|
176
|
+
agent Print or install the RemoteDraw agent skill.
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Run `remotedraw <command> --help` for command-specific options.
|
|
180
|
+
|
|
181
|
+
## Links
|
|
182
|
+
|
|
183
|
+
- [RemoteDraw documentation](https://docs.remotedraw.com)
|
|
184
|
+
- [API dashboard](https://dashboard.remotedraw.com)
|
|
185
|
+
- [Support](mailto:support@remotedraw.com)
|
|
186
|
+
|
|
187
|
+
## Contributing
|
|
188
|
+
|
|
189
|
+
This section is for contributors working inside the RemoteDraw repository:
|
|
190
|
+
|
|
191
|
+
```sh
|
|
192
|
+
bun install
|
|
193
|
+
bun run cli -- --help
|
|
194
|
+
cd packages/cli
|
|
195
|
+
bun run verify:publish
|
|
196
|
+
npm pack --dry-run
|
|
197
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotedraw/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Command-line tools for creating and inspecting RemoteDraw integrations.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -13,15 +13,10 @@
|
|
|
13
13
|
"engines": {
|
|
14
14
|
"node": ">=20"
|
|
15
15
|
},
|
|
16
|
-
"repository": {
|
|
17
|
-
"type": "git",
|
|
18
|
-
"url": "git+https://github.com/AxioSOzo/RemoteDraw.git",
|
|
19
|
-
"directory": "packages/cli"
|
|
20
|
-
},
|
|
21
16
|
"bugs": {
|
|
22
|
-
"
|
|
17
|
+
"email": "support@remotedraw.com"
|
|
23
18
|
},
|
|
24
|
-
"homepage": "https://
|
|
19
|
+
"homepage": "https://docs.remotedraw.com",
|
|
25
20
|
"keywords": [
|
|
26
21
|
"remotedraw",
|
|
27
22
|
"drawing",
|