projectdetect 0.1.0

Detect what kind of project a directory is (Go, Node, Rust, Xcode, …) by canonical indicator files, with recursive discovery, file→project resolution, and custom YAML/CEL types.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Print the detected project type(s) for each path argument.
//!
//! ```sh
//! cargo run --example detect -- /path/to/repo [more paths...]
//! ```

fn main() {
    let reg = projectdetect::Registry::with_builtins();
    for arg in std::env::args().skip(1) {
        let mut names: Vec<String> = reg.detect(&arg).into_iter().map(|m| m.r#type).collect();
        names.sort();
        println!("{arg}\t{names:?}");
    }
}