Skip to main content

zoi_cli/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(
14    args: CreateCommand,
15    yes: bool,
16    plugin_manager: Option<&crate::pkg::plugin::PluginManager>,
17) -> Result<()> {
18    pkg::create::run(&args.source, args.app_name, yes, plugin_manager)
19}