ai-remote 0.4.12 → 0.4.14
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/SKILL.md +55 -7
- package/dist/cli.mjs +262 -35
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -117,7 +117,9 @@ npx ai-remote exec "hostname"
|
|
|
117
117
|
npx ai-remote exec "dir C:\\Users"
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
`exec` reuses the session's own account and password, so it needs no flags
|
|
120
|
+
`exec` reuses the session's own account and password, so it needs no flags —
|
|
121
|
+
give `open` `--ssh-user NAME` or `--ssh-port N` only when the terminal signs in
|
|
122
|
+
as somebody else, or on a port other than 22. Its
|
|
121
123
|
stdout is the command's output, and it exits 0 when the command did and 1 when
|
|
122
124
|
it did not — the command's own status is in `exitStatus` under `--json` if you
|
|
123
125
|
need the number. `ai-remote shell` opens an interactive terminal (Ctrl-] to
|
|
@@ -141,7 +143,8 @@ npx ai-remote click 640,400
|
|
|
141
143
|
|
|
142
144
|
A session that is already open gets a screen with `ai-remote vnc`, which takes
|
|
143
145
|
no host because the session already knows the machine. That is the way to give a
|
|
144
|
-
terminal session a desktop without closing it
|
|
146
|
+
terminal session a desktop without closing it; `--vnc-port N` if the screen is
|
|
147
|
+
not on 5900.
|
|
145
148
|
|
|
146
149
|
## A host with no desktop
|
|
147
150
|
|
|
@@ -168,6 +171,35 @@ variable at all. `-i FILE` names a key instead, and repeats. A key with a
|
|
|
168
171
|
passphrase is never read off disk: `ssh-add` it, and it is offered from the
|
|
169
172
|
agent.
|
|
170
173
|
|
|
174
|
+
## Passwords, and not typing them twice
|
|
175
|
+
|
|
176
|
+
A desktop always wants one; a terminal usually does not, because of the keys
|
|
177
|
+
above. Three places are tried, in this order:
|
|
178
|
+
|
|
179
|
+
1. `AI_REMOTE_PASSWORD` in this shell, or `REMOTECTL_PASSWORD` under the other
|
|
180
|
+
name.
|
|
181
|
+
2. Whatever `--save` kept for that machine.
|
|
182
|
+
3. You, at the terminal — only when one is attached, and only after the first
|
|
183
|
+
two have come up empty.
|
|
184
|
+
|
|
185
|
+
This shell wins, so a password exported deliberately is never quietly overridden
|
|
186
|
+
by one saved months ago. There is no `--password` flag and there will not be: a
|
|
187
|
+
command line is visible to every process on the machine.
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
npx ai-remote open 192.168.1.20 -u owner --save # keep it, once it has worked
|
|
191
|
+
npx ai-remote saved # what is kept, and where
|
|
192
|
+
npx ai-remote forget 192.168.1.20 # one machine; --all for every one
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
`--save` writes to the system keystore — the login keychain on macOS, the desktop
|
|
196
|
+
keyring on Linux — and where there is neither, to an encrypted file under
|
|
197
|
+
`~/.config/ai-remote`; the command says which it got. That file is proof against
|
|
198
|
+
a glance, not against somebody who can read your home directory.
|
|
199
|
+
|
|
200
|
+
`--no-prompt` (or `--batch`) turns a missing password into an immediate failure
|
|
201
|
+
instead of a question. Use it in anything unattended, where a prompt is a hang.
|
|
202
|
+
|
|
171
203
|
## Sessions
|
|
172
204
|
|
|
173
205
|
The session opened last is the one commands drive. With several open, name them:
|
|
@@ -181,9 +213,14 @@ npx ai-remote shot --session desk # a name, a host, or host:port
|
|
|
181
213
|
npx ai-remote close --all # or `close` for the current one
|
|
182
214
|
```
|
|
183
215
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
216
|
+
`open` on a machine that already has a session attaches to that one instead of
|
|
217
|
+
building a second; `--no-reuse` is how you get two on purpose.
|
|
218
|
+
|
|
219
|
+
Nothing times out and nothing closes itself by default — a session that an agent
|
|
220
|
+
left mid-task is a feature, not a leak — so **close what you open** when the task
|
|
221
|
+
is done, or tell the user it is still running. `--idle MINUTES` at `open` time
|
|
222
|
+
sets one to close itself after that long unused, for when nobody will be back to
|
|
223
|
+
do it.
|
|
187
224
|
|
|
188
225
|
## Watching
|
|
189
226
|
|
|
@@ -201,8 +238,14 @@ fresh `shot` rather than trusting one from before you paused.
|
|
|
201
238
|
toolbar, and the gate is enforced in the session rather than in the page.
|
|
202
239
|
- `--headless` (or `--no-view`) on a server or in CI. The framebuffer is the
|
|
203
240
|
authority either way, so a session nobody watches is not a lesser session.
|
|
241
|
+
- `--fullscreen` fills the display and makes RDP use the current monitor's
|
|
242
|
+
logical resolution. Add `--side-panel` to `open` to start with a fixed-width
|
|
243
|
+
SSH terminal docked on the right; its 420 pixels are removed from RDP width.
|
|
204
244
|
- `ai-remote view` adds a window to a headless session later (`view --watch-only`
|
|
205
245
|
for an observer one); `view --close` takes it away without ending the session.
|
|
246
|
+
- `--view-port N` moves the window's local server off 7373, which matters only
|
|
247
|
+
when two sessions want it at once. `--no-open` keeps the window but does not
|
|
248
|
+
launch a browser at it.
|
|
206
249
|
|
|
207
250
|
## Reading results
|
|
208
251
|
|
|
@@ -239,6 +282,9 @@ the other half of the answer is a key: `ssh-add ~/.ssh/id_ed25519`, or
|
|
|
239
282
|
`-i FILE`. The session's log names every key it offered and every key it passed
|
|
240
283
|
over, and why.
|
|
241
284
|
|
|
285
|
+
`-s nla | tls | rdp` pins the RDP security layer when `auto` picks one the host
|
|
286
|
+
will not finish; it makes no difference over VNC or SSH.
|
|
287
|
+
|
|
242
288
|
**Unreachable (10).** — `ai-remote probe <host>` is the one command besides
|
|
243
289
|
`open` that still takes an address: it answers whether anything is listening
|
|
244
290
|
before you spend a handshake finding out.
|
|
@@ -257,10 +303,11 @@ what `status` reports rather than what you asked for.
|
|
|
257
303
|
|
|
258
304
|
```bash
|
|
259
305
|
export AI_REMOTE_PASSWORD=...
|
|
260
|
-
npx ai-remote open HOST[:PORT] -u USER [-d DOMAIN] [--session NAME] [--
|
|
306
|
+
npx ai-remote open HOST[:PORT] -u USER [-d DOMAIN] [--session NAME] [--fullscreen] [--side-panel]
|
|
307
|
+
[-W 1920 -H 1080] [-s auto|nla|tls|rdp] [--save] [--idle N]
|
|
261
308
|
npx ai-remote open HOST --ssh -u USER [-i ~/.ssh/id_ed25519] # a terminal, no desktop
|
|
262
309
|
npx ai-remote open HOST --vnc -u USER # a screen over VNC
|
|
263
|
-
npx ai-remote vnc
|
|
310
|
+
npx ai-remote vnc [--vnc-port N] # ...or add one to this session
|
|
264
311
|
npx ai-remote shot [-o FILE] [--max-edge N] [--json]
|
|
265
312
|
npx ai-remote click X,Y [--button right|middle] [--double]
|
|
266
313
|
npx ai-remote type "text"
|
|
@@ -269,6 +316,7 @@ npx ai-remote do "key MetaLeft; wait 800; type notepad; shot s.png"
|
|
|
269
316
|
npx ai-remote exec "command"
|
|
270
317
|
npx ai-remote view [--watch-only] [--close]
|
|
271
318
|
npx ai-remote status | list | close [--all]
|
|
319
|
+
npx ai-remote saved | forget [HOST[:PORT]] [--all]
|
|
272
320
|
npx ai-remote probe [HOST[:PORT]]
|
|
273
321
|
```
|
|
274
322
|
|