zoi/cmd/
create.rs

1use crate::pkg;
2use anyhow::Result;
3use clap::Parser;
4
5#[derive(Parser)]
6pub struct CreateCommand {
7    /// The source of the package (name, @repo/name, path to .pkg.lua, or URL)
8    pub source: String,
9    /// The application name and directory to create (defaults to package name)
10    pub app_name: Option<String>,
11}
12
13pub fn run(args: CreateCommand, yes: bool) -> Result<()> {
14    pkg::create::run(&args.source, args.app_name, yes)
15}