Repository: tangle-network/gadget (language: rust)

Issue:
Rename Gadget CLI to be Tangle CLI.
## Overview
The goal of this task is to have the `cargo gadget` sub-command to be more unique to tangle network, so we are going to rename the CLI to be `cargo-tangle` instead of `cargo-gadget`, so the final result would be `cargo tangle gadget <OTHER_COMMANDs>`

### Checklist
- [x] Rename the [Gadget CLI](./cli) crate name from `cargo-gadget` to be `cargo-tangle`
- [x] Make `gadget` as a sub-command of the CLI.
- [x] Move all other sub-commands (create, deploy, ..etc) to be a sub-command to the gadget sub-command.

### Expected Result
Running `cargo tangle gadget create` and `cargo tangle gadget deploy` to work.


Discussion / hints:

Fix patch:
diff --git a/cli/Cargo.toml b/cli/Cargo.toml
index b5f01446c..ba5aad839 100644
--- a/cli/Cargo.toml
+++ b/cli/Cargo.toml
@@ -1,5 +1,5 @@
 [package]
-name = "cargo-gadget"
+name = "cargo-tangle"
 version = "0.1.0"
 authors.workspace = true
 edition.workspace = true
diff --git a/cli/src/main.rs b/cli/src/main.rs
index 20ec157e4..60500fefd 100644
--- a/cli/src/main.rs
+++ b/cli/src/main.rs
@@ -7,10 +7,10 @@ mod deploy;
 mod foundry;
 mod signer;
 
-/// Gadget CLI tool
+/// Tangle CLI tool
 #[derive(Parser, Debug)]
 #[clap(
-    bin_name = "cargo-gadget",
+    bin_name = "cargo-tangle",
     version,
     propagate_version = true,
     arg_required_else_help = true
@@ -26,6 +26,15 @@ struct Cli {
 
 #[derive(Subcommand, Debug)]
 enum Commands {
+    /// Gadget subcommand
+    Gadget {
+        #[command(subcommand)]
+        subcommand: GadgetCommands,
+    },
+}
+
+#[derive(Subcommand, Debug)]
+enum GadgetCommands {
     /// Create a new blueprint
     Create {
         /// The name of the blueprint
@@ -50,7 +59,7 @@ async fn main() -> color_eyre::Result<()> {
     init_tracing_subscriber();
     let args: Vec<String> = if std::env::args()
         .nth(1)
-        .map(|x| x.eq("gadget"))
+        .map(|x| x.eq("tangle"))
         .unwrap_or(false)
     {
         // since this runs as a cargo subcommand, we need to skip the first argument
@@ -64,22 +73,24 @@ async fn main() -> color_eyre::Result<()> {
     let cli = Cli::parse_from(args);
 
     match cli.command {
-        Commands::Create { name } => {
-            println!("Generating blueprint with name: {}", name);
-            create::new_blueprint(&name);
-        }
-        Commands::Deploy { rpc_url, package } => {
-            let manifest_path = cli
-                .manifest
-                .manifest_path
-                .unwrap_or_else(|| PathBuf::from("Cargo.toml"));
-            deploy::deploy_to_tangle(deploy::Opts {
-                rpc_url,
-                manifest_path,
-                pkg_name: package,
-            })
-            .await?;
-        }
+        Commands::Gadget { subcommand } => match subcommand {
+            GadgetCommands::Create { name } => {
+                println!("Generating blueprint with name: {}", name);
+                create::new_blueprint(&name);
+            }
+            GadgetCommands::Deploy { rpc_url, package } => {
+                let manifest_path = cli
+                    .manifest
+                    .manifest_path
+                    .unwrap_or_else(|| PathBuf::from("Cargo.toml"));
+                deploy::deploy_to_tangle(deploy::Opts {
+                    rpc_url,
+                    manifest_path,
+                    pkg_name: package,
+                })
+                .await?;
+            }
+        },
     }
     Ok(())
 }


Test patch: