Skip to main content

Module stack_detector

Module stack_detector 

Source
Expand description

Project stack detection for Limitless CLI.

Scans a repository root for marker files and returns the primary ProjectStack with exact runtime versions where possible.

§Detection priorities

A project can contain markers for several stacks (e.g. a Node app that is also deployed with Docker). When that happens, the primary stack is chosen in this order: Node > Python > Rust > Docker, and any secondary stacks are logged as warnings.

§Example detection outputs

  package.json + .nvmrc  ->  ProjectStack::Node { version: "18.12.0", package_manager: "npm" }
  pyproject.toml         ->  ProjectStack::Python { version: ">=3.12" }
  Cargo.toml             ->  ProjectStack::Rust { version: "1.98.0" }
  Dockerfile             ->  ProjectStack::Docker
  (nothing)              ->  ProjectStack::Unknown  (+ "run from project root" hint)

Functions§

detect_stack
Identifies the project stack in repo_path.
run_check