Point it at a directory and it tells you what kind of project lives there. No config files, no setup — just file detection.
use ;
if let Some = detect
Features
- 32 ecosystems detected out of the box
- Priority-ordered — language-specific files win over generic build systems
- Ecosystem metadata — Node.js package manager, Flutter vs Dart, Stack vs Cabal, etc.
- Directory walking —
detect_walksearches up the directory tree for monorepo support - Artifact directories — know what to clean for every ecosystem
- Zero dependencies beyond
serde_json(for package.json parsing)
Supported Ecosystems
| Priority | File | Ecosystem | Label |
|---|---|---|---|
| 1 | Cargo.toml |
Rust | "Rust" |
| 2 | go.mod |
Go | "Go" |
| 3 | mix.exs |
Elixir | "Elixir" |
| 4 | pyproject.toml / setup.py / setup.cfg |
Python | "Python" |
| 5 | package.json |
Node.js | "Node.js" |
| 6 | build.gradle(.kts) or pom.xml + Kotlin sources |
Kotlin | "Kotlin" |
| 7 | build.gradle / build.gradle.kts |
Gradle | "Gradle" |
| 8 | pom.xml |
Maven | "Maven" |
| 9 | build.sbt |
Scala | "Scala" |
| 10 | Gemfile |
Ruby | "Ruby" |
| 11 | Package.swift |
Swift | "Swift" |
| 12 | *.xcworkspace / *.xcodeproj |
Xcode (Objective-C / Objective-C++) | "Xcode" |
| 13 | build.zig |
Zig | "Zig" |
| 14 | *.csproj / *.sln |
.NET | ".NET" |
| 15 | composer.json |
PHP | "PHP" |
| 16 | pubspec.yaml |
Dart / Flutter | "Dart" / "Flutter" |
| 17 | stack.yaml / *.cabal |
Haskell | "Haskell" |
| 18 | project.clj / deps.edn |
Clojure | "Clojure" |
| 19 | rebar.config |
Erlang | "Erlang" |
| 20 | dune-project |
OCaml | "OCaml" |
| 21 | cpanfile / Makefile.PL |
Perl | "Perl" |
| 22 | Project.toml |
Julia | "Julia" |
| 23 | DESCRIPTION / renv.lock |
R | "R" |
| 24 | *.nimble |
Nim | "Nim" |
| 25 | shard.yml |
Crystal | "Crystal" |
| 26 | v.mod |
V | "V" |
| 27 | gleam.toml |
Gleam | "Gleam" |
| 28 | *.rockspec |
Lua | "Lua" |
| 29 | MODULE.bazel / WORKSPACE |
Bazel | "Bazel" |
| 30 | meson.build |
Meson | "Meson" |
| 31 | CMakeLists.txt |
CMake | "CMake" |
| 32 | Makefile |
Make | "Make" |
Usage
Basic detection
use ;
let kind = detect.unwrap;
println!; // "Rust"
println!; // "Cargo.toml"
Walk up the directory tree
use detect_walk;
// Running from src/lib/ inside a Cargo workspace?
// detect_walk finds the Cargo.toml in the parent.
if let Some = detect_walk
Ecosystem metadata
use ;
match detect
Clean artifacts
use detect;
if let Some = detect
Node.js helpers
use ;
use Path;
let dir = new;
if node_has_script
if node_has_bin
if let Some = detect_node_workspace
License
MIT