uv-suite 0.18.0 → 0.20.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.
Files changed (2) hide show
  1. package/bin/cli.js +81 -1
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -86,10 +86,90 @@ function personaLabel(p) {
86
86
  return labels[p] || p;
87
87
  }
88
88
 
89
+ function ensureInstalled(persona) {
90
+ const hooksDir = path.resolve('.claude/hooks');
91
+ const personasDir = path.resolve('.claude/personas');
92
+ const needsInstall = !fs.existsSync(personasDir) || !fs.existsSync(hooksDir);
93
+
94
+ if (needsInstall) {
95
+ console.log('UV Suite not installed in this project. Installing core files...');
96
+ console.log('');
97
+
98
+ // Fast install: copy essential files directly (no pip, no brew, no slow stuff)
99
+ const srcDir = UV_SUITE_DIR;
100
+ const targetDir = path.resolve('.claude');
101
+
102
+ // Create directories
103
+ for (const dir of ['agents', 'skills', 'hooks', 'rules', 'personas']) {
104
+ fs.mkdirSync(path.join(targetDir, dir), { recursive: true });
105
+ }
106
+
107
+ // Copy agents
108
+ const agentsSrc = path.join(srcDir, 'agents', 'claude-code');
109
+ if (fs.existsSync(agentsSrc)) {
110
+ for (const f of fs.readdirSync(agentsSrc)) {
111
+ fs.copyFileSync(path.join(agentsSrc, f), path.join(targetDir, 'agents', f));
112
+ }
113
+ }
114
+
115
+ // Copy hooks
116
+ const hooksSrc = path.join(srcDir, 'hooks');
117
+ if (fs.existsSync(hooksSrc)) {
118
+ for (const f of fs.readdirSync(hooksSrc)) {
119
+ const dest = path.join(targetDir, 'hooks', f);
120
+ fs.copyFileSync(path.join(hooksSrc, f), dest);
121
+ fs.chmodSync(dest, 0o755);
122
+ }
123
+ }
124
+
125
+ // Copy skills
126
+ const skillsSrc = path.join(srcDir, 'skills');
127
+ if (fs.existsSync(skillsSrc)) {
128
+ for (const d of fs.readdirSync(skillsSrc)) {
129
+ const skillFile = path.join(skillsSrc, d, 'SKILL.md');
130
+ if (fs.existsSync(skillFile)) {
131
+ const destDir = path.join(targetDir, 'skills', d);
132
+ fs.mkdirSync(destDir, { recursive: true });
133
+ fs.copyFileSync(skillFile, path.join(destDir, 'SKILL.md'));
134
+ }
135
+ }
136
+ }
137
+
138
+ // Copy guardrails (for professional and auto)
139
+ if (persona === 'professional' || persona === 'auto') {
140
+ const guardSrc = path.join(srcDir, 'guardrails');
141
+ if (fs.existsSync(guardSrc)) {
142
+ for (const f of fs.readdirSync(guardSrc)) {
143
+ fs.copyFileSync(path.join(guardSrc, f), path.join(targetDir, 'rules', f));
144
+ }
145
+ }
146
+ }
147
+
148
+ // Copy personas
149
+ const personasSrc = path.join(srcDir, 'personas');
150
+ if (fs.existsSync(personasSrc)) {
151
+ for (const f of fs.readdirSync(personasSrc)) {
152
+ fs.copyFileSync(path.join(personasSrc, f), path.join(targetDir, 'personas', f));
153
+ }
154
+ }
155
+
156
+ // Set settings.json from persona
157
+ const personaFile = path.join(targetDir, 'personas', `${persona}.json`);
158
+ const settingsFile = path.join(targetDir, 'settings.json');
159
+ if (fs.existsSync(personaFile) && !fs.existsSync(settingsFile)) {
160
+ fs.copyFileSync(personaFile, settingsFile);
161
+ }
162
+
163
+ console.log(` Installed: agents, skills, hooks, guardrails, personas`);
164
+ console.log('');
165
+ }
166
+ }
167
+
89
168
  function launchClaude(persona, extra) {
169
+ ensureInstalled(persona);
90
170
  const settings = path.resolve('.claude/personas', `${persona}.json`);
91
171
  if (!fs.existsSync(settings)) {
92
- console.error(`Error: ${settings} not found. Run 'uv install' first.`);
172
+ console.error(`Error: installation failed. Run 'uvs install --persona ${persona}' manually.`);
93
173
  process.exit(1);
94
174
  }
95
175
  console.log(`UV Suite | Claude Code | ${personaLabel(persona)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uv-suite",
3
- "version": "0.18.0",
3
+ "version": "0.20.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",