How sitylist94/ml-cli works
mlcli is a Rust CLI for interactively configuring and generating machine-learning project directories. Its principal workflow collects project details and options, checks whether the selected template is supported, renders the Scikit-learn template with project context, then writes generated files and optional setup scaffolding while refusing to overwrite an existing directory. The README also documents embedded templates and conditional project features; PyTorch and TensorFlow are selectable but not implemented. The map follows the shown runtime calls and documented capabilities; no unsampled command behavior is inferred.
Main entry points: renderer.rs Template renderer · engine.rs Generation engine · init.rs Init prompts · scaffold.rs Optional scaffolding
Components 13
CLI and configuration
- CLI dispatch
src/cli.rs - Init prompts
src/commands/init.rs - Project options
src/config.rs
Generation pipeline
- Template registry
src/templates/registry.rs - Generation engine
src/generator/engine.rs - Template renderer
src/generator/renderer.rs - Render context
src/generator/context.rs - Embedded templates
src/embedded_templates.rs - File operations
src/generator/filesystem.rs
Project contents
- Scikit-learn template
templates/scikit-learn - Optional scaffolding
src/generator/scaffold.rs - Generated project
Other components
- CLI user
Connections 16
- CLI user → CLI dispatch: runs
README.md - CLI dispatch → Init prompts: dispatches
src/cli.rs - CLI user → Init prompts: answers prompts
src/commands/init.rs - Init prompts → Project options: builds options
src/commands/init.rs - Init prompts → Generation engine: starts generation
src/commands/init.rs - Generation engine → Project options: passes config
src/generator/engine.rs - Generation engine → Template registry: checks support
src/generator/engine.rs - Generation engine → Template renderer: renders supported
src/generator/engine.rs - Template renderer → Embedded templates: reads templates
src/generator/renderer.rs - Template renderer → Render context: builds context
src/generator/renderer.rs - Template renderer → File operations: collects and writes
src/generator/renderer.rs - Template renderer → Optional scaffolding: writes options
src/generator/renderer.rs - Scikit-learn template → Embedded templates: embedded at build
README.md - Template renderer → Generated project: creates output
src/generator/renderer.rs - Optional scaffolding → File operations: writes files
src/generator/scaffold.rs - Optional scaffolding → Generated project: adds optional files
src/generator/scaffold.rs