https://github.com/alexstevovich/robotsforce1
[Node.js] The presidential package of robots.txt generators. A joint task force of elite directives securing the perimeter against unauthorized bots.
https://github.com/alexstevovich/robotsforce1
micro nodejs webbuild webstandard
Last synced: about 1 month ago
JSON representation
[Node.js] The presidential package of robots.txt generators. A joint task force of elite directives securing the perimeter against unauthorized bots.
- Host: GitHub
- URL: https://github.com/alexstevovich/robotsforce1
- Owner: alexstevovich
- License: apache-2.0
- Created: 2025-03-08T20:22:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-08T22:42:35.000Z (over 1 year ago)
- Last Synced: 2025-12-26T15:07:55.244Z (5 months ago)
- Topics: micro, nodejs, webbuild, webstandard
- Language: JavaScript
- Homepage:
- Size: 52.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RobotsForce1
> ### _Define the crawl zones. Control the AO._
**RobotsForce1** – The presidential package of robots.txt generators. A joint task force of elite directives, securing the perimeter against unauthorized bots. Precision, control, and absolute authority over your domain.
[](https://www.npmjs.com/package/robotsforce1)
[](LICENSE)
## Features
- **Elegant API** - Simple, direct, and fluent.
- **Full Compliance** - Supports the entire standard.
- **Zero dependencies** - atomic, minimal, unopinionated.
## Installation
```sh
npm install robotsforce1
```
## Usage
```js
import { RobotsTxt } from 'robotsforce1';
const robots = new RobotsTxt();
robots.agent('*').allow('/').disallow('/private');
robots.agent('Googlebot').allow('/').disallow('/sensitive').delay(5);
robots.sitemap('https://example.com/sitemap.xml');
console.log(robots.toRobotsTxt());
/**
User-agent: *
Allow: /
Disallow: /private
User-agent: Googlebot
Allow: /
Disallow: /sensitive
Crawl-delay: 5
Sitemap: https://example.com/sitemap.xml
*/
```
## Need sitemap.xml?
I provide a package for `sitemap.xml` as well.
If you use these together your project will be backed by some of the most elite webstandard writers in the world—if not the most elite.
[https://github.com/alexstevovich/sitemapteam6](https://github.com/alexstevovich/sitemapteam6)
## License
Licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).