diff --git a/radicle-cli/src/commands.rs b/radicle-cli/src/commands.rs index b9424b4d..f97f68a2 100644 --- a/radicle-cli/src/commands.rs +++ b/radicle-cli/src/commands.rs @@ -14,6 +14,8 @@ pub mod rad_init; pub mod rad_inspect; #[path = "commands/ls.rs"] pub mod rad_ls; +#[path = "commands/rm.rs"] +pub mod rad_rm; #[path = "commands/self.rs"] pub mod rad_self; #[path = "commands/track.rs"] diff --git a/radicle-cli/src/commands/help.rs b/radicle-cli/src/commands/help.rs index 094d85a3..41a5179a 100644 --- a/radicle-cli/src/commands/help.rs +++ b/radicle-cli/src/commands/help.rs @@ -22,6 +22,7 @@ const COMMANDS: &[Help] = &[ rad_ls::HELP, rad_edit::HELP, rad_inspect::HELP, + rad_rm::HELP, HELP, ]; diff --git a/radicle-cli/src/commands/rm.rs b/radicle-cli/src/commands/rm.rs new file mode 100644 index 00000000..bfd8f1e2 --- /dev/null +++ b/radicle-cli/src/commands/rm.rs @@ -0,0 +1,101 @@ +use std::ffi::OsString; +use std::fs; +use std::str::FromStr; + +use anyhow::anyhow; + +use radicle::identity::project::Id; +use radicle::storage::ReadStorage; + +use crate::commands::rad_untrack; +use crate::terminal as term; +use crate::terminal::args::{Args, Error, Help}; + +pub const HELP: Help = Help { + name: "rm", + description: "Remove radicle projects", + version: env!("CARGO_PKG_VERSION"), + usage: r#" +Usage + + rad rm [