grov 0.5.7 → 0.5.9
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 +3 -0
- package/dist/cli.js +12 -1
- package/dist/commands/init.js +14 -5
- package/dist/commands/uninstall.d.ts +1 -0
- package/dist/commands/uninstall.js +49 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -71,6 +71,8 @@ grov proxy # Start (keep running)
|
|
|
71
71
|
|
|
72
72
|
Then use Claude Code normally in another terminal. That's it.
|
|
73
73
|
|
|
74
|
+
> **Important:** Your `ANTHROPIC_API_KEY` must be set permanently in your shell profile, not just with `export` in a terminal. See [Troubleshooting](#troubleshooting) for setup instructions.
|
|
75
|
+
|
|
74
76
|
For team sync:
|
|
75
77
|
```bash
|
|
76
78
|
grov login # Authenticate via GitHub
|
|
@@ -168,6 +170,7 @@ grov login # Login to cloud dashboard
|
|
|
168
170
|
grov sync # Sync memories to team dashboard
|
|
169
171
|
grov doctor # Diagnose setup issues
|
|
170
172
|
grov disable # Disable grov
|
|
173
|
+
grov uninstall # Remove all grov data and config
|
|
171
174
|
grov drift-test # Test drift detection
|
|
172
175
|
```
|
|
173
176
|
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import 'dotenv/config';
|
|
3
3
|
import { Command } from 'commander';
|
|
4
|
+
import { createRequire } from 'module';
|
|
4
5
|
import { closeDatabase } from './lib/store.js';
|
|
6
|
+
const require = createRequire(import.meta.url);
|
|
7
|
+
const pkg = require('../package.json');
|
|
5
8
|
// SECURITY: Global error handlers to catch unhandled rejections from dynamic imports
|
|
6
9
|
process.on('unhandledRejection', (reason) => {
|
|
7
10
|
console.error('Error:', reason instanceof Error ? reason.message : 'Unknown error');
|
|
@@ -35,7 +38,7 @@ function safeAction(fn) {
|
|
|
35
38
|
program
|
|
36
39
|
.name('grov')
|
|
37
40
|
.description('Collective AI memory for engineering teams')
|
|
38
|
-
.version(
|
|
41
|
+
.version(pkg.version);
|
|
39
42
|
// grov init - Configure Claude Code to use grov proxy
|
|
40
43
|
program
|
|
41
44
|
.command('init')
|
|
@@ -114,6 +117,14 @@ program
|
|
|
114
117
|
const { logout } = await import('./commands/logout.js');
|
|
115
118
|
await logout();
|
|
116
119
|
}));
|
|
120
|
+
// grov uninstall - Full cleanup
|
|
121
|
+
program
|
|
122
|
+
.command('uninstall')
|
|
123
|
+
.description('Remove all grov data and configuration')
|
|
124
|
+
.action(safeAction(async () => {
|
|
125
|
+
const { uninstall } = await import('./commands/uninstall.js');
|
|
126
|
+
await uninstall();
|
|
127
|
+
}));
|
|
117
128
|
// grov sync - Configure cloud sync
|
|
118
129
|
program
|
|
119
130
|
.command('sync')
|
package/dist/commands/init.js
CHANGED
|
@@ -13,6 +13,7 @@ export async function init() {
|
|
|
13
13
|
}
|
|
14
14
|
console.log(`\nSettings file: ${getSettingsPath()}`);
|
|
15
15
|
// Check for API key and provide helpful instructions
|
|
16
|
+
const isWindows = process.platform === 'win32';
|
|
16
17
|
const shell = process.env.SHELL?.includes('zsh') ? '~/.zshrc' : '~/.bashrc';
|
|
17
18
|
if (!process.env.ANTHROPIC_API_KEY) {
|
|
18
19
|
console.log('\n╔═══════════════════════════════════════════════════════════╗');
|
|
@@ -20,11 +21,19 @@ export async function init() {
|
|
|
20
21
|
console.log('╚═══════════════════════════════════════════════════════════╝');
|
|
21
22
|
console.log('\n 1. Get your API key at:');
|
|
22
23
|
console.log(' https://console.anthropic.com/settings/keys\n');
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
if (isWindows) {
|
|
25
|
+
console.log(' 2. Set PERMANENTLY (run in Command Prompt as Admin):');
|
|
26
|
+
console.log(' setx ANTHROPIC_API_KEY "sk-ant-..."\n');
|
|
27
|
+
console.log(' 3. Restart your terminal\n');
|
|
28
|
+
console.log(' ⚠️ Using "set" alone only works in THAT terminal!');
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
console.log(' 2. Add PERMANENTLY to your shell:');
|
|
32
|
+
console.log(` echo 'export ANTHROPIC_API_KEY=sk-ant-...' >> ${shell}\n`);
|
|
33
|
+
console.log(' 3. Apply changes:');
|
|
34
|
+
console.log(` source ${shell}\n`);
|
|
35
|
+
console.log(' ⚠️ Using "export" alone only works in THAT terminal!');
|
|
36
|
+
}
|
|
28
37
|
console.log(' The key will be gone when you open a new terminal.\n');
|
|
29
38
|
}
|
|
30
39
|
else {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function uninstall(): Promise<void>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// grov uninstall - Full cleanup and removal
|
|
2
|
+
import { rmSync, existsSync } from 'fs';
|
|
3
|
+
import { homedir } from 'os';
|
|
4
|
+
import { join } from 'path';
|
|
5
|
+
import * as readline from 'readline';
|
|
6
|
+
import { setProxyEnv } from '../lib/settings.js';
|
|
7
|
+
import { clearCredentials } from '../lib/credentials.js';
|
|
8
|
+
const GROV_DIR = join(homedir(), '.grov');
|
|
9
|
+
function prompt(question) {
|
|
10
|
+
const rl = readline.createInterface({
|
|
11
|
+
input: process.stdin,
|
|
12
|
+
output: process.stdout,
|
|
13
|
+
});
|
|
14
|
+
return new Promise((resolve) => {
|
|
15
|
+
rl.question(question, (answer) => {
|
|
16
|
+
rl.close();
|
|
17
|
+
resolve(answer.trim().toLowerCase());
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export async function uninstall() {
|
|
22
|
+
console.log('\nGrov Uninstall');
|
|
23
|
+
console.log('==============\n');
|
|
24
|
+
console.log('This will remove:');
|
|
25
|
+
console.log(' - Proxy config from ~/.claude/settings.json (ANTHROPIC_BASE_URL only)');
|
|
26
|
+
console.log(' - Login credentials (~/.grov/credentials.json)');
|
|
27
|
+
console.log(' - Local database (~/.grov/memory.db)');
|
|
28
|
+
console.log(' - All files in ~/.grov/\n');
|
|
29
|
+
const confirm = await prompt('Continue? [y/N]: ');
|
|
30
|
+
if (confirm !== 'y' && confirm !== 'yes') {
|
|
31
|
+
console.log('Cancelled.\n');
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
// Remove proxy config from Claude settings
|
|
35
|
+
const result = setProxyEnv(false);
|
|
36
|
+
if (result.action === 'removed') {
|
|
37
|
+
console.log('✓ Removed proxy config from Claude settings');
|
|
38
|
+
}
|
|
39
|
+
// Clear credentials
|
|
40
|
+
clearCredentials();
|
|
41
|
+
console.log('✓ Cleared login credentials');
|
|
42
|
+
// Remove ~/.grov folder
|
|
43
|
+
if (existsSync(GROV_DIR)) {
|
|
44
|
+
rmSync(GROV_DIR, { recursive: true, force: true });
|
|
45
|
+
console.log('✓ Removed ~/.grov folder (database, logs)');
|
|
46
|
+
}
|
|
47
|
+
console.log('\nGrov data removed. To complete uninstall, run:');
|
|
48
|
+
console.log(' npm uninstall -g grov\n');
|
|
49
|
+
}
|
package/package.json
CHANGED