A comprehensive suite of Rust crates for browser automation, web scraping, and AI integration.
The Llama Ecosystem is a collection of modular, interoperable Rust crates designed for sophisticated web automation, scraping, and AI integration. Each crate focuses on solving a specific problem while working seamlessly with the others.
π llama-headers-rs
A sophisticated HTTP header generation library for realistic browser emulation.
- Realistic browser fingerprinting
- User-agent generation
- Language and locale-aware headers
- Referer generation
- Modern security-related headers
use llama_headers_rs::{get_header, Config};
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Generate realistic browser headers
let header = get_header("https://example.com", None)?;
println!("{}", header);
Ok(())
}π llama-moonlight
A powerful browser automation framework with MLX and Llama integration.
- Multi-browser support (Chrome, Firefox, Safari)
- Headless & headed modes
- Network interception
- Screenshots & videos
- Stealth mode via llama-headers-rs integration
- AI integration
use llama_moonlight_core::{Moonlight, BrowserType};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Initialize the framework
let moonlight = Moonlight::new().await?;
// Launch a browser
let browser_type = moonlight.browser_type("chromium").unwrap();
let browser = browser_type.launch().await?;
// Create a new page
let context = browser.new_context().await?;
let page = context.new_page().await?;
// Navigate to a URL
page.goto("https://example.com").await?;
// Take a screenshot
page.screenshot("example.png").await?;
Ok(())
}Tools for bypassing Cloudflare and other anti-bot protections.
- TLS fingerprint customization
- JavaScript challenge solver
- Proxy rotation
- Rate limiting and request pacing
MLX integration for AI-powered automation.
- MLX model loading and inference
- Computer vision for visual analysis
- Text recognition and processing
- Decision making for automation scenarios
AI agent abstractions for automation tasks.
- Autonomous web agent framework
- Task planning and execution
- LLM integration
- Memory and context management
The ecosystem includes comprehensive test scripts for each crate and the entire ecosystem.
Test a specific crate:
cd llama-headers-rs
./test-and-publish.shTest the entire ecosystem:
./scripts/master-test.sh- Clone the repository:
git clone https://github.com/yourusername/llama-ecosystem.git
cd llama-ecosystem- Build the crates:
cargo build --all- Run the examples:
# For llama-headers-rs
cargo run --example simple --package llama-headers-rs
# For llama-moonlight CLI
cargo run --package llama-moonlight -- screenshot https://example.com --output example.pngEach crate includes comprehensive documentation. Generate the documentation with:
cargo doc --no-deps --open- Web Scraping: Extract data from websites while avoiding bot detection
- Browser Automation: Automate UI testing and web interactions
- Data Collection: Gather information across multiple sites
- Security Testing: Test web applications for security vulnerabilities
- AI-Powered Automation: Combine browser automation with AI for intelligent decision-making
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.