collet 0.0.1

A collection of developer tools for code analysis and agent workflows
Documentation
  • Coverage
  • 100%
    1 out of 1 items documented0 out of 0 items with examples
  • Size
  • Source code size: 15.03 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 627.37 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 42s Average build duration of successful builds.
  • all releases: 41s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • epicsagas
collet-0.0.1 has been yanked.

collet

A collection of developer tools for code analysis and agent workflows.

This crate provides a stable, unified API for working with code analysis tools. Currently it provides repository code structure mapping via tree-sitter.

Features

  • 🛠️ Unified API for developer tools
  • 📊 Repository code structure analysis (treemap)
  • 🔒 Stable, versioned interfaces
  • 🚀 Production-ready quality

Installation

cargo add collet

Usage

Repository Analysis

use collet::{generate_map, Config, Language};
use std::path::Path;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Generate a code map for the current directory
    let config = Config::default();
    let map = generate_map(Path::new("."), config)?;

    // Print information about found files
    for file in &map.files {
        println!(
            "{}: {} lines ({})",
            file.path.display(),
            file.lines,
            file.language.as_deref().unwrap_or("unknown")
        );
    }

    Ok(())
}

Filter by Language

use collet::{generate_map, Config, Language, OutputFormat};

let config = Config {
    format: OutputFormat::Json,
    language: Some(Language::Rust),
    max_depth: 10,
};

let map = generate_map(Path::new("."), config)?;

Re-exported Types

All common types from submodules are re-exported at the crate root:

  • Config - Configuration for map generation
  • Language - Supported programming languages
  • OutputFormat - Output format options
  • RepoMap - Generated repository map
  • Symbol - Code symbols (functions, classes, etc.)
  • SymbolKind - Categories of code symbols
  • MapError - Error types

Access submodules directly for more specialized types:

use collet::treemap;

// Direct access to the treemap module
let map = treemap::generate_map(path, config)?;

Supported Languages

  • Rust (.rs)
  • Python (.py)
  • JavaScript (.js, .jsx, .ts, .tsx)

License

Apache-2.0