@1a35e1/sonar-cli 0.4.1 → 0.4.2
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 +36 -7
- package/package.json +1 -1
- package/dist/commands/sync/bookmarks.js +0 -35
- package/dist/commands/sync/likes.js +0 -35
package/README.md
CHANGED
|
@@ -229,10 +229,32 @@ sonar topics suggest --json # raw suggestions as JSON
|
|
|
229
229
|
|
|
230
230
|
Requires `OPENAI_API_KEY` or `ANTHROPIC_API_KEY` depending on vendor.
|
|
231
231
|
|
|
232
|
-
###
|
|
232
|
+
### Account
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
sonar account # list accounts, * marks active
|
|
236
|
+
sonar account add <key> # add account (random name)
|
|
237
|
+
sonar account add <key> --alias work # add with custom name
|
|
238
|
+
sonar account switch <name> # switch active account
|
|
239
|
+
sonar account rename <old> <new> # rename an account
|
|
240
|
+
sonar account remove <name> # remove (--force if active)
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Refresh
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
sonar refresh # full pipeline (all steps)
|
|
247
|
+
sonar refresh --bookmarks # just sync bookmarks from X
|
|
248
|
+
sonar refresh --likes # just sync likes from X
|
|
249
|
+
sonar refresh --graph # just rebuild social graph
|
|
250
|
+
sonar refresh --tweets # just index tweets
|
|
251
|
+
sonar refresh --suggestions # just regenerate suggestions
|
|
252
|
+
sonar refresh --likes --bookmarks # any combo of flags
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### Status
|
|
233
256
|
|
|
234
257
|
```bash
|
|
235
|
-
sonar refresh # full pipeline: graph → tweets → suggestions
|
|
236
258
|
sonar status # account status, queue activity
|
|
237
259
|
sonar status --watch # poll every 2s
|
|
238
260
|
```
|
|
@@ -245,17 +267,24 @@ sonar later --id <suggestion_id> # save for later
|
|
|
245
267
|
sonar archive --id <suggestion_id> # archive a suggestion
|
|
246
268
|
```
|
|
247
269
|
|
|
248
|
-
###
|
|
270
|
+
### Data
|
|
249
271
|
|
|
250
272
|
```bash
|
|
251
|
-
sonar
|
|
252
|
-
sonar
|
|
273
|
+
sonar data pull # download feed/suggestions/topics to local SQLite
|
|
274
|
+
sonar data backup # backup local DB
|
|
275
|
+
sonar data restore --from <path> # restore from backup
|
|
276
|
+
sonar data verify # integrity check
|
|
277
|
+
sonar data path # show DB location
|
|
278
|
+
sonar data sql # query helper
|
|
253
279
|
```
|
|
254
280
|
|
|
255
|
-
###
|
|
281
|
+
### Config
|
|
256
282
|
|
|
257
283
|
```bash
|
|
258
|
-
sonar
|
|
284
|
+
sonar config # show current config
|
|
285
|
+
sonar config setup --key=<API_KEY> # legacy setup
|
|
286
|
+
sonar config set vendor anthropic # set AI vendor
|
|
287
|
+
sonar config skill --install # install OpenClaw skill (--force to overwrite)
|
|
259
288
|
```
|
|
260
289
|
|
|
261
290
|
---
|
package/package.json
CHANGED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
3
|
-
import { Box, Text, useApp } from 'ink';
|
|
4
|
-
import { gql } from '../../lib/client.js';
|
|
5
|
-
import { Spinner } from '../../components/Spinner.js';
|
|
6
|
-
export default function SyncBookmarks() {
|
|
7
|
-
const { exit } = useApp();
|
|
8
|
-
const [status, setStatus] = useState('pending');
|
|
9
|
-
const [error, setError] = useState(null);
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
async function run() {
|
|
12
|
-
setStatus('running');
|
|
13
|
-
try {
|
|
14
|
-
await gql('mutation SyncBookmarks { syncBookmarks }');
|
|
15
|
-
setStatus('ok');
|
|
16
|
-
}
|
|
17
|
-
catch (err) {
|
|
18
|
-
setStatus('failed');
|
|
19
|
-
setError(err instanceof Error ? err.message : String(err));
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
run();
|
|
23
|
-
}, []);
|
|
24
|
-
useEffect(() => {
|
|
25
|
-
if (status === 'ok' || status === 'failed')
|
|
26
|
-
exit();
|
|
27
|
-
}, [status]);
|
|
28
|
-
if (status === 'running') {
|
|
29
|
-
return _jsx(Spinner, { label: "Syncing bookmarks..." });
|
|
30
|
-
}
|
|
31
|
-
if (status === 'failed') {
|
|
32
|
-
return _jsxs(Text, { color: "red", children: ["Error: ", error] });
|
|
33
|
-
}
|
|
34
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: "green", children: "\u2713 Bookmark sync queued" }), _jsxs(Text, { dimColor: true, children: ["Run ", _jsx(Text, { color: "cyan", children: "sonar status --watch" }), " to monitor progress."] })] }));
|
|
35
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
3
|
-
import { Box, Text, useApp } from 'ink';
|
|
4
|
-
import { gql } from '../../lib/client.js';
|
|
5
|
-
import { Spinner } from '../../components/Spinner.js';
|
|
6
|
-
export default function SyncLikes() {
|
|
7
|
-
const { exit } = useApp();
|
|
8
|
-
const [status, setStatus] = useState('pending');
|
|
9
|
-
const [error, setError] = useState(null);
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
async function run() {
|
|
12
|
-
setStatus('running');
|
|
13
|
-
try {
|
|
14
|
-
await gql('mutation SyncLikes { syncLikes }');
|
|
15
|
-
setStatus('ok');
|
|
16
|
-
}
|
|
17
|
-
catch (err) {
|
|
18
|
-
setStatus('failed');
|
|
19
|
-
setError(err instanceof Error ? err.message : String(err));
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
run();
|
|
23
|
-
}, []);
|
|
24
|
-
useEffect(() => {
|
|
25
|
-
if (status === 'ok' || status === 'failed')
|
|
26
|
-
exit();
|
|
27
|
-
}, [status]);
|
|
28
|
-
if (status === 'running') {
|
|
29
|
-
return _jsx(Spinner, { label: "Syncing likes..." });
|
|
30
|
-
}
|
|
31
|
-
if (status === 'failed') {
|
|
32
|
-
return _jsxs(Text, { color: "red", children: ["Error: ", error] });
|
|
33
|
-
}
|
|
34
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: "green", children: "\u2713 Likes sync queued" }), _jsxs(Text, { dimColor: true, children: ["Run ", _jsx(Text, { color: "cyan", children: "sonar status --watch" }), " to monitor progress."] })] }));
|
|
35
|
-
}
|