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 +59 -20
- package/dist/cli.mjs +311 -130
- package/dist/index.js +1 -1
- package/dist/{protocols/index.d.ts → protocols.d.ts} +2 -0
- package/dist/protocols.js +24 -0
- package/package.json +15 -10
- package/dist/protocols/index.js +0 -3
- package/dist/protocols/ssh/session.d.ts +0 -66
- package/dist/protocols/ssh/session.js +0 -17
- package/dist/protocols/ssh/terminal.d.ts +0 -46
- package/dist/protocols/ssh/terminal.js +0 -6
- package/dist/protocols/types.d.ts +0 -127
- package/dist/protocols/types.js +0 -0
- package/dist/shared/connection.d.ts +0 -81
- package/dist/shared/connection.js +0 -1
- package/dist/shared/device.d.ts +0 -26
- package/dist/shared/device.js +0 -0
- package/dist/shared/hosts.d.ts +0 -63
- package/dist/shared/hosts.js +0 -1
- package/dist/shared/icons.d.ts +0 -46
- package/dist/shared/icons.js +0 -1
- package/dist/shared/protocol.d.ts +0 -28
- package/dist/shared/protocol.js +0 -1
- package/dist/shared/signals.d.ts +0 -37
- package/dist/shared/signals.js +0 -1
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
|
-
|
|
19
|
+
npx ai-remote shot -o screen.png
|
|
18
20
|
|
|
19
21
|
# Click or type on the remote desktop:
|
|
20
|
-
npx ai-remote click
|
|
21
|
-
npx ai-remote type
|
|
22
|
-
npx ai-remote key
|
|
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
|
|
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
|
|
32
|
-
|
|
33
|
-
ai-remote
|
|
34
|
-
ai-remote
|
|
35
|
-
ai-remote
|
|
36
|
-
ai-remote
|
|
37
|
-
ai-remote
|
|
38
|
-
ai-remote
|
|
39
|
-
ai-remote
|
|
40
|
-
ai-remote view
|
|
41
|
-
ai-remote
|
|
42
|
-
ai-remote
|
|
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
|
-
|
|
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
|
-
-
|
|
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
|