@learnrudi/cli 1.9.12 → 1.10.1
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/LICENSE +21 -0
- package/README.md +194 -137
- package/dist/index.cjs +764 -14
- package/dist/packages-manifest.json +1 -1
- package/package.json +22 -21
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 RUDI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,206 +1,263 @@
|
|
|
1
1
|
# RUDI CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A universal tool manager for MCP stacks, CLI tools, runtimes, and AI agents.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
RUDI provides a unified installation and management system for:
|
|
6
|
+
- **MCP Stacks** - Model Context Protocol servers for Claude, Codex, and Gemini
|
|
7
|
+
- **CLI Tools** - Any npm package or upstream binary (ffmpeg, ripgrep, etc.)
|
|
8
|
+
- **Runtimes** - Node.js, Python, Deno, Bun
|
|
9
|
+
- **AI Agents** - Claude Code, Codex CLI, Gemini CLI
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
6
12
|
|
|
7
13
|
```bash
|
|
8
|
-
npm
|
|
14
|
+
npm install -g @learnrudi/cli
|
|
9
15
|
```
|
|
10
16
|
|
|
11
|
-
Requires Node.js 18
|
|
17
|
+
Requires Node.js 18 or later. The installer creates `~/.rudi/` and adds shims to `~/.rudi/bins/`.
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
Add to your shell profile (`.bashrc`, `.zshrc`, or `.profile`):
|
|
14
20
|
|
|
15
21
|
```bash
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
rudi install npm:@stripe/cli
|
|
19
|
-
rudi install npm:vercel
|
|
22
|
+
export PATH="$HOME/.rudi/bins:$PATH"
|
|
23
|
+
```
|
|
20
24
|
|
|
21
|
-
|
|
22
|
-
rudi install slack
|
|
23
|
-
rudi install binary:ffmpeg
|
|
24
|
-
rudi install binary:supabase
|
|
25
|
+
## Core Concepts
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
tsc --version
|
|
28
|
-
ffmpeg -version
|
|
29
|
-
supabase --version
|
|
27
|
+
### Shim-Based Architecture
|
|
30
28
|
|
|
31
|
-
|
|
32
|
-
rudi secrets set SLACK_BOT_TOKEN "xoxb-your-token"
|
|
29
|
+
Every tool installed through RUDI gets a wrapper script (shim) in `~/.rudi/bins/`. This provides:
|
|
33
30
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
- Clean PATH integration without modifying system directories
|
|
32
|
+
- Version isolation per package
|
|
33
|
+
- Ownership tracking for clean uninstalls
|
|
34
|
+
- Consistent invocation across different package sources
|
|
37
35
|
|
|
38
|
-
|
|
36
|
+
When you run `tsc`, the shell finds `~/.rudi/bins/tsc`, which delegates to the actual TypeScript installation at `~/.rudi/binaries/npm/typescript/node_modules/.bin/tsc`.
|
|
39
37
|
|
|
40
|
-
###
|
|
38
|
+
### Package Sources
|
|
41
39
|
|
|
42
|
-
RUDI supports
|
|
40
|
+
RUDI supports three installation sources:
|
|
43
41
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
rudi install npm:typescript
|
|
48
|
-
rudi install npm:@railway/cli
|
|
42
|
+
1. **Dynamic npm** (`npm:<package>`) - Any npm package with a `bin` field
|
|
43
|
+
2. **Curated Registry** - Pre-configured stacks and binaries with documentation
|
|
44
|
+
3. **Upstream Binaries** - Direct downloads from official sources
|
|
49
45
|
|
|
50
|
-
|
|
51
|
-
rudi install slack # MCP stack
|
|
52
|
-
rudi install binary:ffmpeg # Upstream binary
|
|
53
|
-
rudi install binary:supabase # npm-based CLI
|
|
46
|
+
### Secret Management
|
|
54
47
|
|
|
55
|
-
|
|
56
|
-
```
|
|
48
|
+
MCP stacks often require API keys and tokens. RUDI stores secrets in `~/.rudi/secrets.json` (mode 0600) and injects them as environment variables when running stacks. Secrets are never exposed in process listings or logs.
|
|
57
49
|
|
|
58
|
-
|
|
50
|
+
## Usage
|
|
59
51
|
|
|
60
|
-
|
|
52
|
+
### Installing Packages
|
|
61
53
|
|
|
62
54
|
```bash
|
|
63
|
-
#
|
|
64
|
-
|
|
55
|
+
# Install any npm CLI tool
|
|
56
|
+
rudi install npm:typescript # Installs tsc, tsserver
|
|
57
|
+
rudi install npm:@stripe/cli # Installs stripe
|
|
58
|
+
rudi install npm:vercel # Installs vercel
|
|
65
59
|
|
|
66
|
-
#
|
|
67
|
-
|
|
68
|
-
ffmpeg
|
|
69
|
-
supabase
|
|
60
|
+
# Install from curated registry
|
|
61
|
+
rudi install slack # MCP stack for Slack
|
|
62
|
+
rudi install binary:ffmpeg # Upstream ffmpeg binary
|
|
63
|
+
rudi install binary:supabase # Supabase CLI
|
|
64
|
+
|
|
65
|
+
# Install with scripts enabled (when needed)
|
|
66
|
+
rudi install npm:puppeteer --allow-scripts
|
|
70
67
|
```
|
|
71
68
|
|
|
72
|
-
###
|
|
69
|
+
### Listing Installed Packages
|
|
73
70
|
|
|
74
|
-
|
|
71
|
+
```bash
|
|
72
|
+
rudi list # All installed packages
|
|
73
|
+
rudi list stacks # MCP stacks only
|
|
74
|
+
rudi list binaries # CLI tools only
|
|
75
|
+
rudi list runtimes # Language runtimes
|
|
76
|
+
rudi list agents # AI agent CLIs
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Searching the Registry
|
|
75
80
|
|
|
76
81
|
```bash
|
|
77
|
-
#
|
|
78
|
-
rudi
|
|
82
|
+
rudi search pdf # Search for packages
|
|
83
|
+
rudi search --all # List all available packages
|
|
84
|
+
rudi search --stacks # Filter to MCP stacks
|
|
85
|
+
rudi search --binaries # Filter to CLI tools
|
|
86
|
+
```
|
|
79
87
|
|
|
80
|
-
|
|
81
|
-
|
|
88
|
+
### Managing Secrets
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
rudi secrets list # Show configured secrets (masked)
|
|
92
|
+
rudi secrets set SLACK_BOT_TOKEN # Set a secret (prompts for value)
|
|
93
|
+
rudi secrets set OPENAI_API_KEY "sk-..." # Set with value
|
|
94
|
+
rudi secrets remove SLACK_BOT_TOKEN # Remove a secret
|
|
82
95
|
```
|
|
83
96
|
|
|
84
|
-
|
|
97
|
+
### Integrating with AI Agents
|
|
85
98
|
|
|
86
99
|
```bash
|
|
87
|
-
#
|
|
88
|
-
rudi
|
|
89
|
-
rudi
|
|
90
|
-
rudi
|
|
91
|
-
rudi install npm:<pkg> # Install any npm CLI
|
|
92
|
-
rudi remove <pkg> # Remove a package
|
|
93
|
-
|
|
94
|
-
# List and inspect
|
|
95
|
-
rudi list [kind] # List installed (stacks, binaries, agents)
|
|
96
|
-
rudi pkg <id> # Show package details and shim status
|
|
97
|
-
rudi shims list # List all shims
|
|
98
|
-
rudi shims check # Validate shim targets
|
|
99
|
-
|
|
100
|
-
# Secrets and integration
|
|
101
|
-
rudi secrets list # Show configured secrets
|
|
102
|
-
rudi secrets set <key> # Set a secret
|
|
103
|
-
rudi integrate <agent> # Wire stack to agent config
|
|
104
|
-
|
|
105
|
-
# Maintenance
|
|
106
|
-
rudi update [pkg] # Update packages
|
|
107
|
-
rudi doctor # Check system health
|
|
100
|
+
rudi integrate claude # Add stacks to Claude Desktop config
|
|
101
|
+
rudi integrate codex # Add stacks to Codex config
|
|
102
|
+
rudi integrate gemini # Add stacks to Gemini config
|
|
103
|
+
rudi integrate all # Add to all detected agents
|
|
108
104
|
```
|
|
109
105
|
|
|
110
|
-
|
|
106
|
+
This modifies the agent's MCP configuration file (e.g., `~/Library/Application Support/Claude/claude_desktop_config.json`) to include your installed stacks with proper secret injection.
|
|
111
107
|
|
|
112
|
-
###
|
|
108
|
+
### Inspecting Packages
|
|
113
109
|
|
|
114
110
|
```bash
|
|
115
|
-
rudi
|
|
116
|
-
|
|
111
|
+
rudi pkg slack # Show package details
|
|
112
|
+
rudi pkg npm:typescript # Show shims and paths
|
|
117
113
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
4. Discovers binaries from package.json (`tsc`, `tsserver`)
|
|
122
|
-
5. Creates wrapper shims in `~/.rudi/bins/`
|
|
123
|
-
6. Records ownership in shim registry
|
|
114
|
+
rudi shims list # List all shims
|
|
115
|
+
rudi shims check # Validate shim targets exist
|
|
116
|
+
```
|
|
124
117
|
|
|
125
|
-
###
|
|
118
|
+
### Maintenance
|
|
126
119
|
|
|
127
120
|
```bash
|
|
128
|
-
rudi
|
|
121
|
+
rudi update # Update all packages
|
|
122
|
+
rudi update slack # Update specific package
|
|
123
|
+
rudi remove slack # Uninstall a package
|
|
124
|
+
rudi doctor # Check system health
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Directory Structure
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
~/.rudi/
|
|
131
|
+
├── bins/ # Shims (add to PATH)
|
|
132
|
+
│ ├── tsc # → binaries/npm/typescript/...
|
|
133
|
+
│ ├── ffmpeg # → binaries/ffmpeg/...
|
|
134
|
+
│ └── rudi-mcp # MCP router for agents
|
|
135
|
+
│
|
|
136
|
+
├── stacks/ # MCP server installations
|
|
137
|
+
│ ├── slack/
|
|
138
|
+
│ │ ├── manifest.json
|
|
139
|
+
│ │ ├── index.js
|
|
140
|
+
│ │ └── node_modules/
|
|
141
|
+
│ └── google-workspace/
|
|
142
|
+
│
|
|
143
|
+
├── binaries/ # CLI tool installations
|
|
144
|
+
│ ├── ffmpeg/ # Upstream binary
|
|
145
|
+
│ ├── supabase/ # npm-based CLI
|
|
146
|
+
│ └── npm/ # Dynamic npm packages
|
|
147
|
+
│ ├── typescript/
|
|
148
|
+
│ └── vercel/
|
|
149
|
+
│
|
|
150
|
+
├── runtimes/ # Language runtimes
|
|
151
|
+
│ ├── node/
|
|
152
|
+
│ └── python/
|
|
153
|
+
│
|
|
154
|
+
├── agents/ # AI agent CLI installations
|
|
155
|
+
│
|
|
156
|
+
├── secrets.json # API keys (mode 0600)
|
|
157
|
+
├── shim-registry.json # Shim ownership tracking
|
|
158
|
+
└── rudi.db # Local metadata database
|
|
129
159
|
```
|
|
130
160
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
4. Shows which secrets need configuration
|
|
135
|
-
5. Ready for `rudi integrate` to wire to agents
|
|
161
|
+
## How MCP Integration Works
|
|
162
|
+
|
|
163
|
+
When you run `rudi integrate claude`, RUDI:
|
|
136
164
|
|
|
137
|
-
|
|
165
|
+
1. Reads the Claude Desktop config at `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
166
|
+
2. Adds entries for each installed stack pointing to `~/.rudi/bins/rudi-mcp`
|
|
167
|
+
3. Passes the stack ID as an argument
|
|
138
168
|
|
|
139
|
-
When
|
|
169
|
+
When Claude invokes the MCP server:
|
|
140
170
|
|
|
141
|
-
1.
|
|
142
|
-
2.
|
|
171
|
+
1. `rudi-mcp` receives the stack ID
|
|
172
|
+
2. Loads secrets from `~/.rudi/secrets.json`
|
|
143
173
|
3. Injects secrets as environment variables
|
|
144
|
-
4.
|
|
174
|
+
4. Spawns the actual MCP server process
|
|
175
|
+
5. Proxies stdio between Claude and the server
|
|
145
176
|
|
|
146
|
-
|
|
177
|
+
This architecture means secrets stay local and are never written to agent config files.
|
|
178
|
+
|
|
179
|
+
## Security Model
|
|
147
180
|
|
|
181
|
+
### npm Package Installation
|
|
182
|
+
|
|
183
|
+
By default, npm packages install with `--ignore-scripts` to prevent arbitrary code execution during install. If a package requires lifecycle scripts (e.g., native compilation), use:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
rudi install npm:puppeteer --allow-scripts
|
|
148
187
|
```
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
188
|
+
|
|
189
|
+
### Secret Storage
|
|
190
|
+
|
|
191
|
+
Secrets are stored in `~/.rudi/secrets.json` with file permissions `0600` (owner read/write only). This matches the security model used by SSH, AWS CLI, and other credential stores.
|
|
192
|
+
|
|
193
|
+
### Shim Isolation
|
|
194
|
+
|
|
195
|
+
Each package installs to its own directory. Shims are thin wrappers that set up the environment and delegate to the real binary. This prevents packages from interfering with each other.
|
|
196
|
+
|
|
197
|
+
## Available Stacks
|
|
198
|
+
|
|
199
|
+
| Stack | Description | Required Secrets |
|
|
200
|
+
|-------|-------------|------------------|
|
|
201
|
+
| slack | Channels, messages, reactions | `SLACK_BOT_TOKEN` |
|
|
202
|
+
| google-workspace | Gmail, Sheets, Docs, Drive | `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET` |
|
|
203
|
+
| notion-workspace | Pages, databases, search | `NOTION_API_KEY` |
|
|
204
|
+
| github | Issues, PRs, repos, actions | `GITHUB_TOKEN` |
|
|
205
|
+
| postgres | SQL queries | `DATABASE_URL` |
|
|
206
|
+
| stripe | Payments, subscriptions | `STRIPE_SECRET_KEY` |
|
|
207
|
+
| openai | DALL-E, Whisper, TTS | `OPENAI_API_KEY` |
|
|
208
|
+
| google-ai | Gemini, Imagen | `GOOGLE_AI_API_KEY` |
|
|
209
|
+
|
|
210
|
+
## Available Binaries
|
|
211
|
+
|
|
212
|
+
| Binary | Description | Source |
|
|
213
|
+
|--------|-------------|--------|
|
|
214
|
+
| ffmpeg | Video/audio processing | Upstream |
|
|
215
|
+
| ripgrep | Fast text search | Upstream |
|
|
216
|
+
| supabase | Supabase CLI | npm |
|
|
217
|
+
| vercel | Vercel CLI | npm |
|
|
218
|
+
| uv | Python package manager | Upstream |
|
|
219
|
+
|
|
220
|
+
## Troubleshooting
|
|
221
|
+
|
|
222
|
+
### Command not found after install
|
|
223
|
+
|
|
224
|
+
Ensure `~/.rudi/bins` is in your PATH:
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
echo $PATH | grep -q '.rudi/bins' && echo "OK" || echo "Add ~/.rudi/bins to PATH"
|
|
163
228
|
```
|
|
164
229
|
|
|
165
|
-
|
|
230
|
+
### Shim points to missing target
|
|
166
231
|
|
|
167
|
-
|
|
232
|
+
Run `rudi shims check` to validate all shims. If a target is missing, reinstall the package:
|
|
168
233
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
| notion-workspace | Pages, databases, search |
|
|
174
|
-
| google-ai | Gemini, Imagen, Veo |
|
|
175
|
-
| openai | DALL-E, Whisper, TTS, Sora |
|
|
176
|
-
| postgres | PostgreSQL database queries |
|
|
177
|
-
| video-editor | ffmpeg-based video editing |
|
|
178
|
-
| github | Issues, PRs, repos, actions |
|
|
179
|
-
| stripe | Payments, subscriptions, invoices |
|
|
234
|
+
```bash
|
|
235
|
+
rudi remove npm:typescript
|
|
236
|
+
rudi install npm:typescript
|
|
237
|
+
```
|
|
180
238
|
|
|
181
|
-
###
|
|
239
|
+
### MCP stack not appearing in agent
|
|
182
240
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
| ripgrep | Fast search |
|
|
187
|
-
| supabase | Supabase CLI |
|
|
188
|
-
| vercel | Vercel CLI |
|
|
189
|
-
| uv | Fast Python package manager |
|
|
241
|
+
1. Check the stack is installed: `rudi list stacks`
|
|
242
|
+
2. Run integration: `rudi integrate claude`
|
|
243
|
+
3. Restart the AI agent application
|
|
190
244
|
|
|
191
|
-
###
|
|
245
|
+
### Permission denied on secrets
|
|
192
246
|
|
|
193
|
-
|
|
247
|
+
Ensure correct permissions:
|
|
194
248
|
|
|
195
249
|
```bash
|
|
196
|
-
|
|
197
|
-
rudi install npm:cowsay # cowsay, cowthink
|
|
198
|
-
rudi install npm:@stripe/cli # stripe
|
|
199
|
-
rudi install npm:netlify-cli # netlify
|
|
250
|
+
chmod 600 ~/.rudi/secrets.json
|
|
200
251
|
```
|
|
201
252
|
|
|
202
253
|
## Links
|
|
203
254
|
|
|
204
|
-
-
|
|
255
|
+
- Documentation: https://learn-rudi.github.io/cli/
|
|
256
|
+
- Repository: https://github.com/learn-rudi/cli
|
|
205
257
|
- Registry: https://github.com/learn-rudi/registry
|
|
258
|
+
- npm: https://www.npmjs.com/package/@learnrudi/cli
|
|
206
259
|
- Issues: https://github.com/learn-rudi/cli/issues
|
|
260
|
+
|
|
261
|
+
## License
|
|
262
|
+
|
|
263
|
+
MIT
|