concept-analyzer 0.1.1

A unified pipeline that analyzes code repositories and extracts first-principles instructions for AI agents
Documentation
//! Example showing how to use the pipeline with custom configuration
//!
//! Run with: cargo run --example custom_pipeline

use anyhow::Result;
use concept_analyzer::UnifiedAnalysisPipeline;
use std::path::Path;

#[tokio::main]
async fn main() -> Result<()> {
    env_logger::init();

    let llm_api_key = std::env::var("LLM_API_KEY")?;

    // Create pipeline with custom worker count
    let pipeline = UnifiedAnalysisPipeline::new(
        llm_api_key,
        16, // Use 16 workers for faster processing
    )
    .await?;

    // Analyze multiple repositories
    let repos = vec![
        ("./project1", "results/project1.json"),
        ("./project2", "results/project2.json"),
        ("./project3", "results/project3.json"),
    ];

    for (repo_path, s3_key) in repos {
        println!("\nAnalyzing: {}", repo_path);

        let s3_url = pipeline
            .analyze_and_publish(Path::new(repo_path), "my-bucket", s3_key)
            .await?;

        println!("✓ Published to: {}", s3_url);
    }

    Ok(())
}