aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/commands/create_project.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-11 00:15:14 +0900
committernsfisis <nsfisis@gmail.com>2026-02-11 00:15:14 +0900
commit8441abd29aea53719c19f34ec6d542a4575a23c9 (patch)
tree2d5704acdae268253b69c4bb9a37653635037138 /src/commands/create_project.rs
parent9dacb9293f9b995c6c810227f73b4aa5cf019bab (diff)
downloadphp-mozart-8441abd29aea53719c19f34ec6d542a4575a23c9.tar.gz
php-mozart-8441abd29aea53719c19f34ec6d542a4575a23c9.tar.zst
php-mozart-8441abd29aea53719c19f34ec6d542a4575a23c9.zip
define subcommands and options
Diffstat (limited to 'src/commands/create_project.rs')
-rw-r--r--src/commands/create_project.rs105
1 files changed, 105 insertions, 0 deletions
diff --git a/src/commands/create_project.rs b/src/commands/create_project.rs
new file mode 100644
index 0000000..814d33b
--- /dev/null
+++ b/src/commands/create_project.rs
@@ -0,0 +1,105 @@
+use clap::Args;
+
+#[derive(Args)]
+pub struct CreateProjectArgs {
+ /// Package name to install
+ pub package: Option<String>,
+
+ /// Directory to create the project in
+ pub directory: Option<String>,
+
+ /// Version constraint
+ pub version: Option<String>,
+
+ /// Minimum stability (stable, RC, beta, alpha, dev)
+ #[arg(short, long)]
+ pub stability: Option<String>,
+
+ /// Forces installation from package sources when possible
+ #[arg(long)]
+ pub prefer_source: bool,
+
+ /// Forces installation from package dist
+ #[arg(long)]
+ pub prefer_dist: bool,
+
+ /// Forces usage of a specific install method (dist, source, auto)
+ #[arg(long)]
+ pub prefer_install: Option<String>,
+
+ /// Add a custom repository to discover the package
+ #[arg(long)]
+ pub repository: Vec<String>,
+
+ /// [Deprecated] Use --repository instead
+ #[arg(long)]
+ pub repository_url: Option<String>,
+
+ /// Add the repository to the composer.json
+ #[arg(long)]
+ pub add_repository: bool,
+
+ /// Install require-dev packages
+ #[arg(long)]
+ pub dev: bool,
+
+ /// Disables installation of require-dev packages
+ #[arg(long)]
+ pub no_dev: bool,
+
+ /// [Deprecated] Use --no-plugins instead
+ #[arg(long)]
+ pub no_custom_installers: bool,
+
+ /// Skips execution of scripts defined in composer.json
+ #[arg(long)]
+ pub no_scripts: bool,
+
+ /// Do not output download progress
+ #[arg(long)]
+ pub no_progress: bool,
+
+ /// Disable HTTPS and allow HTTP
+ #[arg(long)]
+ pub no_secure_http: bool,
+
+ /// Keep the VCS metadata
+ #[arg(long)]
+ pub keep_vcs: bool,
+
+ /// Force removal of the VCS metadata
+ #[arg(long)]
+ pub remove_vcs: bool,
+
+ /// Skip the install step after project creation
+ #[arg(long)]
+ pub no_install: bool,
+
+ /// Skip the audit step after installation
+ #[arg(long)]
+ pub no_audit: bool,
+
+ /// Audit output format
+ #[arg(long)]
+ pub audit_format: Option<String>,
+
+ /// Do not block on security advisories
+ #[arg(long)]
+ pub no_security_blocking: bool,
+
+ /// Ignore a specific platform requirement
+ #[arg(long)]
+ pub ignore_platform_req: Vec<String>,
+
+ /// Ignore all platform requirements
+ #[arg(long)]
+ pub ignore_platform_reqs: bool,
+
+ /// Interactive package resolution
+ #[arg(long)]
+ pub ask: bool,
+}
+
+pub fn execute(_args: &CreateProjectArgs) {
+ todo!()
+}