uv-suite 0.5.0 → 0.6.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/bin/cli.js +96 -38
- package/package.json +2 -1
package/bin/cli.js
CHANGED
|
@@ -1,49 +1,52 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const { execSync } = require('child_process');
|
|
3
|
+
const { execSync, spawn } = require('child_process');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const fs = require('fs');
|
|
6
6
|
|
|
7
7
|
const UV_SUITE_DIR = path.resolve(__dirname, '..');
|
|
8
8
|
const args = process.argv.slice(2);
|
|
9
9
|
const command = args[0];
|
|
10
|
+
const pkg = require(path.join(UV_SUITE_DIR, 'package.json'));
|
|
11
|
+
|
|
12
|
+
const PERSONAS = ['spike', 'sport', 'pro', 'professional', 'auto'];
|
|
13
|
+
const TOOLS = ['claude', 'codex'];
|
|
10
14
|
|
|
11
15
|
function usage() {
|
|
12
16
|
console.log(`
|
|
13
|
-
uv
|
|
17
|
+
uv v${pkg.version} — AI-assisted development framework
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
Launch a session:
|
|
20
|
+
uv claude pro Claude Code, Professional persona
|
|
21
|
+
uv claude auto Claude Code, Auto persona
|
|
22
|
+
uv codex pro Codex, Professional persona
|
|
23
|
+
uv codex sport Codex, Sport persona
|
|
24
|
+
uv pro Shorthand (defaults to Claude Code)
|
|
25
|
+
uv Claude Code, Professional
|
|
18
26
|
|
|
19
|
-
|
|
20
|
-
install
|
|
21
|
-
|
|
27
|
+
Setup:
|
|
28
|
+
uv install Install UV Suite into current project
|
|
29
|
+
uv install --persona sport
|
|
30
|
+
uv info Show what's installed
|
|
22
31
|
|
|
23
32
|
Personas:
|
|
24
|
-
spike
|
|
25
|
-
sport
|
|
26
|
-
|
|
27
|
-
auto
|
|
28
|
-
|
|
29
|
-
Examples:
|
|
30
|
-
npx uv-suite install Install with Professional persona
|
|
31
|
-
npx uv-suite install --persona sport Install with Sport persona
|
|
32
|
-
npx uv-suite install --global Install to ~/.claude/
|
|
33
|
+
spike Research & docs (Opus, max effort)
|
|
34
|
+
sport New projects (Sonnet, high effort)
|
|
35
|
+
pro Production code (all hooks, all guardrails)
|
|
36
|
+
auto Fully autonomous (max effort, everything approved)
|
|
33
37
|
`);
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
function info() {
|
|
37
41
|
console.log(`
|
|
38
|
-
UV Suite
|
|
42
|
+
UV Suite v${pkg.version}
|
|
39
43
|
|
|
40
44
|
Contents:
|
|
41
45
|
10 agents Claude Code (.md), Cursor (.mdc), Codex (.toml)
|
|
42
46
|
9 skills Slash commands for Claude Code
|
|
43
|
-
|
|
44
|
-
6 guardrails Anti-slop rules
|
|
47
|
+
5 hooks auto-lint, slop-check, danger-zone, block-destructive, review-reminder
|
|
48
|
+
6 guardrails Anti-slop rules
|
|
45
49
|
4 personas Spike, Sport, Professional, Auto
|
|
46
|
-
1 launcher uv.sh (session launcher with persona selection)
|
|
47
50
|
|
|
48
51
|
Source: ${UV_SUITE_DIR}
|
|
49
52
|
`);
|
|
@@ -55,8 +58,6 @@ function install() {
|
|
|
55
58
|
console.error('Error: install.sh not found at', installScript);
|
|
56
59
|
process.exit(1);
|
|
57
60
|
}
|
|
58
|
-
|
|
59
|
-
// Pass through all args after "install"
|
|
60
61
|
const installArgs = args.slice(1).join(' ');
|
|
61
62
|
try {
|
|
62
63
|
execSync(`bash "${installScript}" ${installArgs}`, { stdio: 'inherit' });
|
|
@@ -65,20 +66,77 @@ function install() {
|
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
69
|
+
function normPersona(p) {
|
|
70
|
+
if (p === 'pro' || p === 'professional') return 'professional';
|
|
71
|
+
if (PERSONAS.includes(p)) return p;
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function personaLabel(p) {
|
|
76
|
+
const labels = {
|
|
77
|
+
spike: 'Spike — research & docs (Opus, max)',
|
|
78
|
+
sport: 'Sport — lightweight (Sonnet, high)',
|
|
79
|
+
professional: 'Professional — full rigor (all hooks, all guardrails)',
|
|
80
|
+
auto: 'Auto — autonomous (max, everything approved)',
|
|
81
|
+
};
|
|
82
|
+
return labels[p] || p;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function launchClaude(persona, extra) {
|
|
86
|
+
const settings = path.resolve('.claude/personas', `${persona}.json`);
|
|
87
|
+
if (!fs.existsSync(settings)) {
|
|
88
|
+
console.error(`Error: ${settings} not found. Run 'uv install' first.`);
|
|
89
|
+
process.exit(1);
|
|
90
|
+
}
|
|
91
|
+
console.log(`UV Suite | Claude Code | ${personaLabel(persona)}`);
|
|
92
|
+
console.log('');
|
|
93
|
+
const child = spawn('claude', ['--settings', settings, ...extra], { stdio: 'inherit' });
|
|
94
|
+
child.on('exit', (code) => process.exit(code || 0));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function launchCodex(persona, extra) {
|
|
98
|
+
const approvalMap = {
|
|
99
|
+
spike: ['--model', 'o3', '--approval-mode', 'suggest'],
|
|
100
|
+
sport: ['--approval-mode', 'auto-edit'],
|
|
101
|
+
professional: ['--approval-mode', 'suggest'],
|
|
102
|
+
auto: ['--approval-mode', 'full-auto'],
|
|
103
|
+
};
|
|
104
|
+
const codexArgs = approvalMap[persona] || ['--approval-mode', 'suggest'];
|
|
105
|
+
console.log(`UV Suite | Codex | ${personaLabel(persona)}`);
|
|
106
|
+
console.log('');
|
|
107
|
+
const child = spawn('codex', [...codexArgs, ...extra], { stdio: 'inherit' });
|
|
108
|
+
child.on('exit', (code) => process.exit(code || 0));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// --- Parse and route ---
|
|
112
|
+
|
|
113
|
+
if (!command || command === '--help' || command === '-h') {
|
|
114
|
+
usage();
|
|
115
|
+
process.exit(0);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (command === 'install') {
|
|
119
|
+
install();
|
|
120
|
+
} else if (command === 'info') {
|
|
121
|
+
info();
|
|
122
|
+
} else if (TOOLS.includes(command)) {
|
|
123
|
+
// uv claude pro, uv codex auto
|
|
124
|
+
const persona = normPersona(args[1] || 'pro');
|
|
125
|
+
if (!persona) {
|
|
126
|
+
console.error(`Unknown persona: ${args[1]}`);
|
|
127
|
+
console.error('Available: spike, sport, pro, auto');
|
|
83
128
|
process.exit(1);
|
|
129
|
+
}
|
|
130
|
+
const extra = args.slice(2);
|
|
131
|
+
if (command === 'claude') launchClaude(persona, extra);
|
|
132
|
+
else launchCodex(persona, extra);
|
|
133
|
+
} else if (normPersona(command)) {
|
|
134
|
+
// uv pro (shorthand for uv claude pro)
|
|
135
|
+
const persona = normPersona(command);
|
|
136
|
+
const extra = args.slice(1);
|
|
137
|
+
launchClaude(persona, extra);
|
|
138
|
+
} else {
|
|
139
|
+
console.error(`Unknown command: ${command}`);
|
|
140
|
+
usage();
|
|
141
|
+
process.exit(1);
|
|
84
142
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uv-suite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Portable framework for AI-assisted software development. 10 agents, 9 skills, 5 hooks, 4 personas. Works with Claude Code, Cursor, and Codex.",
|
|
5
5
|
"author": "Utsav Anand",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"repomix": "^0.3.0"
|
|
25
25
|
},
|
|
26
26
|
"bin": {
|
|
27
|
+
"uv": "./bin/cli.js",
|
|
27
28
|
"uv-suite": "./bin/cli.js"
|
|
28
29
|
},
|
|
29
30
|
"files": [
|