vorpl-setup 0.1.0 → 0.2.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/index.js +18 -12
- package/package.json +1 -15
package/index.js
CHANGED
|
@@ -37,9 +37,9 @@ function validateKey(key) {
|
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
function runCmd(cmd
|
|
40
|
+
function runCmd(cmd) {
|
|
41
41
|
try {
|
|
42
|
-
execSync(cmd, { stdio: 'pipe', timeout:
|
|
42
|
+
execSync(cmd, { stdio: 'pipe', timeout: 60000 });
|
|
43
43
|
return true;
|
|
44
44
|
} catch (e) {
|
|
45
45
|
return false;
|
|
@@ -63,36 +63,42 @@ async function main() {
|
|
|
63
63
|
if (valid) {
|
|
64
64
|
success('API key valid.');
|
|
65
65
|
} else {
|
|
66
|
-
warn('Could not validate key
|
|
66
|
+
warn('Could not validate key. Continuing anyway.');
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
// ── Check Claude Code
|
|
69
|
+
// ── Check Claude Code ──────────────────────────────────
|
|
70
70
|
log('Checking Claude Code ...');
|
|
71
71
|
const hasClaude = runCmd('claude --version');
|
|
72
72
|
if (!hasClaude) {
|
|
73
|
-
fail('Claude Code CLI not found.
|
|
73
|
+
fail('Claude Code CLI not found.');
|
|
74
|
+
log('Install it first: https://claude.ai/download');
|
|
74
75
|
process.exit(1);
|
|
75
76
|
}
|
|
76
77
|
success('Claude Code found.');
|
|
77
78
|
|
|
78
79
|
// ── Add marketplace ────────────────────────────────────
|
|
79
80
|
log('Adding Vorpl marketplace ...');
|
|
80
|
-
const
|
|
81
|
-
if (
|
|
81
|
+
const added = runCmd('claude plugin marketplace add https://vorpl.ai');
|
|
82
|
+
if (added) {
|
|
82
83
|
success('Marketplace added.');
|
|
83
84
|
} else {
|
|
84
|
-
warn('Marketplace may already exist.
|
|
85
|
+
warn('Marketplace may already exist.');
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
// ── Install plugin ─────────────────────────────────────
|
|
88
89
|
log('Installing Vorpl plugin ...');
|
|
89
|
-
const
|
|
90
|
-
if (
|
|
90
|
+
const installed = runCmd('claude plugin install vorpl@vorpl');
|
|
91
|
+
if (installed) {
|
|
91
92
|
success('Plugin installed.');
|
|
92
93
|
} else {
|
|
93
|
-
warn('Plugin may already be installed.
|
|
94
|
+
warn('Plugin may already be installed.');
|
|
94
95
|
}
|
|
95
96
|
|
|
97
|
+
// ── Enable plugin ──────────────────────────────────────
|
|
98
|
+
log('Enabling plugin ...');
|
|
99
|
+
runCmd('claude plugin enable vorpl@vorpl');
|
|
100
|
+
success('Plugin enabled.');
|
|
101
|
+
|
|
96
102
|
// ── Create data directory ──────────────────────────────
|
|
97
103
|
log('Setting up data directory ...');
|
|
98
104
|
const dirs = [
|
|
@@ -132,7 +138,7 @@ async function main() {
|
|
|
132
138
|
sync_endpoint: 'https://api.vorpl.ai',
|
|
133
139
|
last_analysis_timestamp: config.last_analysis_timestamp || null,
|
|
134
140
|
...config,
|
|
135
|
-
api_key: API_KEY,
|
|
141
|
+
api_key: API_KEY,
|
|
136
142
|
auth_status: 'authenticated',
|
|
137
143
|
};
|
|
138
144
|
|
package/package.json
CHANGED
|
@@ -1,15 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "vorpl-setup",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"description": "One-command Vorpl setup for Claude Code",
|
|
5
|
-
"bin": {
|
|
6
|
-
"vorpl-setup": "index.js"
|
|
7
|
-
},
|
|
8
|
-
"keywords": [
|
|
9
|
-
"vorpl",
|
|
10
|
-
"claude-code",
|
|
11
|
-
"ai",
|
|
12
|
-
"coding"
|
|
13
|
-
],
|
|
14
|
-
"license": "MIT"
|
|
15
|
-
}
|
|
1
|
+
{"name":"vorpl-setup","version":"0.2.0","description":"One-command Vorpl setup for Claude Code","bin":{"vorpl-setup":"index.js"},"keywords":["vorpl","claude-code","ai","coding"],"license":"MIT"}
|