Files
heartwood/radicle-cli/examples/rad-unseed.md
T
cloudhead f0e2018ac5 cli: Correctly update inventory with seed commands
Make sure our inventory is up to date with the policy changes, as well
as when publishing private repositories.
2024-06-12 15:36:34 +02:00

3.0 KiB

Let's say we have a local repository we've initialized:

$ rad ls
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Name        RID                                 Visibility   Head      Description                        │
├───────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ heartwood   rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji   public       f2de534   Radicle Heartwood Protocol & Stack │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯

We could stop seeding it if we didn't want other nodes to fetch it from us:

$ rad unseed rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
✓ Seeding policy for rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji removed

Now, if we run rad ls, we see it's gone:

$ rad ls
Nothing to show.
$ rad ls --seeded
Nothing to show.

However, with the --all flag, we can see it still, but as local-only:

$ rad ls --all
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Name        RID                                 Visibility   Head      Description                        │
├───────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ heartwood   rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji   local        f2de534   Radicle Heartwood Protocol & Stack │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Hence, we also see that it isn't in our inventory and isn't seeded:

$ rad node inventory
$ rad seed
No seeding policies to show.