ai-remote 0.4.3 → 0.4.5

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 CHANGED
@@ -7,53 +7,92 @@
7
7
 
8
8
  ## 🚀 Quick Start (CLI)
9
9
 
10
- Run immediately with `npx` (zero install):
10
+ Run immediately with `npx` (zero install). `open` names the machine once and
11
+ leaves a session running; every command after it drives that session, so none of
12
+ them repeats the host, the account or the password:
11
13
 
12
14
  ```bash
13
15
  # Connect and open a live supervision window:
14
16
  AI_REMOTE_PASSWORD=secret npx ai-remote open 192.168.1.50 -u Administrator
15
17
 
16
18
  # Take a screenshot:
17
- AI_REMOTE_PASSWORD=secret npx ai-remote shot 192.168.1.50 -u Administrator -o screen.png
19
+ npx ai-remote shot -o screen.png
18
20
 
19
21
  # Click or type on the remote desktop:
20
- npx ai-remote click 192.168.1.50 500,300
21
- npx ai-remote type 192.168.1.50 "notepad"
22
- npx ai-remote key 192.168.1.50 Enter
22
+ npx ai-remote click 500,300
23
+ npx ai-remote type "notepad"
24
+ npx ai-remote key Enter
23
25
 
24
26
  # Run commands in the remote terminal over SSH:
25
- npx ai-remote exec 192.168.1.50 "dir"
27
+ npx ai-remote exec "dir"
28
+
29
+ # Let it go when you are done -- nothing closes on its own:
30
+ npx ai-remote close
26
31
  ```
27
32
 
28
33
  ### CLI Commands
29
34
 
30
35
  ```
31
- ai-remote open <host[:port]> connect, show a window, and stay open
32
- ai-remote shot <host[:port]> screenshot the desktop
33
- ai-remote click <host[:port]> X,Y click, --button right|middle, --double
34
- ai-remote type <host[:port]> "text" type into whatever has focus
35
- ai-remote key <host[:port]> <Code> press keys, e.g. MetaLeft, ControlLeft+KeyA
36
- ai-remote exec <host[:port]> "cmd" run a command in the terminal (SSH)
37
- ai-remote shell <host[:port]> an interactive terminal
38
- ai-remote do <host[:port]> "steps" several actions in one go
39
- ai-remote view <host[:port]> open the window on a running session
40
- ai-remote view <host[:port]> --close close the window, session keeps running
41
- ai-remote status | list | close [<host>]
42
- ai-remote probe <host[:port]> is anything listening?
36
+ ai-remote open <host[:port]> connect, show a window, and stay open
37
+
38
+ ai-remote shot screenshot the desktop
39
+ ai-remote click X,Y click, --button right|middle, --double
40
+ ai-remote type "text" type into whatever has focus
41
+ ai-remote key <Code> press keys, e.g. MetaLeft, ControlLeft+KeyA
42
+ ai-remote exec "cmd" run a command in the terminal (SSH)
43
+ ai-remote shell an interactive terminal
44
+ ai-remote do "steps" several actions in one go
45
+ ai-remote view open the window on the session
46
+ ai-remote view --close close the window, session keeps running
47
+ ai-remote status what the session is doing
48
+ ai-remote list every session that is open
49
+ ai-remote close close it; --all closes every session
50
+ ai-remote probe [<host[:port]>] is anything listening?
51
+ ```
52
+
53
+ ### Sessions
54
+
55
+ The session opened last is the one the commands drive, and it lives until it is
56
+ closed -- including across terminals, so an agent and the person watching it
57
+ reach the same desktop. With more than one open, `--session NAME` picks between
58
+ them; a session answers to its name, its host, or `host:port`.
59
+
60
+ ```bash
61
+ npx ai-remote open 192.168.1.50 -u Administrator --session desk
62
+ npx ai-remote open 192.168.1.60 -u Administrator --session build
63
+
64
+ npx ai-remote list # * marks the one commands will use
65
+ npx ai-remote shot --session desk
66
+ npx ai-remote close --all
43
67
  ```
44
68
 
45
- ### Common Options
69
+ `probe` is the one command besides `open` that still takes an address, because
70
+ it answers whether a session could be opened at all; with no address it probes
71
+ the current session's host.
72
+
73
+ ### Options for `open`
46
74
 
47
75
  - `-u, --user NAME`: Account name on the host.
48
76
  - `-d, --domain NAME`: Windows domain or computer name.
77
+ - `--session NAME`: Name this session (default: `host_port`).
49
78
  - `--ssh-user NAME`: Account for the SSH terminal (defaults to `--user`).
50
79
  - `--ssh-port N`: SSH port (default: 22).
51
80
  - `-s, --security MODE`: `auto` | `nla` | `tls` | `rdp` (default: `auto`).
52
81
  - `-W, --width N` / `-H, --height N`: Desktop resolution (default: 1280x800).
53
- - `-o, --out FILE`: Screenshot output file path (default: `screen.png`).
82
+ - `--idle MINUTES`: Close an unused session (default: 0, never).
54
83
  - `--headless` / `--no-view`: Run headless without opening the viewer window.
84
+ - `--no-reuse`: A second session beside one that is already open.
85
+
86
+ ### Options for the rest
87
+
88
+ - `--session NAME`: Which session to drive (default: the one opened last).
89
+ - `-o, --out FILE`: Screenshot output file path (default: `screen.png`).
90
+ - `--max-edge N`: Shrink a screenshot to fit N.
55
91
  - `--json`: Output machine-readable JSON results on stdout.
56
92
 
93
+ The password comes from `AI_REMOTE_PASSWORD` (or `REMOTECTL_PASSWORD`). There is
94
+ no `--password` flag: a command line is visible to every process on the machine.
95
+
57
96
  ---
58
97
 
59
98
  ## 📦 Library Installation