@fettstorch/clai 0.1.5 → 0.1.7
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/.vscode/settings.json +10 -0
- package/README.md +3 -2
- package/biome.json +33 -0
- package/dist/cli.js +5875 -5611
- package/dist/index.js +1570 -1365
- package/package.json +36 -36
- package/src/cli.ts +148 -140
- package/src/index.ts +28 -25
- package/src/openai.ts +29 -25
- package/src/scraper.ts +246 -40
- package/src/summarizer.ts +44 -41
- package/tsconfig.json +14 -14
package/README.md
CHANGED
@@ -33,9 +33,9 @@ clai "how tall can giraffes get?"
|
|
33
33
|
clai how tall can giraffes get
|
34
34
|
clai
|
35
35
|
```
|
36
|
-
<img width="
|
36
|
+
<img width="400" src="https://github.com/user-attachments/assets/002b3e05-5c77-4f4d-8aa3-ecb7412e9538" />
|
37
37
|
|
38
|
-
The
|
38
|
+
The cli expects either a URL or a search query or no argument at all.
|
39
39
|
When passing a search query without quotes make sure not to use any special characters, that might confuse the CLI e.g. ?
|
40
40
|
|
41
41
|
### Programmatic API
|
@@ -49,6 +49,7 @@ const { summary, links, sources } = await clai('https://example.com', 'your-open
|
|
49
49
|
- Needs a better prompt in order to more reliably stop narrating a page's content and rather cite it in a more concise manner.
|
50
50
|
- The first answer's stream animation appears to sometimes not be skippable using 'enter'
|
51
51
|
- large sites might surpass the token limit (currently not handled gracefully)
|
52
|
+
- occasionally clai doesn't find search results (this is not handled gracefully)
|
52
53
|
|
53
54
|
## License
|
54
55
|
|
package/biome.json
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "https://biomejs.dev/schemas/1.9.3/schema.json",
|
3
|
+
"vcs": {
|
4
|
+
"enabled": false,
|
5
|
+
"clientKind": "git",
|
6
|
+
"useIgnoreFile": false
|
7
|
+
},
|
8
|
+
"files": {
|
9
|
+
"ignoreUnknown": false,
|
10
|
+
"ignore": []
|
11
|
+
},
|
12
|
+
"formatter": {
|
13
|
+
"enabled": true,
|
14
|
+
"indentStyle": "tab"
|
15
|
+
},
|
16
|
+
"organizeImports": {
|
17
|
+
"enabled": true
|
18
|
+
},
|
19
|
+
"linter": {
|
20
|
+
"enabled": true,
|
21
|
+
"rules": {
|
22
|
+
"recommended": true
|
23
|
+
}
|
24
|
+
},
|
25
|
+
"javascript": {
|
26
|
+
"formatter": {
|
27
|
+
"quoteStyle": "single",
|
28
|
+
"lineEnding": "lf",
|
29
|
+
"trailingCommas": "all",
|
30
|
+
"semicolons": "asNeeded"
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|