Expand description
§Skeletor
A blazing-fast Rust scaffolding tool with YAML-driven snapshots.
Skeletor provides both a CLI interface and a programmatic API for:
- Creating file/directory structures from YAML configurations
- Taking snapshots of existing directory structures
- Extracting metadata from configuration files
§Usage as a Library
use skeletor::SkeletorConfig;
use std::path::Path;
// Create a new scaffolding configuration
let config = SkeletorConfig::from_yaml_str(r#"
directories:
src:
main.rs: |
fn main() {
println!("Hello, world!");
}
"#)?;
// Apply the configuration
let result = skeletor::apply_config(&config, Path::new("./my-project"), false, false)?;
println!("Created {} files and {} directories", result.files_created, result.dirs_created);Re-exports§
pub use crate::config::SkeletorConfig;pub use crate::config::SkeletorMetadata;pub use crate::errors::SkeletorError;
Modules§
- apply
- config
- errors
- info
- output
- snapshot
- tasks
- utils
- Shared utility functions for reducing code duplication across modules
Structs§
- Apply
Result - Result of applying a configuration
- Snapshot
Result - Result of taking a directory snapshot
Functions§
- apply_
config - Basic apply function for library usage
- build_
cli - Build the CLI interface with three subcommands:
apply,snapshotandinfoThis function is used by both the main CLI and by tests to ensure consistency