zuppaclaude 1.2.1 → 1.3.1
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/lib/components/cloud.js +84 -0
- package/lib/installer.js +38 -6
- package/package.json +1 -1
package/lib/components/cloud.js
CHANGED
|
@@ -22,6 +22,90 @@ class CloudManager {
|
|
|
22
22
|
return this.platform.commandExists('rclone');
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Install rclone
|
|
27
|
+
*/
|
|
28
|
+
async installRclone() {
|
|
29
|
+
if (this.isRcloneInstalled()) {
|
|
30
|
+
this.logger.success('rclone is already installed');
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
this.logger.step('Installing rclone...');
|
|
35
|
+
|
|
36
|
+
try {
|
|
37
|
+
if (this.platform.isMac) {
|
|
38
|
+
if (this.platform.commandExists('brew')) {
|
|
39
|
+
this.platform.exec('brew install rclone', { silent: false, stdio: 'inherit' });
|
|
40
|
+
} else {
|
|
41
|
+
this.logger.warning('Homebrew not found, using curl installer');
|
|
42
|
+
this.platform.exec('curl https://rclone.org/install.sh | sudo bash', { silent: false, stdio: 'inherit' });
|
|
43
|
+
}
|
|
44
|
+
} else if (this.platform.isLinux) {
|
|
45
|
+
if (this.platform.commandExists('apt')) {
|
|
46
|
+
this.platform.exec('sudo apt update && sudo apt install -y rclone', { silent: false, stdio: 'inherit' });
|
|
47
|
+
} else if (this.platform.commandExists('dnf')) {
|
|
48
|
+
this.platform.exec('sudo dnf install -y rclone', { silent: false, stdio: 'inherit' });
|
|
49
|
+
} else if (this.platform.commandExists('pacman')) {
|
|
50
|
+
this.platform.exec('sudo pacman -S --noconfirm rclone', { silent: false, stdio: 'inherit' });
|
|
51
|
+
} else {
|
|
52
|
+
this.platform.exec('curl https://rclone.org/install.sh | sudo bash', { silent: false, stdio: 'inherit' });
|
|
53
|
+
}
|
|
54
|
+
} else if (this.platform.isWindows) {
|
|
55
|
+
if (this.platform.commandExists('winget')) {
|
|
56
|
+
this.platform.exec('winget install -e --id Rclone.Rclone', { silent: false, stdio: 'inherit' });
|
|
57
|
+
} else if (this.platform.commandExists('choco')) {
|
|
58
|
+
this.platform.exec('choco install rclone -y', { silent: false, stdio: 'inherit' });
|
|
59
|
+
} else {
|
|
60
|
+
this.logger.error('Please install rclone manually: https://rclone.org/install/');
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (this.isRcloneInstalled()) {
|
|
66
|
+
this.logger.success('rclone installed successfully');
|
|
67
|
+
return true;
|
|
68
|
+
} else {
|
|
69
|
+
this.logger.warning('rclone installation may require terminal restart');
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
} catch (error) {
|
|
73
|
+
this.logger.error(`Failed to install rclone: ${error.message}`);
|
|
74
|
+
this.logger.info('Install manually: https://rclone.org/install/');
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Verify rclone installation
|
|
81
|
+
*/
|
|
82
|
+
verify() {
|
|
83
|
+
if (this.isRcloneInstalled()) {
|
|
84
|
+
try {
|
|
85
|
+
const version = this.platform.exec('rclone version', { silent: true });
|
|
86
|
+
const versionMatch = version?.match(/rclone v([\d.]+)/);
|
|
87
|
+
if (versionMatch) {
|
|
88
|
+
this.logger.success(`rclone: v${versionMatch[1]}`);
|
|
89
|
+
} else {
|
|
90
|
+
this.logger.success('rclone: Installed');
|
|
91
|
+
}
|
|
92
|
+
} catch {
|
|
93
|
+
this.logger.success('rclone: Installed');
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const remotes = this.getRemotes();
|
|
97
|
+
if (remotes.length > 0) {
|
|
98
|
+
this.logger.info(`Remotes: ${remotes.join(', ')}`);
|
|
99
|
+
} else {
|
|
100
|
+
this.logger.info('No remotes configured (run: rclone config)');
|
|
101
|
+
}
|
|
102
|
+
return true;
|
|
103
|
+
} else {
|
|
104
|
+
this.logger.warning('rclone: Not installed');
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
25
109
|
/**
|
|
26
110
|
* Get available rclone remotes
|
|
27
111
|
*/
|
package/lib/installer.js
CHANGED
|
@@ -12,7 +12,8 @@ const {
|
|
|
12
12
|
ConfigInstaller,
|
|
13
13
|
ClaudeZInstaller,
|
|
14
14
|
ClaudeHUDInstaller,
|
|
15
|
-
CommandsInstaller
|
|
15
|
+
CommandsInstaller,
|
|
16
|
+
CloudManager
|
|
16
17
|
} = require('./components');
|
|
17
18
|
|
|
18
19
|
class Installer {
|
|
@@ -29,6 +30,7 @@ class Installer {
|
|
|
29
30
|
this.claudeZ = new ClaudeZInstaller();
|
|
30
31
|
this.claudeHUD = new ClaudeHUDInstaller();
|
|
31
32
|
this.commands = new CommandsInstaller();
|
|
33
|
+
this.cloud = new CloudManager();
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
/**
|
|
@@ -38,7 +40,7 @@ class Installer {
|
|
|
38
40
|
this.logger.banner();
|
|
39
41
|
|
|
40
42
|
// Step 1: Check dependencies
|
|
41
|
-
this.logger.step('Step 1/
|
|
43
|
+
this.logger.step('Step 1/9: Checking Dependencies');
|
|
42
44
|
const depsOk = await this.checkDependencies();
|
|
43
45
|
if (!depsOk) {
|
|
44
46
|
this.logger.error('Dependency check failed. Please install required dependencies.');
|
|
@@ -112,12 +114,33 @@ class Installer {
|
|
|
112
114
|
this.logger.info('Skipping Claude HUD installation');
|
|
113
115
|
}
|
|
114
116
|
|
|
115
|
-
// Step 7: Install
|
|
116
|
-
this.logger.step('Step 7/
|
|
117
|
+
// Step 7: Install rclone for cloud backup (optional)
|
|
118
|
+
this.logger.step('Step 7/9: Cloud Backup Setup (rclone)');
|
|
119
|
+
let installRclone = false;
|
|
120
|
+
let rcloneInstalled = this.cloud.isRcloneInstalled();
|
|
121
|
+
|
|
122
|
+
if (rcloneInstalled) {
|
|
123
|
+
this.logger.success('rclone is already installed');
|
|
124
|
+
} else {
|
|
125
|
+
if (useExisting && existingSettings.rclone !== undefined) {
|
|
126
|
+
installRclone = existingSettings.rclone;
|
|
127
|
+
} else {
|
|
128
|
+
installRclone = await this.prompts.confirm('Install rclone for cloud backup (Google Drive, Dropbox, S3)?', true);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
if (installRclone) {
|
|
132
|
+
rcloneInstalled = await this.cloud.installRclone();
|
|
133
|
+
} else {
|
|
134
|
+
this.logger.info('Skipping rclone installation');
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Step 8: Install ZuppaClaude Commands
|
|
139
|
+
this.logger.step('Step 8/9: Installing ZuppaClaude Slash Commands');
|
|
117
140
|
const cmdsInstalled = await this.commands.install();
|
|
118
141
|
|
|
119
|
-
// Step
|
|
120
|
-
this.logger.step('Step
|
|
142
|
+
// Step 9: Verification
|
|
143
|
+
this.logger.step('Step 9/9: Verifying Installation');
|
|
121
144
|
console.log('');
|
|
122
145
|
|
|
123
146
|
this.superClaude.verify();
|
|
@@ -125,6 +148,7 @@ class Installer {
|
|
|
125
148
|
this.config.verify();
|
|
126
149
|
if (installClaudeZ) this.claudeZ.verify();
|
|
127
150
|
if (installClaudeHUD) this.claudeHUD.verify();
|
|
151
|
+
this.cloud.verify();
|
|
128
152
|
this.commands.verify();
|
|
129
153
|
|
|
130
154
|
// Save settings
|
|
@@ -132,6 +156,7 @@ class Installer {
|
|
|
132
156
|
specKit: installSpecKit,
|
|
133
157
|
claudeZ: installClaudeZ,
|
|
134
158
|
claudeHUD: installClaudeHUD,
|
|
159
|
+
rclone: rcloneInstalled,
|
|
135
160
|
zaiApiKey: zaiApiKey ? this.settings.encodeApiKey(zaiApiKey) : null,
|
|
136
161
|
installedAt: new Date().toISOString(),
|
|
137
162
|
version: require('../package.json').version
|
|
@@ -147,6 +172,7 @@ class Installer {
|
|
|
147
172
|
config: cfgInstalled,
|
|
148
173
|
claudeZ: czInstalled,
|
|
149
174
|
claudeHUD: hudInstalled,
|
|
175
|
+
rclone: rcloneInstalled,
|
|
150
176
|
commands: cmdsInstalled
|
|
151
177
|
});
|
|
152
178
|
|
|
@@ -214,6 +240,7 @@ class Installer {
|
|
|
214
240
|
{ name: 'CLAUDE.md', installed: results.config },
|
|
215
241
|
{ name: 'Claude-Z', installed: results.claudeZ },
|
|
216
242
|
{ name: 'Claude HUD', installed: results.claudeHUD },
|
|
243
|
+
{ name: 'rclone', installed: results.rclone },
|
|
217
244
|
{ name: 'ZC Commands', installed: results.commands }
|
|
218
245
|
];
|
|
219
246
|
|
|
@@ -251,6 +278,11 @@ class Installer {
|
|
|
251
278
|
console.log(' For Claude HUD: run setup-claude-hud');
|
|
252
279
|
console.log('');
|
|
253
280
|
}
|
|
281
|
+
|
|
282
|
+
if (results.rclone) {
|
|
283
|
+
console.log(' Cloud backup ready! Configure with: rclone config');
|
|
284
|
+
console.log('');
|
|
285
|
+
}
|
|
254
286
|
}
|
|
255
287
|
}
|
|
256
288
|
|