vx 0.4.0

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
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
# πŸš€ vx - Universal Development Tool Manager

<div align="center">

**The Ultimate Development Tool Manager - One Tool to Rule Them All**

[δΈ­ζ–‡ζ–‡ζ‘£](README_zh.md) | [πŸ“– Documentation](https://docs.rs/vx) | [πŸš€ Quick Start](#-quick-start) | [πŸ’‘ Examples](#-real-world-examples)

[![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)

*Lightning-fast, format-agnostic development tool manager with beautiful progress tracking*

</div>

---

## 🎯 What is vx?

**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.

## πŸ’‘ Design Philosophy

### The Problem We Solve

Every time we start a new development project, we face the same frustrating cycle:
- Install Node.js and npm for frontend tools
- Set up Python and pip/uv for scripts and automation
- Configure Go for backend services
- Manage Rust toolchain for system tools
- Deal with version conflicts and PATH issues
- Repeat this process across different machines and environments

**With the rise of MCP (Model Context Protocol)**, this problem has become even more pronounced. Many MCP servers require `uvx` for Python tools and `npx` for Node.js packages, forcing developers to manage multiple tool ecosystems just to get AI assistance working.

### Our Solution: Zero Learning Curve

vx eliminates this complexity while maintaining **zero learning curve**:

```bash
# Instead of learning and managing multiple tools:
npx create-react-app my-app     # Requires Node.js setup
uvx ruff check .                # Requires Python/UV setup
go run main.go                  # Requires Go installation

# Just use vx with the same commands you already know:
vx npx create-react-app my-app  # Auto-installs Node.js if needed
vx uvx ruff check .             # Auto-installs UV if needed
vx go run main.go               # Auto-installs Go if needed
```

### 🌟 Why vx?

- **πŸ”„ Universal Interface**: Execute any supported tool through a single, consistent interface
- **πŸ“š Zero Learning Curve**: Use the exact same commands you already know (`npx`, `uvx`, `go`, etc.)
- **⚑ Lightning Fast**: Built in Rust with async-first architecture for maximum performance
- **πŸš€ Auto-Installation**: Automatically download and install missing tools with beautiful progress bars
- **πŸ”’ Environment Isolation**: All tools run in vx-managed environments (no system PATH conflicts)
- **πŸ“¦ Format Agnostic**: Supports ZIP, TAR.GZ, TAR.XZ, TAR.BZ2, and raw binaries
- **🎨 Beautiful UX**: Rich progress bars, colorful output, and intuitive commands
- **πŸ€– MCP Ready**: Perfect for MCP servers - just prefix commands with `vx`

### πŸš€ Latest Improvements (v0.3.0)

- **πŸ”„ Self-Update System**: Built-in self-update with GitHub token support to avoid rate limits
- **πŸ“ Unified Path Management**: New vx-paths system for standardized tool installation paths
- **πŸ“Š Enhanced Tool Discovery**: Improved `list` and `which` commands with detailed status information
- **πŸ—οΈ Modular Architecture**: Complete rewrite with vx-installer engine for better maintainability
- **πŸ“Š Advanced Progress Tracking**: Beautiful progress bars with ETA and transfer rates
- **πŸ”§ Enhanced Installation System**: Support for multiple archive formats and installation methods
- **πŸ”Œ Plugin System**: Extensible architecture with built-in and external plugin support
- **πŸ›‘οΈ Security First**: Built-in checksum verification and secure downloads
- **🌍 Cross-Platform**: Seamless operation on Windows, macOS, and Linux

## ✨ 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 with beautiful progress tracking
- **🎯 Project-Specific**: Support for project-level tool configurations
- **πŸ”Œ Plugin Architecture**: Modular design with extensible plugin system
- **πŸ”„ Self-Update System**: Built-in updates with GitHub token support to avoid API rate limits
- **πŸ“ Unified Path Management**: Standardized tool installation paths across all platforms

### 🎨 Enhanced CLI Experience
- **πŸ“Š Beautiful Progress Bars**: Rich progress bars with ETA, transfer rates, and visual feedback
- **🌈 Colorful Output**: Better visual distinction with colored messages and emojis
- **⏳ Smooth Animations**: Elegant loading indicators and spinner animations
- **🀝 Interactive Experience**: User-friendly prompts and confirmation dialogs
- **πŸ’‘ Smart Error Messages**: Helpful suggestions and clear error reporting with recovery hints
- **πŸ”§ Environment Control**: `--use-system-path` flag for flexible tool execution

### πŸ› οΈ Advanced Installation Engine
- **πŸ“¦ Universal Format Support**: ZIP, TAR.GZ, TAR.XZ, TAR.BZ2, and raw binaries
- **πŸ”’ Security First**: Built-in checksum verification and secure HTTPS downloads
- **⚑ Async Performance**: Lightning-fast concurrent downloads and installations
- **🎨 Customizable Progress**: Multiple progress styles (default, simple, minimal, custom)
- **πŸ”§ Flexible Methods**: Support for archives, binaries, scripts, and package managers
- **🌍 Cross-Platform**: Seamless operation across Windows, macOS, and Linux

### πŸ—οΈ Modern Architecture
- **πŸ“Š Package Management**: Chocolatey-like layered package management system
- **πŸ” Smart Discovery**: Automatic tool detection and intelligent version resolution
- **βš™οΈ Configuration Management**: Global and project-level configuration with TOML support
- **πŸ“ˆ Dependency Tracking**: Advanced dependency management and conflict resolution
- **🧹 Maintenance Tools**: Automated cleanup of orphaned packages and cache management
- **πŸ“‹ Rich CLI**: Comprehensive command-line interface with detailed help and examples
- **πŸ“ Unified Path Management**: Standardized tool paths (`~/.vx/tools/<tool>/<version>/`) across all platforms

## πŸš€ Quick Start

### Installation

#### πŸš€ Quick Install (Recommended)

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

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

#### 🧠 Smart Install (Multi-Channel with Auto-Fallback)

For the most reliable installation experience with automatic fallback to multiple distribution channels:

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

This smart installer automatically:
- 🌍 Detects your geographic region for optimal CDN selection
- ⚑ Tests channel speeds and selects the fastest available
- πŸ”„ Falls back to alternative channels if primary fails
- πŸ“Š Shows detailed progress with beautiful progress bars

#### πŸ”§ Advanced Installation Options

**Install specific version:**
```bash
# Linux/macOS
VX_VERSION="0.1.0" curl -fsSL https://raw.githubusercontent.com/loonghao/vx/main/install.sh | bash

# Windows
$env:VX_VERSION="0.1.0"; powershell -c "irm https://raw.githubusercontent.com/loonghao/vx/main/install.ps1 | iex"
```

**Install with GitHub token (avoids rate limits):**
```bash
# Linux/macOS
GITHUB_TOKEN="your_token_here" curl -fsSL https://raw.githubusercontent.com/loonghao/vx/main/install.sh | bash

# Windows
$env:GITHUB_TOKEN="your_token_here"; powershell -c "irm https://raw.githubusercontent.com/loonghao/vx/main/install.ps1 | iex"
```

**Install to custom directory:**
```bash
# Linux/macOS
VX_INSTALL_DIR="$HOME/bin" curl -fsSL https://raw.githubusercontent.com/loonghao/vx/main/install.sh | bash

# Windows
$env:VX_INSTALL_DIR="C:\tools\vx"; powershell -c "irm https://raw.githubusercontent.com/loonghao/vx/main/install.ps1 | iex"
```

**Force specific distribution channel:**
```bash
# Use jsDelivr CDN (good for China/Asia)
VX_FORCE_CHANNEL="jsdelivr" curl -fsSL https://raw.githubusercontent.com/loonghao/vx/main/install-smart.sh | bash

# Use Fastly CDN (good for Europe)
VX_FORCE_CHANNEL="fastly" curl -fsSL https://raw.githubusercontent.com/loonghao/vx/main/install-smart.sh | bash

# Use GitHub directly (good for Americas)
VX_FORCE_CHANNEL="github" curl -fsSL https://raw.githubusercontent.com/loonghao/vx/main/install-smart.sh | bash
```

#### 🌐 Multi-Channel Distribution

vx uses a sophisticated multi-channel distribution system to ensure reliable downloads worldwide:

| Channel | Description | Best For | Rate Limits |
|---------|-------------|----------|-------------|
| **GitHub Releases** | Primary distribution | Americas, authenticated users | 60/hour (unauth), 5000/hour (auth) |
| **jsDelivr CDN** | Global CDN with China support | Asia-Pacific, China | Unlimited |
| **Fastly CDN** | High-performance global CDN | Europe, global | Unlimited |

**Automatic Fallback:** If one channel fails, the installer automatically tries the next available channel.

#### Package Managers

**Chocolatey (Windows):**
```powershell
choco install vx
```

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

**WinGet (Windows):**
```powershell
winget install loonghao.vx
```

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

**Arch Linux (AUR):**
```bash
# Using yay
yay -S vx-bin

# Using paru
paru -S vx-bin
```

**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

# Build and install using the installer (recommended)
# Linux/macOS
BUILD_FROM_SOURCE=true ./install.sh

# Windows
.\install.ps1 -BuildFromSource

# Or build manually
cargo build --release
cp target/release/vx ~/.local/bin/  # Linux/macOS
# copy target\release\vx.exe %USERPROFILE%\.local\bin\  # Windows
```

### ⚑ Quick Examples: Same Commands, Better Experience

```bash
# 🎯 Use the EXACT same commands you already know - just add 'vx'!

# Python development (no Python setup required)
vx uv pip install requests           # Auto-installs UV if needed
vx uvx ruff check .                  # Auto-installs ruff via UV
vx uvx black --check .               # Auto-installs black via UV

# Node.js development (no Node.js setup required)
vx npm install react                 # Auto-installs Node.js if needed
vx npx create-react-app my-app       # Auto-installs create-react-app
vx npx -y cowsay "Hello from vx!"    # One-time tool execution

# Go development (no Go setup required)
vx go build                          # Auto-installs Go if needed
vx go run main.go                    # Same commands you know

# Rust development (no Rust setup required)
vx cargo run                         # Auto-installs Rust if needed
vx cargo build --release             # Same Cargo commands

# πŸ€– Perfect for MCP servers - just prefix with 'vx':
# Instead of: npx @browsermcp/mcp@latest
# Use:        vx npx @browsermcp/mcp@latest
# Instead of: uvx some-python-tool
# Use:        vx uvx some-python-tool

# πŸ”§ Advanced features when you need them
vx --use-system-path python --version  # Use system tools when needed
vx list --status                      # Show all tools with installation status
vx which node --all                   # Show all installed versions of a tool
vx stats                              # Package statistics and usage

# πŸ”„ Self-update with GitHub token support (solves rate limit issues)
vx self-update --check                # Check for updates
vx self-update --token ghp_xxxx       # Update with GitHub token (recommended for teams)
vx self-update --prerelease           # Include pre-release versions

# 🎯 Version management with beautiful progress bars
vx install uv@0.7.12                 # Install specific versions
vx install node@20.0.0               # Rich progress tracking
vx switch node@18.19.0               # Instant version switching

# βš™οΈ Project configuration
vx init                               # Initialize project configuration
vx config                             # Manage global settings
```

## πŸ“– Supported Tools

### πŸ”§ Built-in Plugins

| Tool | Commands | Category | Auto-Install | Progress Bars | 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 |

### 🎯 Installation Features

- **πŸ“Š Beautiful Progress Bars**: Real-time download progress with ETA and transfer rates
- **πŸ”’ Secure Downloads**: HTTPS-only with automatic checksum verification
- **πŸ“¦ Multiple Formats**: ZIP, TAR.GZ, TAR.XZ, TAR.BZ2, and raw binaries
- **⚑ Concurrent Operations**: Parallel downloads for maximum speed
- **🎨 Customizable Styles**: Choose from default, simple, minimal, or custom progress styles
- **πŸ”§ Flexible Methods**: Archives, binaries, scripts, and package managers

### πŸ—οΈ Plugin Categories
- **Languages**: Go, Rust, Node.js, Python (via UV)
- **Package Managers**: npm, Cargo, UV (pip-compatible)
- **Package Runners**: npx, uvx (with complete environment isolation)
- **Build Tools**: Go build, Cargo, and language-specific toolchains
- **Runtimes**: Node.js with automatic version management

## πŸš€ vx-installer Engine

vx is powered by the **vx-installer** engine, a state-of-the-art installation system that provides:

### ✨ Advanced Installation Features

- **πŸ“Š Beautiful Progress Tracking**: Rich progress bars with ETA, transfer rates, and visual feedback
- **πŸ“¦ Universal Format Support**: ZIP, TAR.GZ, TAR.XZ, TAR.BZ2, and raw binaries
- **⚑ Lightning Performance**: Async-first architecture with concurrent downloads
- **πŸ”’ Security First**: Built-in checksum verification and secure HTTPS downloads
- **🎨 Customizable Experience**: Multiple progress styles and installation methods

### 🎯 Installation Methods

| Method | Description | Use Case | Progress |
|--------|-------------|----------|----------|
| **Archive** | Extract from compressed archives | Tools distributed as ZIP/TAR | βœ… |
| **Binary** | Direct binary installation | Single executable tools | βœ… |
| **Script** | Run installation scripts | Custom installation logic | βœ… |
| **Package Manager** | Use system package managers | System-wide installations | βœ… |

### πŸ“ˆ Performance Benchmarks

| Operation | Archive Size | Time | Memory Usage |
|-----------|-------------|------|--------------|
| Download | 50MB | 2.3s | 8MB |
| Extract ZIP | 100MB | 1.8s | 12MB |
| Extract TAR.GZ | 100MB | 2.1s | 10MB |
| Install Binary | 25MB | 0.5s | 4MB |

*Benchmarks on Intel i7-10700K, 32GB RAM, SSD storage*

## πŸ”Œ MCP Integration: The Perfect Solution

vx was designed with MCP (Model Context Protocol) in mind. Many MCP servers require `uvx` and `npx`, but setting up these tools can be complex and error-prone. vx solves this with **zero configuration** and **zero learning curve**.

### The MCP Challenge

MCP servers often require multiple tool ecosystems:
```bash
# Traditional setup requires managing multiple tools:
npm install -g some-package     # Requires Node.js setup
uvx install some-python-tool    # Requires Python/UV setup
# Plus dealing with PATH conflicts, version mismatches, etc.
```

### The vx Solution: Just Add `vx`

With vx, you simply prefix your existing commands with `vx` - **no learning curve, no configuration**:

### Before (Complex Setup Required)
```json
{
  "mcpServers": {
    "browsermcp": {
      "command": "npx",
      "args": ["-y", "@browsermcp/mcp@latest"]
    },
    "python-tool": {
      "command": "uvx",
      "args": ["some-python-tool@latest"]
    }
  }
}
```

### After (Zero Setup with vx)
```json
{
  "mcpServers": {
    "browsermcp": {
      "command": "vx",
      "args": ["npx", "-y", "@browsermcp/mcp@latest"]
    },
    "python-tool": {
      "command": "vx",
      "args": ["uvx", "some-python-tool@latest"]
    }
  }
}
```

### 🎯 What You Get

- **πŸ“š Zero Learning Curve**: Use the exact same `npx` and `uvx` commands you already know
- **πŸš€ Zero Configuration**: No need to install Node.js, Python, UV, or manage PATH
- **πŸ”’ Complete Isolation**: MCP tools run in isolated environments, no conflicts
- **πŸ“Š Beautiful Progress**: See exactly what's happening with rich progress bars
- **πŸ›‘οΈ Security First**: Automatic checksum verification and secure downloads
- **🌍 Cross-Platform**: Identical behavior on Windows, macOS, and Linux
- **⚑ Lightning Fast**: Concurrent downloads and installations

## πŸ—οΈ Project Architecture

vx is built with a modern, modular architecture that emphasizes performance, extensibility, and maintainability. The recent vx-installer integration brings state-of-the-art installation capabilities.

### πŸ“¦ Core Components

```
vx/
β”œβ”€β”€ vx-cli/              # Command-line interface with rich UX
β”œβ”€β”€ vx-core/             # Core functionality and utilities
β”œβ”€β”€ vx-installer/        # πŸ†• Universal installation engine
β”œβ”€β”€ vx-config/           # Configuration management (TOML-based)
β”œβ”€β”€ vx-plugin/           # Plugin system and trait definitions
β”œβ”€β”€ vx-tools/            # Built-in tool plugins
β”‚   β”œβ”€β”€ vx-tool-node/    # Node.js support with NPX integration
β”‚   β”œβ”€β”€ vx-tool-go/      # Go toolchain support
β”‚   β”œβ”€β”€ vx-tool-rust/    # Rust and Cargo support
β”‚   └── vx-tool-uv/      # UV (Python) with UVX support
└── vx-package-managers/ # Package manager plugins
    └── vx-pm-npm/       # NPM package manager integration
```

### πŸš€ vx-installer Engine

The heart of vx's installation system, providing:

- **πŸ“¦ Format Handlers**: ZIP, TAR.GZ, TAR.XZ, TAR.BZ2, Binary
- **πŸ“Š Progress System**: Beautiful progress bars with customizable styles
- **πŸ”’ Security Layer**: Checksum verification and secure downloads
- **⚑ Async Core**: High-performance concurrent operations
- **πŸ”§ Extensible**: Plugin-based format and method support

### 🎯 Design Principles

- **πŸ”Œ Plugin Architecture**: Extensible design with trait-based plugins
- **⚑ Performance First**: Rust-powered with async-first operations
- **πŸ›‘οΈ Safety & Security**: Memory safety, error handling, and secure downloads
- **πŸ”§ Modularity**: Clean separation of concerns with focused crates
- **πŸ“¦ Composability**: Mix and match components as needed
- **🎨 User Experience**: Beautiful CLI with progress tracking and helpful messages

## βš™οΈ 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
```

## πŸ”„ Self-Update System

vx includes a powerful self-update system that solves GitHub API rate limit issues commonly encountered in shared environments.

### πŸš€ Quick Update
```bash
# Check for updates
vx self-update --check

# Update to latest version
vx self-update

# Update with GitHub token (recommended for teams/shared networks)
vx self-update --token ghp_your_github_token_here

# Include pre-release versions
vx self-update --prerelease

# Force update even if already up to date
vx self-update --force
```

### πŸ” GitHub Token Support

**Problem**: GitHub's public API has a rate limit of 60 requests per hour for unauthenticated users. In shared environments (offices, schools, apartments), multiple users may hit this limit.

**Solution**: Use a GitHub token to increase the rate limit to 5,000 requests per hour:

```bash
# Create a GitHub token at: https://github.com/settings/tokens
# No special permissions needed - just basic access

# Use token for updates
vx self-update --token ghp_xxxxxxxxxxxxxxxxxxxx

# Or set as environment variable
export GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx
vx self-update
```

### πŸ“Š Update Features

- **πŸ” Smart Detection**: Automatically detects current and latest versions
- **πŸ“¦ Cross-Platform**: Supports Windows, macOS, and Linux binaries
- **πŸ”’ Secure Downloads**: HTTPS-only with automatic verification
- **πŸ“‹ Release Notes**: Shows changelog for new versions
- **πŸ”„ Backup & Rollback**: Automatically backs up current version
- **⚑ Fast Downloads**: Concurrent downloads with progress bars
- **🎯 Format Support**: ZIP, TAR.GZ archives and raw binaries

## πŸ“Š Package Management

### Multi-Version Support
```bash
# Install multiple versions
vx install go@1.20.0
vx install go@1.21.6

# List installed versions with detailed status
vx list --status
vx stats

# Show tool installation paths
vx which go --all
vx which node --all

# 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
```

## πŸ”§ Troubleshooting

### Installation Issues

#### GitHub API Rate Limit Exceeded

**Problem:** Getting "API rate limit exceeded" error during installation.

**Solutions:**
1. **Use GitHub Token (Recommended):**
   ```bash
   # Linux/macOS
   GITHUB_TOKEN="your_token_here" curl -fsSL https://raw.githubusercontent.com/loonghao/vx/main/install.sh | bash

   # Windows
   $env:GITHUB_TOKEN="your_token_here"; powershell -c "irm https://raw.githubusercontent.com/loonghao/vx/main/install.ps1 | iex"
   ```

2. **Specify Version Explicitly:**
   ```bash
   VX_VERSION="0.1.0" curl -fsSL https://raw.githubusercontent.com/loonghao/vx/main/install.sh | bash
   ```

3. **Use Smart Installer with CDN Fallback:**
   ```bash
   curl -fsSL https://raw.githubusercontent.com/loonghao/vx/main/install-smart.sh | bash
   ```

4. **Use Package Managers:**
   ```bash
   # Windows
   winget install loonghao.vx
   scoop install vx

   # macOS
   brew install loonghao/vx/vx
   ```

#### Download Failures

**Problem:** Downloads fail or are very slow.

**Solutions:**
1. **Force Specific Channel:**
   ```bash
   # Use jsDelivr CDN (good for Asia/China)
   VX_FORCE_CHANNEL="jsdelivr" curl -fsSL https://raw.githubusercontent.com/loonghao/vx/main/install-smart.sh | bash

   # Use Fastly CDN (good for Europe)
   VX_FORCE_CHANNEL="fastly" curl -fsSL https://raw.githubusercontent.com/loonghao/vx/main/install-smart.sh | bash
   ```

2. **Enable Debug Mode:**
   ```bash
   VX_DEBUG=true curl -fsSL https://raw.githubusercontent.com/loonghao/vx/main/install-smart.sh | bash
   ```

3. **Build from Source:**
   ```bash
   BUILD_FROM_SOURCE=true curl -fsSL https://raw.githubusercontent.com/loonghao/vx/main/install.sh | bash
   ```

#### Network Issues in China

**Problem:** Slow or failed downloads due to network restrictions.

**Solutions:**
1. **Use jsDelivr CDN:**
   ```bash
   VX_FORCE_CHANNEL="jsdelivr" curl -fsSL https://raw.githubusercontent.com/loonghao/vx/main/install-smart.sh | bash
   ```

2. **Use Mirror URLs:**
   ```bash
   curl -fsSL https://fastly.jsdelivr.net/gh/loonghao/vx@main/install-smart.sh | bash
   ```

### Runtime Issues

#### Tool Not Found

**Problem:** `vx: command not found` after installation.

**Solutions:**
1. **Add to PATH manually:**
   ```bash
   echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
   source ~/.bashrc
   ```

2. **Check installation location:**
   ```bash
   which vx
   ls -la ~/.local/bin/vx
   ```

#### Permission Denied

**Problem:** Permission errors when running vx.

**Solutions:**
1. **Fix permissions:**
   ```bash
   chmod +x ~/.local/bin/vx
   ```

2. **Check ownership:**
   ```bash
   ls -la ~/.local/bin/vx
   chown $USER:$USER ~/.local/bin/vx
   ```

### Getting Help

If you're still experiencing issues:

1. **Enable Debug Mode:**
   ```bash
   VX_DEBUG=true vx your-command
   ```

2. **Check System Requirements:**
   - Linux: glibc 2.17+ or musl
   - macOS: 10.12+
   - Windows: Windows 10+

3. **Report Issues:**
   - [GitHub Issues]https://github.com/loonghao/vx/issues
   - Include debug output and system information

## πŸ› οΈ 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.3.0)
- βœ… **Core plugin architecture** with trait-based extensibility
- βœ… **6 built-in tools** (UV, UVX, Node.js, NPX, Go, Rust)
- βœ… **Environment isolation system** with complete PATH management
- βœ… **πŸ†• Self-update system** with GitHub token support for rate limit avoidance
- βœ… **πŸ†• Unified path management** with vx-paths system (`~/.vx/tools/<tool>/<version>/`)
- βœ… **πŸ†• Enhanced tool discovery** with improved `list --status` and `which --all` commands
- βœ… **vx-installer engine** with universal format support
- βœ… **Beautiful progress bars** with ETA and transfer rates
- βœ… **Security-first downloads** with checksum verification
- βœ… **Async installation system** with concurrent operations
- βœ… **Multi-version package management** with intelligent switching
- βœ… **MCP integration support** for seamless proxy usage
- βœ… **Package runner support** (npx, uvx) with environment isolation
- βœ… **Project configuration support** with TOML-based configs

### Upcoming Features

#### πŸ”§ New Tool Support (Phase 7)
- [ ] **just** - Modern command runner and build tool (`vx just --list`, `vx just build`)
- [ ] **kubectl** - Kubernetes command-line tool (`vx kubectl get pods`, `vx kubectl apply`)
- [ ] **deno** - Modern JavaScript/TypeScript runtime (`vx deno run`, `vx deno task`)
- [ ] **podman** - Container management (`vx podman run`, `vx podman build`)
- [ ] **zig** - Systems programming language (`vx zig build`, `vx zig run`)

#### πŸš€ Enhanced Features
- [ ] **Enhanced Package Managers**: pnpm, yarn, bun with full vx-installer integration
- [ ] **System Package Managers**: Homebrew, Chocolatey, apt, yum support
- [ ] **Specialized Tools**: Rez for VFX, Spack for HPC environments
- [ ] **External Plugin Support**: .dll, .so, and script-based plugins
- [ ] **Plugin Marketplace**: Community-driven plugin ecosystem
- [ ] **Advanced Installation Methods**: Docker, containers, and virtual environments
- [ ] **GUI Interface**: Desktop application with visual tool management
- [ ] **CI/CD Integrations**: GitHub Actions, GitLab CI, Jenkins plugins
- [ ] **Team Configuration Sync**: Shared configurations and tool versions
- [ ] **Performance Optimizations**: Caching, parallel operations, and smart updates

## 🀝 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**