get-llms 1.0.3 → 1.0.5
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 +52 -9
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# get-llms
|
|
2
|
-
📚 CLI tool to fetch `llms.txt` files for your npm dependencies
|
|
2
|
+
📚 CLI tool to fetch [`llms.txt`](https://llmstxt.org/) files for your npm dependencies
|
|
3
3
|
|
|
4
4
|
## Install
|
|
5
5
|
|
|
6
|
+
Install it globally
|
|
7
|
+
|
|
6
8
|
```bash
|
|
7
9
|
npm install -g get-llms
|
|
8
10
|
```
|
|
9
11
|
|
|
12
|
+
or just run it with npx
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx get-llms
|
|
16
|
+
```
|
|
17
|
+
|
|
10
18
|
## Usage
|
|
11
19
|
|
|
12
20
|
### Basic Usage
|
|
@@ -226,7 +234,7 @@ By default, files are saved to:
|
|
|
226
234
|
```
|
|
227
235
|
docs/llms/
|
|
228
236
|
├── zod.txt
|
|
229
|
-
├──
|
|
237
|
+
├── react-native.txt
|
|
230
238
|
└── [package-name].txt
|
|
231
239
|
```
|
|
232
240
|
|
|
@@ -243,19 +251,19 @@ The tool searches for `llms.txt` files in this order:
|
|
|
243
251
|
|
|
244
252
|
```mermaid
|
|
245
253
|
flowchart TD
|
|
246
|
-
A([package]) --> B{is there an 'llms'
|
|
254
|
+
A([package]) --> B{is there an 'llms' key in the 'package.json'?}
|
|
247
255
|
|
|
248
256
|
B -- yes --> FOUND([we've found it])
|
|
249
|
-
B -- no --> C{is the package
|
|
257
|
+
B -- no --> C{is the package homepage a github link?}
|
|
250
258
|
|
|
251
|
-
C -- yes --> D{does the github
|
|
252
|
-
C -- no --> E{does 'link/llms.txt'
|
|
259
|
+
C -- yes --> D{does the github 'readme.txt' mention the word 'docs' in a hyperlink?}
|
|
260
|
+
C -- no --> E{does 'link/llms.txt' return a txt file?}
|
|
253
261
|
|
|
254
262
|
D -- yes --> E
|
|
255
|
-
D -- no --> NOFILE([there likely isn't a
|
|
263
|
+
D -- no --> NOFILE([there likely isn't a 'llms.txt' for that package Either use the 'README.txt', or use an external service like context7])
|
|
256
264
|
|
|
257
265
|
E -- yes --> FOUND
|
|
258
|
-
E -- no --> F{does 'link/docs/llms.txt'
|
|
266
|
+
E -- no --> F{does 'link/docs/llms.txt' return a txt file?}
|
|
259
267
|
|
|
260
268
|
F -- yes --> FOUND
|
|
261
269
|
F -- no --> NOFILE
|
|
@@ -268,4 +276,39 @@ flowchart TD
|
|
|
268
276
|
|
|
269
277
|
## Contributing
|
|
270
278
|
|
|
271
|
-
Issues and contributions welcome! Report bugs at: https://github.com/balazshevesi/get-llms/issues
|
|
279
|
+
Issues and contributions welcome! Report bugs at: [https://github.com/balazshevesi/get-llms/issues](https://github.com/balazshevesi/get-llms/issues), or contact me on twitter [@balazs_hevesi](https://x.com/balazs_hevesi)
|
|
280
|
+
|
|
281
|
+
## Roadmap and vision
|
|
282
|
+
|
|
283
|
+
The [`llms.txt`](https://llmstxt.org/) spec is still young and un-opinionated. Some packages and some documentation-sites already ship an `llms.txt` file, others don’t, and the ones that do sometimes invent their own markdown dialect.
|
|
284
|
+
|
|
285
|
+
As adoption grows we expect the format to stabilise, turning “antigenic-coding” into a first-class workflow.
|
|
286
|
+
|
|
287
|
+
### Specifying `llms.txt`
|
|
288
|
+
|
|
289
|
+
Today the cleanest way to publish documentation with an `llms.txt` is to add an `"llms"` key to `package.json`:
|
|
290
|
+
|
|
291
|
+
```json
|
|
292
|
+
"llms": "./README.txt"
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
When the registry starts indexing that field we’ll be able to fetch the *exact* documentation that and feed it into the coding-agent's context. (this will also require the URLs for fetching documentation versions to be standardized)
|
|
296
|
+
|
|
297
|
+
Example: [zod](https://github.com/colinhacks/zod/blob/main/packages/zod/package.json#L75)
|
|
298
|
+
|
|
299
|
+
### Practical integration
|
|
300
|
+
|
|
301
|
+
Because the format is still fluid, treat `llms.txt` as *best-effort* documentation:
|
|
302
|
+
|
|
303
|
+
- 90 % of the time an agent can slurp the file directly.
|
|
304
|
+
- If it’s 25k tokens or more, you might want to fall back to a cache, a RAG layer, or a service such as [Context7](https://context7.com/). (AI-agents such have a limit on the file sizes they're willing to read, and will truncate the file to fit their context window)
|
|
305
|
+
|
|
306
|
+
### Why this will matter tomorrow
|
|
307
|
+
|
|
308
|
+
Vibe-coded apps are about to become legacy and enter a maintenance phase. When that happens, ai coding-agents will need the docs for **old** versions of the packages. `llms.txt` is the lowest-friction way to provide the ai with the correct documentation.
|
|
309
|
+
|
|
310
|
+
External services (like Context7) are great, but bundling the required context is simpler, cheaper.
|
|
311
|
+
|
|
312
|
+
## License
|
|
313
|
+
|
|
314
|
+
[MIT License](LICENSE)
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "get-llms",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "CLI tool for fetching llms.txt files for all of your dependencies",
|
|
5
|
-
"homepage": "https://github.com/balazshevesi/llms
|
|
5
|
+
"homepage": "https://github.com/balazshevesi/get-llms#readme",
|
|
6
6
|
"bin": {
|
|
7
7
|
"get-llms": "dist/bin/index.js"
|
|
8
8
|
},
|
|
9
9
|
"bugs": {
|
|
10
|
-
"url": "https://github.com/balazshevesi/llms
|
|
10
|
+
"url": "https://github.com/balazshevesi/get-llms/issues"
|
|
11
11
|
},
|
|
12
12
|
"llms": "https://raw.githubusercontent.com/balazshevesi/get-llms/main/README.md",
|
|
13
13
|
"llmsFull": "https://raw.githubusercontent.com/balazshevesi/get-llms/main/README.md",
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "git+https://github.com/balazshevesi/llms
|
|
16
|
+
"url": "git+https://github.com/balazshevesi/get-llms.git"
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"author": "Balazs Hevesi",
|