@xaidenlabs/uso 1.0.2 β†’ 1.1.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 CHANGED
@@ -1,97 +1,133 @@
1
- # πŸ¦€ USO β˜€οΈ
2
- ### The **Magic Button** for Solana! ✨
1
+ # Universal Solana Orchestrator (USO)
3
2
 
4
- Do you want to build cool blockchain apps on Solana?
5
- Usually, installing all the tools is super hard and boring.
6
- **USO does it all for you with just ONE CLICK!**
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
- ## πŸš€ Step 1: Get USO
11
- First, let's put USO on your computer.Open your **Terminal** (or Command Prompt) and type this magic spell:
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
- *(If that doesn't work, ensure you have Node.js installed!)*
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
- ## 🩺 Step 2: Check Your Computer
21
- Is your computer ready? Ask the Doctor!
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
- It will check everything for you.
26
- - βœ… means GOOD!
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
- ## ✨ Step 3: Install Everything!
32
- This is the best part. To install **Rust**, **Solana**, and **Anchor** all at once, just type:
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
- - It will download everything.
37
- - It might ask for permission (click **Yes**!).
38
- - **IMPORTANT**: When it's done, close your terminal and open it again!
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
- ## 🎯 Step 4: Install Just One Thing (Optional)
43
- Maybe you only want one toy? You can do that too!
57
+ ### Granular Installation
44
58
 
45
- - **Want just Rust?** πŸ¦€
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
- - **Want just Solana?** β˜€οΈ
51
- ```bash
52
- uso install solana
53
- ```
61
+ **Install Rust:**
62
+ ```bash
63
+ uso install rust
64
+ ```
54
65
 
55
- - **Want just Anchor?** βš“
56
- ```bash
57
- uso install anchor
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
- ## βœ… Step 5: Test It!
63
- Let's make sure everything works perfectly.
78
+ ---
79
+
80
+ ### Project Scaffolding
81
+
82
+ Start a new project with a robust, pre-configured Anchor template.
83
+
64
84
  ```bash
65
- uso verify
85
+ uso create <project-name>
66
86
  ```
67
- If this says "Success", you are ready to build the future! πŸš€
87
+
88
+ This generates a "batteries-included" workspace with:
89
+ - **Localnet Configuration**: `Anchor.toml` pre-wired for local development.
90
+ - **Test Suite**: A running example test file using the latest Anchor syntax.
91
+ - **Scripts**: NPM scripts for linting and testing.
68
92
 
69
93
  ---
70
94
 
71
- ## πŸ—‘οΈ Step 6: Removing It (Uninstall)
72
- If you don't want these tools anymore, USO can clean up for you.
95
+ ### Verification
73
96
 
74
- - **Remove Everything:**
75
- ```bash
76
- uso uninstall
77
- ```
78
- *(Be careful! It might ask to delete your wallet with your crypto keys!)*
97
+ After installation, verify that all components are correctly configured and accessible in your system PATH.
98
+
99
+ ```bash
100
+ uso verify
101
+ ```
79
102
 
80
- - **Remove Just One Thing:**
81
- ```bash
82
- uso uninstall solana
83
- ```
103
+ This process will validate the version of each tool and ensure the environment is ready for development.
84
104
 
85
105
  ---
86
106
 
87
- ## ❓ Help! It's not working!
107
+ ## Uninstallation
108
+
109
+ USO provides a clean uninstallation process to remove the installed toolchains.
110
+
111
+ **Remove All Components:**
112
+ ```bash
113
+ uso uninstall
114
+ ```
115
+
116
+ **Remove Individual Components:**
117
+ ```bash
118
+ uso uninstall solana
119
+ uso uninstall rust
120
+ uso uninstall anchor
121
+ ```
122
+
123
+ ---
88
124
 
89
- **"Permission Denied" or "Error"?**
90
- - Try running your terminal as **Administrator** (Right-click -> Run as Administrator).
125
+ ## Troubleshooting
91
126
 
92
- **"Command not found"?**
93
- - Did you close and reopen your terminal after installing? Do that now!
127
+ - **"Permission Denied" Errors**: If you encounter errors related to permissions or symlinks, try running your terminal as an Administrator.
128
+ - **"Command Not Found"**: After installation, your system PATH is updated. You must restart your terminal (close and reopen) for these changes to take effect.
129
+ - **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
130
 
95
131
  ---
96
132
 
97
- **Made with ❀️ for You.**# cli-
133
+ **Developed by Xaiden Labs**
package/bin/index.js CHANGED
@@ -1,8 +1,9 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
  const { program } = require('commander');
3
3
  const { init } = require('../src/commands/init');
4
4
  const { doctor } = require('../src/commands/doctor');
5
5
  const { verify } = require('../src/commands/verify');
6
+ const { create } = require('../src/commands/create');
6
7
  const { build, test, deploy, clean } = require('../src/commands/workflow');
7
8
  const { uninstall } = require('../src/commands/uninstall');
8
9
 
@@ -27,6 +28,11 @@ program
27
28
  .description('Verify installation by building a test Anchor project')
28
29
  .action(verify);
29
30
 
31
+ program
32
+ .command('create <project_name>')
33
+ .description('Scaffold a new Anchor project')
34
+ .action(create);
35
+
30
36
  program
31
37
  .command('build')
32
38
  .description('Build the Anchor project (wraps "anchor build")')
@@ -0,0 +1,18 @@
1
+ [toolchain]
2
+
3
+ [features]
4
+ seeds = false
5
+ skip-lint = false
6
+
7
+ [programs.localnet]
8
+ my_test_project = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"
9
+
10
+ [registry]
11
+ url = "https://api.apr.dev"
12
+
13
+ [provider]
14
+ cluster = "Localnet"
15
+ wallet = "~/.config/solana/id.json"
16
+
17
+ [scripts]
18
+ test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
@@ -0,0 +1,36 @@
1
+ # Welcome to Your USO Project πŸš€
2
+
3
+ Congratulations! You've just scaffolded a professional Solana workspace using the **Universal Solana Orchestrator (USO)**.
4
+
5
+ This isn't just a folder with files. It's a battle-tested setup ready for serious development.
6
+
7
+ ## πŸ“‚ Structure
8
+ - `programs/`: Your Rust smart contracts live here.
9
+ - `tests/`: Robust TypeScript tests using Anchor.
10
+ - `Anchor.toml`: Your project configuration.
11
+
12
+ ## ⚑ Quick Start
13
+
14
+ ### 1. Build
15
+ Compile your smart contract:
16
+ ```bash
17
+ anchor build
18
+ ```
19
+
20
+ ### 2. Test
21
+ Run your test suite against a local validator:
22
+ ```bash
23
+ anchor test
24
+ ```
25
+ *Note: This automatically spins up a local validator, deploys your program, runs tests, and shuts down.*
26
+
27
+ ### 3. Deploy (Devnet)
28
+ When you're ready to go public:
29
+ 1. Switch to devnet: `solana config set --url devnet`
30
+ 2. Airdrop SOL: `solana airdrop 2`
31
+ 3. Deploy: `anchor deploy`
32
+
33
+ ## 🧠 Need Help?
34
+ Run `uso doctor` if your environment feels weird. Usage instructions are also available via `uso help`.
35
+
36
+ Happy coding!