grov 0.5.6 → 0.5.8
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 +44 -2
- package/dist/cli.js +8 -0
- package/dist/commands/doctor.js +4 -3
- package/dist/commands/init.js +23 -10
- package/dist/commands/login.js +11 -2
- 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
|
|
@@ -166,7 +168,9 @@ grov proxy-status # Show active sessions
|
|
|
166
168
|
grov status # Show captured tasks
|
|
167
169
|
grov login # Login to cloud dashboard
|
|
168
170
|
grov sync # Sync memories to team dashboard
|
|
171
|
+
grov doctor # Diagnose setup issues
|
|
169
172
|
grov disable # Disable grov
|
|
173
|
+
grov uninstall # Remove all grov data and config
|
|
170
174
|
grov drift-test # Test drift detection
|
|
171
175
|
```
|
|
172
176
|
|
|
@@ -213,7 +217,7 @@ Browse, search, and manage your team's AI knowledge at [app.grov.dev](https://ap
|
|
|
213
217
|
## Environment Variables
|
|
214
218
|
|
|
215
219
|
```bash
|
|
216
|
-
# Required for
|
|
220
|
+
# Required for memory sync and drift detection
|
|
217
221
|
export ANTHROPIC_API_KEY=sk-ant-...
|
|
218
222
|
|
|
219
223
|
# Optional
|
|
@@ -222,7 +226,45 @@ export PROXY_HOST=127.0.0.1 # Proxy host
|
|
|
222
226
|
export PROXY_PORT=8080 # Proxy port
|
|
223
227
|
```
|
|
224
228
|
|
|
225
|
-
Without an API key, Grov uses basic extraction and
|
|
229
|
+
Without an API key, Grov uses basic extraction and **memories will not sync**.
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Troubleshooting
|
|
234
|
+
|
|
235
|
+
### Memories not syncing?
|
|
236
|
+
|
|
237
|
+
Run `grov doctor` to diagnose:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
grov doctor
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
This checks your proxy, API key, login, sync status, and local database.
|
|
244
|
+
|
|
245
|
+
### ⚠️ Common Issue: API Key Not Persisting
|
|
246
|
+
|
|
247
|
+
**Using `export ANTHROPIC_API_KEY=...` directly in terminal only works in THAT terminal session.** When you open a new terminal, the key is gone.
|
|
248
|
+
|
|
249
|
+
**Fix:** Add the key to your shell profile so it persists:
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
# For zsh (macOS default):
|
|
253
|
+
echo 'export ANTHROPIC_API_KEY=sk-ant-...' >> ~/.zshrc
|
|
254
|
+
source ~/.zshrc
|
|
255
|
+
|
|
256
|
+
# For bash:
|
|
257
|
+
echo 'export ANTHROPIC_API_KEY=sk-ant-...' >> ~/.bashrc
|
|
258
|
+
source ~/.bashrc
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Then run `grov doctor` to verify:
|
|
262
|
+
|
|
263
|
+
```
|
|
264
|
+
✓ ANTHROPIC_API_KEY: Set
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Get your API key at: https://console.anthropic.com/settings/keys
|
|
226
268
|
|
|
227
269
|
---
|
|
228
270
|
|
package/dist/cli.js
CHANGED
|
@@ -114,6 +114,14 @@ program
|
|
|
114
114
|
const { logout } = await import('./commands/logout.js');
|
|
115
115
|
await logout();
|
|
116
116
|
}));
|
|
117
|
+
// grov uninstall - Full cleanup
|
|
118
|
+
program
|
|
119
|
+
.command('uninstall')
|
|
120
|
+
.description('Remove all grov data and configuration')
|
|
121
|
+
.action(safeAction(async () => {
|
|
122
|
+
const { uninstall } = await import('./commands/uninstall.js');
|
|
123
|
+
await uninstall();
|
|
124
|
+
}));
|
|
117
125
|
// grov sync - Configure cloud sync
|
|
118
126
|
program
|
|
119
127
|
.command('sync')
|
package/dist/commands/doctor.js
CHANGED
|
@@ -19,10 +19,11 @@ export async function doctor() {
|
|
|
19
19
|
// Check API key
|
|
20
20
|
const apiKey = process.env.ANTHROPIC_API_KEY;
|
|
21
21
|
const hasApiKey = !!(apiKey && apiKey.length > 10);
|
|
22
|
+
const shell = process.env.SHELL?.includes('zsh') ? '~/.zshrc' : '~/.bashrc';
|
|
22
23
|
const apiKeyFix = process.platform === 'win32'
|
|
23
|
-
? '
|
|
24
|
-
: 'export ANTHROPIC_API_KEY=sk-ant-...
|
|
25
|
-
printCheck('ANTHROPIC_API_KEY', hasApiKey, 'Set', '
|
|
24
|
+
? 'setx ANTHROPIC_API_KEY "sk-ant-..." (permanent) or add to System Environment Variables'
|
|
25
|
+
: `Add to ${shell}: echo 'export ANTHROPIC_API_KEY=sk-ant-...' >> ${shell} && source ${shell}`;
|
|
26
|
+
printCheck('ANTHROPIC_API_KEY', hasApiKey, 'Set', 'NOT SET - memories will not sync!', apiKeyFix);
|
|
26
27
|
// Check login
|
|
27
28
|
const creds = readCredentials();
|
|
28
29
|
printCheck('Login', !!creds, creds ? `Logged in as ${creds.email}` : 'Not logged in', 'Not logged in', 'grov login');
|
package/dist/commands/init.js
CHANGED
|
@@ -13,24 +13,37 @@ 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';
|
|
17
|
+
const shell = process.env.SHELL?.includes('zsh') ? '~/.zshrc' : '~/.bashrc';
|
|
16
18
|
if (!process.env.ANTHROPIC_API_KEY) {
|
|
17
|
-
console.log('\n'
|
|
18
|
-
console.log(' ANTHROPIC_API_KEY
|
|
19
|
-
console.log('
|
|
20
|
-
console.log('\
|
|
21
|
-
console.log(' 1. Get your API key at:');
|
|
19
|
+
console.log('\n╔═══════════════════════════════════════════════════════════╗');
|
|
20
|
+
console.log('║ ⚠️ ANTHROPIC_API_KEY NOT SET - MEMORIES WILL NOT SYNC! ║');
|
|
21
|
+
console.log('╚═══════════════════════════════════════════════════════════╝');
|
|
22
|
+
console.log('\n 1. Get your API key at:');
|
|
22
23
|
console.log(' https://console.anthropic.com/settings/keys\n');
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
+
}
|
|
37
|
+
console.log(' The key will be gone when you open a new terminal.\n');
|
|
26
38
|
}
|
|
27
39
|
else {
|
|
28
|
-
console.log('\n ANTHROPIC_API_KEY found');
|
|
40
|
+
console.log('\n ✓ ANTHROPIC_API_KEY found');
|
|
29
41
|
}
|
|
30
42
|
console.log('\n--- Next Steps ---');
|
|
31
43
|
console.log('1. Terminal 1: grov proxy');
|
|
32
44
|
console.log('2. Terminal 2: claude');
|
|
33
|
-
console.log('\
|
|
45
|
+
console.log('\nRun "grov doctor" to verify your setup is complete.');
|
|
46
|
+
console.log('Grov will automatically capture reasoning and inject context.');
|
|
34
47
|
}
|
|
35
48
|
catch (error) {
|
|
36
49
|
console.error('Failed to configure grov:', error instanceof Error ? error.message : 'Unknown error');
|
package/dist/commands/login.js
CHANGED
|
@@ -142,8 +142,17 @@ export async function login() {
|
|
|
142
142
|
console.log('║ ║');
|
|
143
143
|
console.log('╚═════════════════════════════════════════╝');
|
|
144
144
|
console.log(`\nSyncing to: ${selectedTeam.name}`);
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
// Check API key and warn if not set
|
|
146
|
+
if (!process.env.ANTHROPIC_API_KEY) {
|
|
147
|
+
const shell = process.env.SHELL?.includes('zsh') ? '~/.zshrc' : '~/.bashrc';
|
|
148
|
+
console.log('\n⚠️ WARNING: ANTHROPIC_API_KEY not set - memories will NOT sync!');
|
|
149
|
+
console.log('\n Add PERMANENTLY to your shell (not just "export"):');
|
|
150
|
+
console.log(` echo 'export ANTHROPIC_API_KEY=sk-ant-...' >> ${shell}`);
|
|
151
|
+
console.log(` source ${shell}`);
|
|
152
|
+
console.log('\n Get your key at: https://console.anthropic.com/settings/keys');
|
|
153
|
+
}
|
|
154
|
+
console.log('\nRun "grov doctor" to verify your setup is complete.');
|
|
155
|
+
console.log('View memories at: https://app.grov.dev/memories\n');
|
|
147
156
|
}
|
|
148
157
|
else {
|
|
149
158
|
console.log('\n✓ Logged in. Sync not enabled.');
|
|
@@ -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