ragent-cli 1.1.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 +139 -0
- package/dist/index.js +2206 -0
- package/package.json +60 -0
package/README.md
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# ragent-cli
|
|
2
|
+
|
|
3
|
+
CLI agent for [rAgent Live](https://ragent.live) — browser-first terminal control plane for AI coding agents.
|
|
4
|
+
|
|
5
|
+
Installs a lightweight connector on your Linux host that streams terminal sessions to the rAgent Live portal via WebSocket.
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
- **Node.js** >= 20
|
|
10
|
+
- **Linux** (systemd recommended, pidfile fallback available)
|
|
11
|
+
- **tmux** (optional, for multi-session support)
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g ragent-cli
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Quick Start
|
|
20
|
+
|
|
21
|
+
1. In the rAgent Live portal, click **Setup Host** to generate an enrollment token.
|
|
22
|
+
2. On your Linux host:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
ragent enroll \
|
|
26
|
+
--portal "https://your-portal.example.com" \
|
|
27
|
+
--token "your-enrollment-token" \
|
|
28
|
+
--as-service
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
This enrolls the host, installs a background service, and starts streaming.
|
|
32
|
+
|
|
33
|
+
## Commands
|
|
34
|
+
|
|
35
|
+
### `ragent enroll`
|
|
36
|
+
|
|
37
|
+
Enroll a host using a short-lived enrollment token from the portal.
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
ragent enroll --token <token> [options]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
| Option | Description |
|
|
44
|
+
|--------|-------------|
|
|
45
|
+
| `--token <token>` | **(required)** Enrollment token from portal |
|
|
46
|
+
| `--portal <url>` | Portal base URL (default: `http://localhost:3000`) |
|
|
47
|
+
| `-i, --id <id>` | Host ID (auto-detected from hostname) |
|
|
48
|
+
| `-n, --name <name>` | Host display name (auto-detected from hostname) |
|
|
49
|
+
| `-c, --command <command>` | Shell command to run (default: `bash`) |
|
|
50
|
+
| `--as-service` | Install and start background service after enrollment |
|
|
51
|
+
| `--no-run` | Enroll only; do not start the connector |
|
|
52
|
+
|
|
53
|
+
### `ragent run`
|
|
54
|
+
|
|
55
|
+
Run the connector using saved credentials.
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
ragent run [options]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
| Option | Description |
|
|
62
|
+
|--------|-------------|
|
|
63
|
+
| `--portal <url>` | Portal base URL |
|
|
64
|
+
| `--agent-token <token>` | Agent token (uses saved token by default) |
|
|
65
|
+
| `-i, --id <id>` | Host ID |
|
|
66
|
+
| `-n, --name <name>` | Host name |
|
|
67
|
+
| `-c, --command <command>` | Shell command to run |
|
|
68
|
+
|
|
69
|
+
### `ragent service`
|
|
70
|
+
|
|
71
|
+
Manage the background connector service.
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
ragent service install [--start] [--no-enable]
|
|
75
|
+
ragent service start
|
|
76
|
+
ragent service stop
|
|
77
|
+
ragent service restart
|
|
78
|
+
ragent service status
|
|
79
|
+
ragent service logs [-n <lines>] [-f]
|
|
80
|
+
ragent service uninstall
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Uses systemd user units when available, with a pidfile-based fallback.
|
|
84
|
+
|
|
85
|
+
### `ragent doctor`
|
|
86
|
+
|
|
87
|
+
Run environment and connectivity checks.
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
ragent doctor [--portal <url>] [--fix]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Checks: platform, Node.js version, tmux, portal reachability. Use `--fix` to interactively install missing dependencies.
|
|
94
|
+
|
|
95
|
+
### `ragent update`
|
|
96
|
+
|
|
97
|
+
Update the CLI from npm.
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
ragent update [--check]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Use `--check` to see if an update is available without installing.
|
|
104
|
+
|
|
105
|
+
### `ragent sessions list`
|
|
106
|
+
|
|
107
|
+
List tmux sessions, windows, and panes on this host.
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
ragent sessions list
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Configuration
|
|
114
|
+
|
|
115
|
+
Config is stored at `~/.config/ragent/config.json`. The `enroll` command creates this automatically.
|
|
116
|
+
|
|
117
|
+
## Environment Variables
|
|
118
|
+
|
|
119
|
+
| Variable | Description |
|
|
120
|
+
|----------|-------------|
|
|
121
|
+
| `RAGENT_PORTAL` | Default portal URL |
|
|
122
|
+
| `RAGENT_NO_ART` | Set to `true` to disable ASCII art banners |
|
|
123
|
+
| `RAGENT_DISABLE_UPDATE_CHECK` | Set to `true` to skip update checks |
|
|
124
|
+
| `NO_COLOR` | Set to `1` to disable ANSI colors |
|
|
125
|
+
|
|
126
|
+
## Development
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
cd cli
|
|
130
|
+
npm install
|
|
131
|
+
npm run build # Build with tsup
|
|
132
|
+
npm run typecheck # Type check with tsc
|
|
133
|
+
npm test # Run vitest tests
|
|
134
|
+
npm run dev # Watch mode
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## License
|
|
138
|
+
|
|
139
|
+
[MIT](../LICENSE)
|