cli-remote-agent 1.0.0

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 ADDED
@@ -0,0 +1,69 @@
1
+ # cli-remote-agent
2
+
3
+ The **agent** for [Claude Remote Controller](https://github.com/Arose-Niazi/claude-remote-controller). Install it on any machine you want to reach from the CRC web app. It connects out to your self-hosted CRC server and exposes:
4
+
5
+ - a full terminal (via `node-pty`)
6
+ - a file explorer + file downloads
7
+ - a bridge to your local Claude Code sessions, transcripts, and notify hooks
8
+
9
+ > **Security note:** running this agent grants the owner of the connected CRC account a **remote shell on this machine** under your user account. Only enroll it against a server you control, and keep the agent secret private.
10
+
11
+ ## Prerequisites
12
+
13
+ - **Node.js >= 20**
14
+ - Native build tools for `node-pty` (only needed if a prebuilt binary isn't available for your platform):
15
+ - **macOS:** `xcode-select --install`
16
+ - **Debian/Ubuntu:** `sudo apt-get install -y python3 make g++`
17
+ - **Windows:** usually ships prebuilt — no extra tooling required
18
+
19
+ ## Install
20
+
21
+ ```bash
22
+ npm i -g cli-remote-agent
23
+ ```
24
+
25
+ ## Enroll (first-run setup)
26
+
27
+ In the CRC web app, open the **Add agent** dialog to get an enrollment token, then run:
28
+
29
+ ```bash
30
+ crc-agent setup --token <token from the web Add-agent dialog>
31
+ ```
32
+
33
+ Prefer to enter details by hand? Run `crc-agent setup` with no arguments for interactive prompts (server URL, agent ID, secret). You can also set `CRC_SERVER_URL`, `CRC_AGENT_ID`, and `CRC_SECRET` in the environment to skip the prompts.
34
+
35
+ ## Run
36
+
37
+ ```bash
38
+ crc-agent
39
+ ```
40
+
41
+ The agent connects to your server and reconnects automatically. If you run `crc-agent` before enrolling, it prints:
42
+
43
+ ```
44
+ No agent configured. Run: crc-agent setup
45
+ ```
46
+
47
+ ## Configuration
48
+
49
+ Setup writes `~/.crc-agent/config.json`:
50
+
51
+ ```json
52
+ {
53
+ "agentId": "my-machine",
54
+ "serverUrl": "wss://crc.example.com",
55
+ "secret": "…",
56
+ "shell": "auto"
57
+ }
58
+ ```
59
+
60
+ You can edit this file directly; restart the agent to apply changes.
61
+
62
+ ## Run at startup (optional)
63
+
64
+ - **Windows:** `crc-agent` ships helper scripts to register a logon startup entry (`npm run service:install` from the package, or the equivalent in your process manager).
65
+ - **macOS/Linux:** use your preferred supervisor (`launchd`, `systemd --user`, `pm2`, etc.) to keep `crc-agent` running.
66
+
67
+ ## License
68
+
69
+ MIT