@xaidenlabs/uso 1.0.1 β 1.0.3
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 +72 -53
- package/package.json +1 -1
- package/src/platforms/windows.js +9 -4
package/README.md
CHANGED
|
@@ -1,97 +1,116 @@
|
|
|
1
|
-
#
|
|
2
|
-
### The **Magic Button** for Solana! β¨
|
|
1
|
+
# Universal Solana Orchestrator (USO)
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
The Universal Solana Orchestrator (USO) is a command-line interface designed to streamline the initialization and management of Solana development environments. By automating the installation of the Rust toolchain, Solana CLI, and Anchor framework, USO eliminates the complexity often associated with setting up a Web3 development workspace on Windows, macOS, and Linux.
|
|
4
|
+
|
|
5
|
+
This tool is engineered to support developers at all levelsβfrom beginners setting up their first environment to senior engineers managing multiple workstations.
|
|
7
6
|
|
|
8
7
|
---
|
|
9
8
|
|
|
10
|
-
##
|
|
11
|
-
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
Install USO globally using NPM. This ensures the CLI is accessible from any terminal directory.
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
14
|
npm install -g @xaidenlabs/uso
|
|
15
15
|
```
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
**Prerequisites:**
|
|
18
|
+
- **Node.js**: Ensure Node.js is installed on your system.
|
|
19
|
+
- **Administrator Privileges**: Some installation steps (successfully creating symlinks, updating system PATH) may require elevated permissions.
|
|
17
20
|
|
|
18
21
|
---
|
|
19
22
|
|
|
20
|
-
##
|
|
21
|
-
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
### System Diagnostics
|
|
26
|
+
|
|
27
|
+
Before attempting installation, you can run a diagnostic check to evaluate the current state of your environment.
|
|
28
|
+
|
|
22
29
|
```bash
|
|
23
30
|
uso doctor
|
|
24
31
|
```
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- β means MISSING (Don't worry, USO will fix it!)
|
|
32
|
+
|
|
33
|
+
This command will inspect your system for existing installations of Git, Rust, Solana CLI, and Anchor.
|
|
28
34
|
|
|
29
35
|
---
|
|
30
36
|
|
|
31
|
-
|
|
32
|
-
|
|
37
|
+
### Full Environment Setup
|
|
38
|
+
|
|
39
|
+
To perform a complete installation of the entire stack (Rust, Solana, Anchor), use the initialization command:
|
|
40
|
+
|
|
33
41
|
```bash
|
|
34
42
|
uso init
|
|
35
43
|
```
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
|
|
45
|
+
The installer will:
|
|
46
|
+
1. Detect your operating system.
|
|
47
|
+
2. Check for necessary build tools (C++ Build Tools on Windows).
|
|
48
|
+
3. Download and install the Rust toolchain (via `rustup`).
|
|
49
|
+
4. Install the Solana CLI (Agave release).
|
|
50
|
+
5. Build and install the Anchor Version Manager (AVM) and Anchor Framework.
|
|
51
|
+
6. Generate a new Solana wallet if one is not detected.
|
|
52
|
+
|
|
53
|
+
**Note:** You may be prompted to approve administrative access during the installation of specific components.
|
|
39
54
|
|
|
40
55
|
---
|
|
41
56
|
|
|
42
|
-
|
|
43
|
-
Maybe you only want one toy? You can do that too!
|
|
57
|
+
### Granular Installation
|
|
44
58
|
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
uso install rust
|
|
48
|
-
```
|
|
59
|
+
Use the `install` command to set up individual components if you do not require the full stack.
|
|
49
60
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
61
|
+
**Install Rust:**
|
|
62
|
+
```bash
|
|
63
|
+
uso install rust
|
|
64
|
+
```
|
|
54
65
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
66
|
+
**Install Solana CLI:**
|
|
67
|
+
```bash
|
|
68
|
+
uso install solana
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Install Anchor Framework:**
|
|
72
|
+
```bash
|
|
73
|
+
uso install anchor
|
|
74
|
+
```
|
|
59
75
|
|
|
60
76
|
---
|
|
61
77
|
|
|
62
|
-
|
|
63
|
-
|
|
78
|
+
### Verification
|
|
79
|
+
|
|
80
|
+
After installation, verify that all components are correctly configured and accessible in your system PATH.
|
|
81
|
+
|
|
64
82
|
```bash
|
|
65
83
|
uso verify
|
|
66
84
|
```
|
|
67
|
-
|
|
85
|
+
|
|
86
|
+
This process will validate the version of each tool and ensure the environment is ready for development.
|
|
68
87
|
|
|
69
88
|
---
|
|
70
89
|
|
|
71
|
-
##
|
|
72
|
-
If you don't want these tools anymore, USO can clean up for you.
|
|
90
|
+
## Uninstallation
|
|
73
91
|
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
uso uninstall
|
|
77
|
-
```
|
|
78
|
-
*(Be careful! It might ask to delete your wallet with your crypto keys!)*
|
|
92
|
+
USO provides a clean uninstallation process to remove the installed toolchains.
|
|
79
93
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
94
|
+
**Remove All Components:**
|
|
95
|
+
```bash
|
|
96
|
+
uso uninstall
|
|
97
|
+
```
|
|
84
98
|
|
|
85
|
-
|
|
99
|
+
**Remove Individual Components:**
|
|
100
|
+
```bash
|
|
101
|
+
uso uninstall solana
|
|
102
|
+
uso uninstall rust
|
|
103
|
+
uso uninstall anchor
|
|
104
|
+
```
|
|
86
105
|
|
|
87
|
-
|
|
106
|
+
---
|
|
88
107
|
|
|
89
|
-
|
|
90
|
-
- Try running your terminal as **Administrator** (Right-click -> Run as Administrator).
|
|
108
|
+
## Troubleshooting
|
|
91
109
|
|
|
92
|
-
**"
|
|
93
|
-
-
|
|
110
|
+
- **"Permission Denied" Errors**: If you encounter errors related to permissions or symlinks, try running your terminal as an Administrator.
|
|
111
|
+
- **"Command Not Found"**: After installation, your system PATH is updated. You must restart your terminal (close and reopen) for these changes to take effect.
|
|
112
|
+
- **Windows Build Tools**: If Rust fails to install on Windows, ensure you have the "Desktop development with C++" workload installed via Visual Studio Build Tools.
|
|
94
113
|
|
|
95
114
|
---
|
|
96
115
|
|
|
97
|
-
**
|
|
116
|
+
**Developed by Xaiden Labs**
|
package/package.json
CHANGED
package/src/platforms/windows.js
CHANGED
|
@@ -50,14 +50,16 @@ const installWindows = async (shouldInstallRust, shouldInstallSolana) => {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
// Try regular install first
|
|
53
|
+
// Try regular install first (Silently to catch 1314 error without scaring user)
|
|
53
54
|
log.info(" Running Solana Installer...");
|
|
54
|
-
const installResult = shell.exec('solana-install.exe stable');
|
|
55
|
+
const installResult = shell.exec('solana-install.exe stable', { silent: true });
|
|
55
56
|
|
|
56
57
|
// Check for Symlink Error (1314) for potential auto-elevation
|
|
57
58
|
if (installResult.code !== 0) {
|
|
58
59
|
const output = installResult.stderr + installResult.stdout;
|
|
60
|
+
|
|
59
61
|
if (output.includes("os error 1314")) {
|
|
60
|
-
log.
|
|
62
|
+
log.info("βΉοΈ Privilege escalation required for symlinks.");
|
|
61
63
|
log.info("π‘οΈ Triggering Run as Administrator (UAC)...");
|
|
62
64
|
log.info("π Please click 'Yes' in the popup window to allow the installer.");
|
|
63
65
|
|
|
@@ -70,18 +72,21 @@ const installWindows = async (shouldInstallRust, shouldInstallSolana) => {
|
|
|
70
72
|
|
|
71
73
|
if (elevatedRun.code === 0) {
|
|
72
74
|
// We can't easily capture stdout from the spawned high-privilege window,
|
|
73
|
-
// so we assume success if the process exited cleanly
|
|
74
|
-
// A basic verification: check if we can run solana
|
|
75
|
+
// so we assume success if the process exited cleanly.
|
|
75
76
|
log.success("β
Solana Installer finished (Elevated).");
|
|
76
77
|
} else {
|
|
77
78
|
log.error("β Elevated installation failed or was cancelled.");
|
|
78
79
|
return false;
|
|
79
80
|
}
|
|
80
81
|
} else {
|
|
82
|
+
// It failed for some other reason, so WE MUST show the output now
|
|
83
|
+
console.error(output);
|
|
81
84
|
log.error("β Solana CLI installation failed.");
|
|
82
85
|
// Don't return false hard here as we might want to continue, but usually this is fatal
|
|
83
86
|
}
|
|
84
87
|
} else {
|
|
88
|
+
// Success on first try
|
|
89
|
+
console.log(installResult.stdout); // Show success output if any relevant
|
|
85
90
|
log.success("β
Solana CLI installed.");
|
|
86
91
|
}
|
|
87
92
|
|