ai-remote 0.4.13 → 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.
Files changed (3) hide show
  1. package/SKILL.md +51 -6
  2. package/dist/cli.mjs +49 -10
  3. 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. Its
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
- Nothing times out and nothing closes itself a session that an agent left
185
- mid-task is a feature, not a leak — so **close what you open** when the task is
186
- done, or tell the user it is still running.
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
 
@@ -206,6 +243,9 @@ fresh `shot` rather than trusting one from before you paused.
206
243
  SSH terminal docked on the right; its 420 pixels are removed from RDP width.
207
244
  - `ai-remote view` adds a window to a headless session later (`view --watch-only`
208
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.
209
249
 
210
250
  ## Reading results
211
251
 
@@ -242,6 +282,9 @@ the other half of the answer is a key: `ssh-add ~/.ssh/id_ed25519`, or
242
282
  `-i FILE`. The session's log names every key it offered and every key it passed
243
283
  over, and why.
244
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
+
245
288
  **Unreachable (10).** — `ai-remote probe <host>` is the one command besides
246
289
  `open` that still takes an address: it answers whether anything is listening
247
290
  before you spend a handshake finding out.
@@ -261,9 +304,10 @@ what `status` reports rather than what you asked for.
261
304
  ```bash
262
305
  export AI_REMOTE_PASSWORD=...
263
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]
264
308
  npx ai-remote open HOST --ssh -u USER [-i ~/.ssh/id_ed25519] # a terminal, no desktop
265
309
  npx ai-remote open HOST --vnc -u USER # a screen over VNC
266
- npx ai-remote vnc # ...or add one to this session
310
+ npx ai-remote vnc [--vnc-port N] # ...or add one to this session
267
311
  npx ai-remote shot [-o FILE] [--max-edge N] [--json]
268
312
  npx ai-remote click X,Y [--button right|middle] [--double]
269
313
  npx ai-remote type "text"
@@ -272,6 +316,7 @@ npx ai-remote do "key MetaLeft; wait 800; type notepad; shot s.png"
272
316
  npx ai-remote exec "command"
273
317
  npx ai-remote view [--watch-only] [--close]
274
318
  npx ai-remote status | list | close [--all]
319
+ npx ai-remote saved | forget [HOST[:PORT]] [--all]
275
320
  npx ai-remote probe [HOST[:PORT]]
276
321
  ```
277
322