vx 0.2.2

Universal Development Tool Manager
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
# vx - Universal Development Tool Manager


[δΈ­ζ–‡ζ–‡ζ‘£](README_zh.md)

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Rust](https://img.shields.io/badge/rust-1.80+-blue.svg)](https://www.rust-lang.org)
[![Test](https://github.com/loonghao/vx/workflows/Test/badge.svg)](https://github.com/loonghao/vx/actions)
[![Release](https://github.com/loonghao/vx/workflows/Release/badge.svg)](https://github.com/loonghao/vx/actions)
[![codecov](https://codecov.io/gh/loonghao/vx/branch/main/graph/badge.svg)](https://codecov.io/gh/loonghao/vx)
[![Security audit](https://github.com/loonghao/vx/workflows/Security%20audit/badge.svg)](https://github.com/loonghao/vx/actions)
[![GitHub release](https://img.shields.io/github/release/loonghao/vx.svg)](https://github.com/loonghao/vx/releases)
[![GitHub downloads](https://img.shields.io/github/downloads/loonghao/vx/total.svg)](https://github.com/loonghao/vx/releases)
[![Crates.io](https://img.shields.io/crates/v/vx.svg)](https://crates.io/crates/vx)
[![Documentation](https://docs.rs/vx/badge.svg)](https://docs.rs/vx)

> πŸš€ The ultimate development tool manager - One tool to rule them all

## ⚠️ Early Development Stage


**This project is currently in early experimental development stage.** Features and APIs may change significantly between versions. Use with caution in production environments.

- πŸ”¬ **Experimental**: Core features are being actively developed and tested
- 🚧 **Breaking Changes**: APIs and configurations may change without notice
- πŸ“ **Feedback Welcome**: Please report issues and share your experience
- 🎯 **MVP Focus**: Currently supports UV, Node.js, Go, and Rust tools
- πŸš€ **Release Automation**: Now with automated release management via release-plz

### βœ… Recently Implemented


- **NPX Support**: Full support for Node.js package runner with environment isolation
- **UVX Support**: Complete Python application runner integration via UV
- **Environment Isolation**: All tools run in vx-managed environments (no system PATH dependency)
- **Auto-Installation**: Automatic tool download and installation on first use
- **MCP Integration**: Ready for use as proxy in MCP server configurations
- **Improved CI/CD**: Enhanced release automation with release-please integration

### Current Limitations


- **Package Manager Integration**: Additional package managers (pnpm, yarn, bun) in development
- **Configuration**: Advanced project-specific configurations being enhanced
- **Plugin System**: External plugin support planned for future releases

`vx` is a powerful, fast, and extensible development tool manager that provides a unified interface for managing, installing, and executing development tools across different languages and ecosystems. Think of it as a combination of `nvm`, `rustup`, `pyenv`, and package managers, all in one lightning-fast tool.

## ✨ Features


### 🎯 Core Features

- **πŸ”„ Universal Interface**: Execute any supported tool through a single, consistent interface
- **πŸ“¦ Multi-Version Management**: Install, manage, and switch between multiple versions of tools
- **⚑ Zero Configuration**: Works out of the box with intelligent defaults
- **πŸš€ Auto-Installation**: Automatically download and install missing tools
- **🎯 Project-Specific**: Support for project-level tool configurations
- **πŸ”Œ Plugin Architecture**: Modular design with extensible plugin system

### 🎨 Enhanced CLI Experience

- **πŸ“Š Progress Bars**: Visual feedback for downloads and installations
- **🌈 Colorful Output**: Better visual distinction with colored messages
- **⏳ Spinner Animations**: Smooth loading indicators for operations
- **🀝 Interactive Confirmations**: User-friendly prompts and dialogs
- **πŸ’‘ Smart Error Messages**: Helpful suggestions and clear error reporting
- **πŸ”§ Environment Isolation**: `--use-system-path` flag for better control

### πŸ› οΈ Advanced Features

- **πŸ“Š Package Management**: Chocolatey-like layered package management
- **πŸ” Smart Discovery**: Automatic tool detection and version resolution
- **βš™οΈ Configuration Management**: Global and project-level configuration support
- **πŸ“ˆ Dependency Tracking**: Track and manage tool dependencies
- **🧹 Cleanup Tools**: Orphaned package cleanup and maintenance
- **πŸ“‹ Rich CLI**: Comprehensive command-line interface with helpful output

## πŸš€ Quick Start


### Installation


#### Quick Install (Recommended)


**Linux/macOS:**
```bash
curl -fsSL https://raw.githubusercontent.com/loonghao/vx/main/install.sh | bash
```

**Windows (PowerShell):**
```powershell
irm https://raw.githubusercontent.com/loonghao/vx/main/install-release.ps1 | iex
```

#### Package Managers


**Homebrew (macOS/Linux):**
```bash
brew install loonghao/tap/vx
```

**Scoop (Windows):**
```powershell
scoop bucket add loonghao https://github.com/loonghao/scoop-bucket
scoop install vx
```

**Cargo (from source):**
```bash
cargo install --git https://github.com/loonghao/vx
```

#### Manual Installation


Download the latest release from [GitHub Releases](https://github.com/loonghao/vx/releases) and extract to your PATH.

#### Build from Source


```bash
git clone https://github.com/loonghao/vx
cd vx

# Standard release build

cargo build --release

# PGO-optimized build (recommended for best performance)

make build-pgo

# Windows: Run the build installer

.\install.ps1
```

### Basic Usage


```bash
# Execute tools through vx - they'll be auto-installed if missing!

vx uv pip install requests
vx npm install react
vx node app.js
vx go build
vx cargo run

# Package runners with environment isolation

vx npx create-react-app my-app
vx npx -y cowsay "Hello from vx!"
vx uvx cowsay -t "Hello from vx uvx!"
vx uvx ruff check .

# Use system PATH instead of vx-managed tools

vx --use-system-path python --version
vx --use-system-path node --version

# List supported tools and plugins

vx list
vx plugin list

# Install specific versions

vx install uv@0.7.12
vx install node@20.0.0
vx install go@1.21.6

# Switch between versions

vx switch uv@0.7.12
vx switch node@18.19.0

# Project configuration

vx init
vx config
```

## πŸ“– Supported Tools


### πŸ”§ Built-in Plugins


| Tool | Commands | Category | Auto-Install | Description |
|------|----------|----------|--------------|-------------|
| **UV** | `vx uv pip`, `vx uv venv`, `vx uv run`, `vx uv add` | Python | βœ… | Extremely fast Python package installer |
| **UVX** | `vx uvx <package>`, `vx uvx ruff`, `vx uvx black` | Python | βœ… | Python application runner (via UV) |
| **Node.js** | `vx node`, `vx npm`, `vx npx` | JavaScript | βœ… | JavaScript runtime and package manager |
| **NPX** | `vx npx <package>`, `vx npx create-react-app` | JavaScript | βœ… | Node.js package runner |
| **Go** | `vx go build`, `vx go run`, `vx go test` | Go | βœ… | Go programming language toolchain |
| **Rust** | `vx cargo build`, `vx cargo run`, `vx cargo test` | Rust | βœ… | Rust programming language and Cargo |

### 🎯 Plugin Categories

- **Languages**: Go, Rust, Node.js, Python (via UV)
- **Package Managers**: npm, Cargo, UV (pip-compatible)
- **Package Runners**: npx, uvx (with environment isolation)
- **Build Tools**: Go build, Cargo, etc.
- **Runtimes**: Node.js

## πŸ”Œ MCP Integration


vx is designed to work seamlessly as a proxy for package runners in MCP (Model Context Protocol) server configurations, providing environment isolation and automatic tool management.

### Before (Direct Tool Usage)

```json
{
  "mcpServers": {
    "browsermcp": {
      "command": "npx",
      "args": ["-y", "@browsermcp/mcp@latest"]
    },
    "python-tool": {
      "command": "uvx",
      "args": ["some-python-tool@latest"]
    }
  }
}
```

### After (vx Proxy)

```json
{
  "mcpServers": {
    "browsermcp": {
      "command": "vx",
      "args": ["npx", "-y", "@browsermcp/mcp@latest"]
    },
    "python-tool": {
      "command": "vx",
      "args": ["uvx", "some-python-tool@latest"]
    }
  }
}
```

### Benefits

- **Environment Isolation**: No conflicts with system-installed tools
- **Automatic Installation**: Tools are downloaded and managed automatically
- **Version Control**: Consistent tool versions across environments
- **Cross-Platform**: Works identically on Windows, macOS, and Linux

## βš™οΈ Configuration


### Global Configuration


`~/.config/vx/config.toml`:

```toml
[defaults]
auto_install = true        # Auto-install missing tools
check_updates = true       # Check for updates
update_interval = "24h"    # Update check frequency

[tools.uv]
version = "0.5.26"
install_method = "official"

[tools.node]
version = "20.11.0"
install_method = "official"

[tools.go]
version = "1.21.6"
```

### Project Configuration


`.vx.toml`:

```toml
[tools]
uv = "0.5.26"
node = "20.11.0"
go = "1.21.6"

[defaults]
auto_install = true
```

### Plugin Configuration


```bash
# List all plugins

vx plugin list

# Get plugin info

vx plugin info uv

# Enable/disable plugins

vx plugin enable rust
vx plugin disable go

# Search plugins

vx plugin search python
```

## 🎯 Real-World Examples


### Python Development with UV

```bash
# Create a new Python project

vx uv init my-python-app
cd my-python-app

# Add dependencies

vx uv add fastapi uvicorn
vx uv add --dev pytest black

# Run the application

vx uv run uvicorn main:app --reload

# Run tests

vx uv run pytest

# Use uvx for Python applications (with environment isolation)

vx uvx ruff check .
vx uvx black --check .
vx uvx cowsay -t "Hello from vx uvx!"

# All tools run in vx-managed environments

vx uv --version  # Uses vx-managed uv
```

### Node.js Development

```bash
# Install and use Node.js

vx npm install express
vx node server.js

# Use npx for one-time tools (with environment isolation)

vx npx create-react-app my-app
vx npx -y typescript --init
vx npx cowsay "Hello from vx!"

# All tools run in vx-managed environments

vx npm --version  # Uses vx-managed npm
vx node --version # Uses vx-managed Node.js
```

### Go Development

```bash
# Initialize Go module

vx go mod init my-go-app

# Build and run

vx go build
vx go run main.go

# Test

vx go test ./...
```

### Rust Development

```bash
# Create new Rust project

vx cargo new my-rust-app
cd my-rust-app

# Add dependencies

vx cargo add serde tokio

# Build and run

vx cargo run
```

### Multi-Language Project

```bash
# Frontend (Node.js) + Backend (Go) + Scripts (Python)

vx npm install          # Frontend dependencies
vx go mod tidy          # Backend dependencies
vx uv pip install -r requirements.txt  # Script dependencies

# Run different parts

vx npm run dev          # Frontend dev server
vx go run cmd/server/main.go  # Backend server
vx uv run python scripts/deploy.py  # Deployment script
```

## πŸ“Š Package Management


### Multi-Version Support

```bash
# Install multiple versions

vx install go@1.20.0
vx install go@1.21.6

# List installed versions

vx stats

# Switch between versions

vx switch go@1.20.0
vx switch go@1.21.6

# Remove specific versions

vx remove go 1.20.0
vx remove go --all

# Cleanup orphaned packages

vx cleanup
```

### Package Statistics

```bash
# View package statistics

vx stats
# Output:

# πŸ“Š Package Statistics:

#   πŸ“¦ Total packages: 3

#   πŸ”’ Total versions: 5

#   πŸ’Ύ Total size: 2.1 GB

#   πŸ•’ Last updated: 2025-01-30 10:30:00 UTC

```

## πŸ› οΈ Development


### Prerequisites


- Rust 1.70+
- Cargo

### Building


```bash
git clone https://github.com/loonghao/vx
cd vx
cargo build --release
```

### Testing


```bash
cargo test
cargo run -- --help
```

### Plugin Development


See [MODULAR_ARCHITECTURE.md](MODULAR_ARCHITECTURE.md) for detailed plugin development guide.

## πŸš€ Roadmap


### Current Status (v0.1.1)

- βœ… Core plugin architecture
- βœ… 6 built-in tools (UV, UVX, Node.js, NPX, Go, Rust)
- βœ… Environment isolation system
- βœ… Auto-installation system
- βœ… Multi-version package management
- βœ… MCP integration support
- βœ… Package runner support (npx, uvx)
- βœ… Project configuration support

### Upcoming Features

- [ ] More package managers (pnpm, yarn, bun)
- [ ] System package managers (Homebrew, Chocolatey)
- [ ] Specialized tools (Rez for VFX, Spack for HPC)
- [ ] External plugin support (.dll, .so, scripts)
- [ ] Plugin marketplace
- [ ] GUI interface
- [ ] CI/CD integrations
- [ ] Team configuration sync

## 🀝 Contributing


We welcome contributions! Here's how you can help:

1. **Report Issues**: Found a bug? [Open an issue]https://github.com/loonghao/vx/issues
2. **Feature Requests**: Have an idea? [Start a discussion]https://github.com/loonghao/vx/discussions
3. **Plugin Development**: Create plugins for new tools
4. **Documentation**: Improve docs and examples
5. **Code Contributions**: Submit pull requests

### πŸš€ Release Process


This project uses [Release Please](https://github.com/googleapis/release-please) for automated releases:

- **Follow [Conventional Commits]https://www.conventionalcommits.org/ specification**
- **Automatic versioning**: Version bumps based on commit types
- **Automatic changelog**: Generated from commit history
- **Automatic releases**: GitHub releases created when Release PR is merged

```bash
# New feature (bumps minor version)

git commit -m "feat: add Python plugin support"

# Bug fix (bumps patch version)

git commit -m "fix: resolve installation issue on Windows"

# Breaking change (bumps major version)

git commit -m "feat!: redesign plugin API"
```

See [Release Guide](docs/RELEASE_GUIDE.md) for detailed guidelines.

## πŸ“„ License


This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## πŸ™ Acknowledgments


- Inspired by tools like `asdf`, `mise`, `proto`, and `chocolatey`
- Built with ❀️ using Rust and modern development practices
- Special thanks to the Rust community and all contributors

## πŸ“ž Support


- πŸ“– **Documentation**: [Full documentation]https://github.com/loonghao/vx/wiki
- πŸ’¬ **Discussions**: [GitHub Discussions]https://github.com/loonghao/vx/discussions
- πŸ› **Issues**: [Bug Reports]https://github.com/loonghao/vx/issues
- πŸ“§ **Contact**: hal.long@outlook.com

---

**Made with ❀️ for developers, by developers**