diff --git a/radicle-cli/examples/rad-unseed-many.md b/radicle-cli/examples/rad-unseed-many.md new file mode 100644 index 00000000..edeca073 --- /dev/null +++ b/radicle-cli/examples/rad-unseed-many.md @@ -0,0 +1,22 @@ +It is possible to use the `rad unseed` command to specify multiple RIDs at the +same time, where each repository specified will stop being seeded. + +Let's say we have multiple local repositories we've initialized: + +``` +$ rad ls +╭───────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ Name RID Visibility Head Description │ +├───────────────────────────────────────────────────────────────────────────────────────────────────────────┤ +│ heartwood rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji public f2de534 Radicle Heartwood Protocol & Stack │ +│ nixpkgs rad:zyFFr2iwoTEfNF4jGNZHuoy7odMh public f2de534 Home for Nix Packages │ +╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +``` + +We could stop seeding them if we didn't want other nodes to fetch them from us: + +``` +$ rad unseed rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji rad:zyFFr2iwoTEfNF4jGNZHuoy7odMh +✓ Seeding policy for rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji removed +✓ Seeding policy for rad:zyFFr2iwoTEfNF4jGNZHuoy7odMh removed +``` diff --git a/radicle-cli/src/commands/unseed.rs b/radicle-cli/src/commands/unseed.rs index ca4c7df8..04d64fc7 100644 --- a/radicle-cli/src/commands/unseed.rs +++ b/radicle-cli/src/commands/unseed.rs @@ -1,6 +1,7 @@ use std::ffi::OsString; use anyhow::anyhow; +use nonempty::NonEmpty; use radicle::{prelude::*, Node}; @@ -14,10 +15,10 @@ pub const HELP: Help = Help { usage: r#" Usage - rad unseed [