🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

llmstxt

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

llmstxt - npm Package Compare versions

Comparing version
0.5.0
to
0.6.0
+2
-1
package.json
{
"version": "0.5.0",
"version": "0.6.0",
"name": "llmstxt",

@@ -32,2 +32,3 @@ "description": "convert `sitemap.xml` to `llms.txt`",

"commander": "^11.1.0",
"ora": "^5.4.1",
"picomatch": "^4.0.2",

@@ -34,0 +35,0 @@ "replace-in-file": "^8.2.0",

@@ -10,3 +10,3 @@ # llmstxt

```sh
$ npx llmstxt gen https://dotenvx.com/sitemap.xml
$ npx -y llmstxt gen https://dotenvx.com/sitemap.xml
```

@@ -17,3 +17,3 @@

```
$ npx llmstxt gen https://dotenvx.com/sitemap.xml
$ npx -y llmstxt gen https://dotenvx.com/sitemap.xml
- [dotenvx run -f](https://dotenvx.com/docs/advanced/run-f.html): Compose multiple .env files for environment variables loading, as you need.

@@ -128,3 +128,3 @@ - [dotenvx run --log-level](https://dotenvx.com/docs/advanced/run-log-level.html): Set `--log-level` to whatever you wish.

```sh
npx llmstxt gen https://dotenvx.com/sitemap.xml -ep "**/privacy**" -ep "**/terms**" -ep "**/blog/**" -ep "**/stats/**" -ep "**/support/**" -rt 's/\| dotenvx//' -t 'dotenvx' > llms.txt
npx -y llmstxt@latest gen https://dotenvx.com/sitemap.xml -ep "**/privacy**" -ep "**/terms**" -ep "**/blog/**" -ep "**/stats/**" -ep "**/support/**" -rt 's/\| dotenvx//' -t 'dotenvx' > llms.txt
```

@@ -7,2 +7,3 @@ const { URL } = require('url')

const sitemap = new Sitemapper()
const ora = require('ora')

@@ -104,2 +105,4 @@ async function fetchHtml (url) {

const spinner = ora('generating').start()
// include/exclude logic

@@ -117,5 +120,8 @@ const excludePaths = options.excludePath || []

try {
spinner.text = sitemapUrl
const sites = await sitemap.fetch(sitemapUrl)
for (const url of sites.sites) {
spinner.text = url
// path excluded - don't process it

@@ -162,3 +168,2 @@ if (isExcluded(url)) {

sections[section].push(line)
}

@@ -182,2 +187,4 @@ } catch (error) {

spinner.text = options.title || root[0].title
// handle sections

@@ -191,2 +198,4 @@ for (const section in sections) {

output += `- [${title}](${url}): ${description}`
spinner.text = title
}

@@ -196,2 +205,3 @@ output += '\n'

}
spinner.succeed('generated')

@@ -198,0 +208,0 @@ console.log(output)