feat: Add environment setup command

Adds `weevil setup` with two modes:
- System setup: installs default SDKs and dependencies
- Project setup: reads .weevil.toml and installs project requirements

Provides platform-specific installation instructions when auto-install fails.
Never leaves users wondering what to do next.
This commit is contained in:
Eric Ratliff
2026-01-29 22:01:35 -06:00
parent 6b6ba058b7
commit 4e9575cc4f
3 changed files with 525 additions and 1 deletions

View File

@@ -33,6 +33,12 @@ enum Commands {
android_sdk: Option<String>,
},
/// Setup development environment (system or project)
Setup {
/// Path to project directory (optional - without it, sets up system)
path: Option<String>,
},
/// Upgrade an existing project to the latest generator version
Upgrade {
/// Path to the project directory
@@ -99,6 +105,9 @@ fn main() -> Result<()> {
Commands::New { name, ftc_sdk, android_sdk } => {
commands::new::create_project(&name, ftc_sdk.as_deref(), android_sdk.as_deref())
}
Commands::Setup { path } => {
commands::setup::setup_environment(path.as_deref())
}
Commands::Upgrade { path } => {
commands::upgrade::upgrade_project(&path)
}