get-llms 1.0.4 → 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 +45 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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
|
-
|
|
6
|
+
Install it globally
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
9
|
npm install -g get-llms
|
|
10
|
-
```
|
|
10
|
+
```
|
|
11
11
|
|
|
12
12
|
or just run it with npx
|
|
13
13
|
|
|
@@ -251,19 +251,19 @@ The tool searches for `llms.txt` files in this order:
|
|
|
251
251
|
|
|
252
252
|
```mermaid
|
|
253
253
|
flowchart TD
|
|
254
|
-
A([package]) --> B{is there an 'llms'
|
|
254
|
+
A([package]) --> B{is there an 'llms' key in the 'package.json'?}
|
|
255
255
|
|
|
256
256
|
B -- yes --> FOUND([we've found it])
|
|
257
|
-
B -- no --> C{is the package
|
|
257
|
+
B -- no --> C{is the package homepage a github link?}
|
|
258
258
|
|
|
259
|
-
C -- yes --> D{does the github
|
|
260
|
-
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?}
|
|
261
261
|
|
|
262
262
|
D -- yes --> E
|
|
263
|
-
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])
|
|
264
264
|
|
|
265
265
|
E -- yes --> FOUND
|
|
266
|
-
E -- no --> F{does 'link/docs/llms.txt'
|
|
266
|
+
E -- no --> F{does 'link/docs/llms.txt' return a txt file?}
|
|
267
267
|
|
|
268
268
|
F -- yes --> FOUND
|
|
269
269
|
F -- no --> NOFILE
|
|
@@ -276,4 +276,39 @@ flowchart TD
|
|
|
276
276
|
|
|
277
277
|
## Contributing
|
|
278
278
|
|
|
279
|
-
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)
|