Herd
1445 lines. Herd came to play.
Herd is a game-changing platform that revolutionizes browser automation. With its powerful SDK, you can effortlessly manage thousands of browsers across devices in real-time, without the hassle of complex infrastructure. It's like Puppeteer on steroids!
Not sure yours is this good? Check it →
Herd's llms.txt Insights
Overachiever
51 sections. Most sites can barely manage 3. This one went all in.
War and Peace vibes
1445 lines. They really wanted AI to understand them.
Double trouble
Runs both llms.txt and llms-full.txt. Someone takes this seriously.
What's inside Herd's llms.txt
Herd's llms.txt contains 9 sections:
- Automation Basics
- javascript
- JavaScript SDK
- Setting Up Your Environment
- Initializing the Client
- Connecting to a Device
- Creating a Page and Navigating
- Extracting Basic Information
- Proper Resource Management
How does Herd's llms.txt compare?
| Herd | Directory Avg | Top Performer | |
|---|---|---|---|
| Lines | 1,445 | 1029 | 163,447 |
| Sections | 51 | 17 | 3207 |
Cool table. Now the real question — where do you land? Find out →
Herd's llms.txt preview
First 100 of 1,445 lines
Herd Documentation
==
Herd is a powerful platform and SDK for automating your own browser, ten or millions of them. Similar to Puppeteer but with support for multiple devices and real-time events, and no infrastructure to setup.
Document: Automation Basics
URL: https://herd.garden/docs/automation-basics
# Automation Basics
Welcome to Monitoro Herd! This guide will walk you through creating your first browser automation step-by-step. We'll start with the basics and gradually build up to more complex examples, explaining each concept along the way.
## javascript
## JavaScript SDK
### Setting Up Your Environment
Before writing any code, you'll need to set up your JavaScript environment and install the Herd SDK:
1. Make sure you have Node.js installed (version 14 or higher recommended)
2. Create a new project directory
3. Install the SDK using npm:
Code (bash):
npm install @monitoro/herd
### Initializing the Client
The first step in any automation is to initialize the Herd client with your API credentials:
Code (javascript):
// Import the Herd client
import { HerdClient } from '@monitoro/herd';
// Initialize the client with your API URL and token
const client = new HerdClient('your-token');
// Always initialize the client before using it
await client.initialize();
Note: **Note:** Replace the token with your actual Herd API token from your dashboard.
### Connecting to a Device
After initializing the client, you need to connect to a device (browser) that will perform the automation:
Code (javascript):
// Get a list of available devices
const devices = await client.listDevices();
// Connect to the first available device
const device = devices[0];
console.log(`Connected to device: ${device.id}`);
This code retrieves all devices registered to your account and connects to the first one. In a production environment, you might want to select a specific device based on its properties or availability.
### Creating a Page and Navigating
Now that you're connected to a device, you can create a new browser page and navigate to a website:
Code (javascript):
// Create a new page in the browser
const page = await device.newPage();
// Navigate to a website
await page.goto('https://example.com');
console.log('Successfully navigated to example.com');
The `goto` method loads the specified URL and waits for the page to load. By default, it waits until the page's `load` event is fired, but you can customize this behavior with options.
### Extracting Basic Information
One of the most common automation tasks is extracting information from web pages. Here's how to extract basic elements:
Code (javascript):
// Extract content using CSS selectors
const content = await page.extract({
title: 'h1', // Extracts the main heading
description: 'p', // Extracts the first paragraph
link: 'a' // Extracts the first link text
});
// Display the extracted content
console.log('Extracted content:');
console.log(`Title: ${content.title}`);
console.log(`Description: ${content.description}`);
console.log(`Link: ${content.link}`);
The `extract` method uses CSS selectors to find elements on the page and extract their text content. This is a powerful way to scrape structured data from websites.
### Proper Resource Management
Always remember to close resources when you're done with them to prevent memory leaks:
Code (javascript):
// Close the page when doneWhat is llms.txt?
llms.txt is an open standard that helps AI language models understand your website. By placing a structured markdown file at /llms.txt, websites provide AI search engines like ChatGPT, Claude, and Perplexity with a clear map of their content, services, and documentation. Companies like Herd use it to ensure AI accurately represents their brand when answering user queries. Read the spec.
Herd showed up. Where's yours?
1000+ companies didn't overthink it. 60 seconds. Go.
Check your site →