@runloop/rl-cli 0.4.0 → 0.9.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 +73 -106
- package/dist/cli.js +4 -416
- package/dist/commands/blueprint/list.js +2 -1
- package/dist/commands/devbox/list.js +5 -1
- package/dist/commands/snapshot/list.js +47 -6
- package/dist/components/Breadcrumb.js +8 -8
- package/dist/components/DevboxCreatePage.js +2 -2
- package/dist/components/DevboxDetailPage.js +2 -1
- package/dist/components/MainMenu.js +13 -2
- package/dist/components/StateHistory.js +80 -0
- package/dist/components/UpdateNotification.js +3 -44
- package/dist/hooks/useUpdateCheck.js +54 -0
- package/dist/mcp/server.js +1 -1
- package/dist/screens/DevboxCreateScreen.js +4 -4
- package/dist/utils/client.js +1 -1
- package/dist/utils/commands.js +408 -0
- package/dist/utils/config.js +21 -0
- package/dist/utils/exec.js +22 -0
- package/dist/utils/theme.js +1 -1
- package/package.json +21 -8
- package/dist/commands/auth.js +0 -29
- package/dist/commands/blueprint/preview.js +0 -45
- package/dist/commands/config.js +0 -118
- package/dist/commands/create.js +0 -42
- package/dist/commands/delete.js +0 -34
- package/dist/commands/exec.js +0 -35
- package/dist/commands/list.js +0 -59
- package/dist/commands/upload.js +0 -40
- package/dist/components/Table.example.js +0 -85
- package/dist/screens/LogsSessionScreen.js +0 -49
- package/dist/utils/CommandExecutor.js +0 -131
- package/dist/utils/memoryMonitor.js +0 -85
- package/dist/utils/process.js +0 -106
- package/dist/utils/versionCheck.js +0 -53
package/README.md
CHANGED
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
# Runloop CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@runloop/rl-cli)
|
|
4
|
+
[](https://github.com/runloopai/rl-cli/actions/workflows/ci.yml)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
A beautiful CLI for managing Runloop built with Ink and TypeScript. Use it as an **interactive command-line application** with rich UI components, or as a **traditional CLI** for scripting and automation.
|
|
8
|
+
|
|
9
|
+
## Quick Example
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Interactive mode - launches a beautiful UI menu
|
|
13
|
+
rli
|
|
14
|
+
|
|
15
|
+
# Traditional CLI mode - perfect for scripts
|
|
16
|
+
rli devbox list # Outputs JSON/text
|
|
17
|
+
rli devbox create --name my-devbox
|
|
18
|
+
rli devbox exec <devbox-id> echo "Hello World"
|
|
19
|
+
rli devbox delete <devbox-id>
|
|
20
|
+
```
|
|
4
21
|
|
|
5
22
|
## Features
|
|
6
23
|
|
|
7
|
-
- 🎨 Beautiful terminal UI with colors and gradients
|
|
8
24
|
- ⚡ Fast and responsive with pagination
|
|
9
25
|
- 📦 Manage devboxes, snapshots, and blueprints
|
|
10
26
|
- 🚀 Execute commands in devboxes
|
|
11
|
-
- 📤 Upload files to devboxes
|
|
12
27
|
- 🎯 Organized command structure with aliases
|
|
13
28
|
- 🤖 **Model Context Protocol (MCP) server for AI integration**
|
|
14
29
|
|
|
@@ -20,16 +35,6 @@ Install globally via npm:
|
|
|
20
35
|
npm install -g @runloop/rl-cli
|
|
21
36
|
```
|
|
22
37
|
|
|
23
|
-
Or install from source:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
git clone https://github.com/runloop/rl-cli-node.git
|
|
27
|
-
cd rl-cli-node
|
|
28
|
-
npm install
|
|
29
|
-
npm run build
|
|
30
|
-
npm link
|
|
31
|
-
```
|
|
32
|
-
|
|
33
38
|
## Setup
|
|
34
39
|
|
|
35
40
|
Configure your API key:
|
|
@@ -42,100 +47,78 @@ Get your API key from [https://runloop.ai/settings](https://runloop.ai/settings)
|
|
|
42
47
|
|
|
43
48
|
## Usage
|
|
44
49
|
|
|
45
|
-
###
|
|
46
|
-
|
|
47
|
-
The CLI supports both light and dark terminal themes. Set the theme via environment variable:
|
|
50
|
+
### Interactive CLI
|
|
48
51
|
|
|
49
52
|
```bash
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
rli # Run the interactive console
|
|
54
|
+
rli --help # See help information
|
|
52
55
|
```
|
|
53
56
|
|
|
54
|
-
|
|
57
|
+
## Command Structure
|
|
55
58
|
|
|
56
|
-
|
|
57
|
-
- **light**: Optimized for light-themed terminals (uses dark text colors)
|
|
58
|
-
- **dark**: Optimized for dark-themed terminals (uses light text colors)
|
|
59
|
+
The CLI is organized into command buckets:
|
|
59
60
|
|
|
60
|
-
### Devbox Commands
|
|
61
|
+
### Devbox Commands (alias: `d`)
|
|
61
62
|
|
|
62
63
|
```bash
|
|
63
|
-
# Create
|
|
64
|
-
rli devbox
|
|
65
|
-
rli devbox
|
|
66
|
-
rli devbox
|
|
67
|
-
rli
|
|
68
|
-
|
|
69
|
-
#
|
|
70
|
-
rli devbox
|
|
71
|
-
rli devbox
|
|
72
|
-
rli
|
|
73
|
-
|
|
74
|
-
#
|
|
75
|
-
rli devbox
|
|
76
|
-
rli devbox
|
|
77
|
-
rli
|
|
78
|
-
|
|
79
|
-
#
|
|
80
|
-
rli devbox
|
|
81
|
-
rli devbox
|
|
82
|
-
rli
|
|
83
|
-
|
|
84
|
-
# Delete devboxes
|
|
85
|
-
rli devbox delete <devbox-id> # Shutdown a devbox
|
|
86
|
-
rli devbox rm <devbox-id> # Alias
|
|
87
|
-
rli d delete <id> # Short alias
|
|
64
|
+
rli devbox create # Create a new devbox
|
|
65
|
+
rli devbox list # List all devboxes
|
|
66
|
+
rli devbox delete <id> # Shutdown a devbox
|
|
67
|
+
rli devbox exec <id> <command...> # Execute a command in a devbox
|
|
68
|
+
rli devbox exec-async <id> <command...> # Execute a command asynchronously on a...
|
|
69
|
+
rli devbox upload <id> <file> # Upload a file to a devbox
|
|
70
|
+
rli devbox get <id> # Get devbox details
|
|
71
|
+
rli devbox get-async <id> <execution-id> # Get status of an async execution
|
|
72
|
+
rli devbox suspend <id> # Suspend a devbox
|
|
73
|
+
rli devbox resume <id> # Resume a suspended devbox
|
|
74
|
+
rli devbox shutdown <id> # Shutdown a devbox
|
|
75
|
+
rli devbox ssh <id> # SSH into a devbox
|
|
76
|
+
rli devbox scp <id> <src> <dst> # Copy files to/from a devbox using scp
|
|
77
|
+
rli devbox rsync <id> <src> <dst> # Sync files to/from a devbox using rsync
|
|
78
|
+
rli devbox tunnel <id> <ports> # Create a port-forwarding tunnel to a ...
|
|
79
|
+
rli devbox read <id> # Read a file from a devbox using the API
|
|
80
|
+
rli devbox write <id> # Write a file to a devbox using the API
|
|
81
|
+
rli devbox download <id> # Download a file from a devbox
|
|
82
|
+
rli devbox send-stdin <id> <execution-id> # Send stdin to a running async execution
|
|
83
|
+
rli devbox logs <id> # View devbox logs
|
|
88
84
|
```
|
|
89
85
|
|
|
90
|
-
### Snapshot Commands
|
|
86
|
+
### Snapshot Commands (alias: `snap`)
|
|
91
87
|
|
|
92
88
|
```bash
|
|
93
|
-
#
|
|
94
|
-
rli snapshot create <devbox-id>
|
|
95
|
-
rli snapshot
|
|
96
|
-
rli
|
|
97
|
-
|
|
98
|
-
# List snapshots (paginated)
|
|
99
|
-
rli snapshot list # List all snapshots
|
|
100
|
-
rli snapshot list --devbox <id> # Filter by devbox
|
|
101
|
-
rli snap list # Short alias
|
|
102
|
-
|
|
103
|
-
# Delete snapshots
|
|
104
|
-
rli snapshot delete <snapshot-id> # Delete snapshot
|
|
105
|
-
rli snapshot rm <snapshot-id> # Alias
|
|
106
|
-
rli snap delete <id> # Short alias
|
|
89
|
+
rli snapshot list # List all snapshots
|
|
90
|
+
rli snapshot create <devbox-id> # Create a snapshot of a devbox
|
|
91
|
+
rli snapshot delete <id> # Delete a snapshot
|
|
92
|
+
rli snapshot get <id> # Get snapshot details
|
|
93
|
+
rli snapshot status <snapshot-id> # Get snapshot operation status
|
|
107
94
|
```
|
|
108
95
|
|
|
109
|
-
### Blueprint Commands
|
|
96
|
+
### Blueprint Commands (alias: `bp`)
|
|
110
97
|
|
|
111
98
|
```bash
|
|
112
|
-
# List blueprints
|
|
113
|
-
rli blueprint
|
|
114
|
-
rli
|
|
99
|
+
rli blueprint list # List all blueprints
|
|
100
|
+
rli blueprint create # Create a new blueprint
|
|
101
|
+
rli blueprint get <name-or-id> # Get blueprint details by name or ID (...
|
|
102
|
+
rli blueprint logs <name-or-id> # Get blueprint build logs by name or I...
|
|
115
103
|
```
|
|
116
104
|
|
|
117
|
-
|
|
105
|
+
### Object Commands (alias: `obj`)
|
|
118
106
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
- `delete` (alias: `rm`) - Shutdown devboxes
|
|
107
|
+
```bash
|
|
108
|
+
rli object list # List objects
|
|
109
|
+
rli object get <id> # Get object details
|
|
110
|
+
rli object download <id> <path> # Download object to local file
|
|
111
|
+
rli object upload <path> # Upload a file as an object
|
|
112
|
+
rli object delete <id> # Delete an object (irreversible)
|
|
113
|
+
```
|
|
127
114
|
|
|
128
|
-
|
|
129
|
-
- `create` - Create snapshots
|
|
130
|
-
- `list` - List snapshots with pagination
|
|
131
|
-
- `delete` (alias: `rm`) - Delete snapshots
|
|
115
|
+
### Mcp Commands
|
|
132
116
|
|
|
133
|
-
|
|
134
|
-
|
|
117
|
+
```bash
|
|
118
|
+
rli mcp start # Start the MCP server
|
|
119
|
+
rli mcp install # Install Runloop MCP server configurat...
|
|
120
|
+
```
|
|
135
121
|
|
|
136
|
-
- **`mcp`** - Model Context Protocol server for AI integration
|
|
137
|
-
- `install` - Install MCP configuration in Claude Desktop
|
|
138
|
-
- `start` - Start the MCP server (stdio or HTTP mode)
|
|
139
122
|
|
|
140
123
|
## MCP Server (AI Integration)
|
|
141
124
|
|
|
@@ -163,19 +146,14 @@ rli mcp start --http --port 8080
|
|
|
163
146
|
```
|
|
164
147
|
|
|
165
148
|
**Documentation:**
|
|
149
|
+
|
|
166
150
|
- [CLAUDE_SETUP.md](./CLAUDE_SETUP.md) - Complete setup guide for Claude Desktop
|
|
167
151
|
- [MCP_README.md](./MCP_README.md) - Full MCP documentation
|
|
168
152
|
- [MCP_COMMANDS.md](./MCP_COMMANDS.md) - Quick command reference
|
|
169
153
|
|
|
170
|
-
##
|
|
154
|
+
## Theme Configuration
|
|
171
155
|
|
|
172
|
-
|
|
173
|
-
- `n` - Next page
|
|
174
|
-
- `p` - Previous page
|
|
175
|
-
- `q` - Quit
|
|
176
|
-
- **Beautiful UI** - Gradient text, colored borders, Unicode icons
|
|
177
|
-
- **Real-time Status** - Spinners and progress indicators
|
|
178
|
-
- **Summary Stats** - Count running, stopped, and total resources
|
|
156
|
+
The CLI supports both light and dark terminal themes and will automatically select the appropriate theme.
|
|
179
157
|
|
|
180
158
|
## Development
|
|
181
159
|
|
|
@@ -189,20 +167,9 @@ npm run build
|
|
|
189
167
|
# Watch mode
|
|
190
168
|
npm run dev
|
|
191
169
|
|
|
192
|
-
|
|
193
|
-
npm start -- <command>
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
## Publishing
|
|
197
|
-
|
|
198
|
-
To publish a new version to npm:
|
|
199
|
-
|
|
200
|
-
```bash
|
|
201
|
-
npm run build
|
|
202
|
-
npm publish
|
|
203
|
-
```
|
|
170
|
+
## Contributing
|
|
204
171
|
|
|
205
|
-
|
|
172
|
+
We welcome contributions! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines on how to contribute to this project.
|
|
206
173
|
|
|
207
174
|
## License
|
|
208
175
|
|