Files
heartwood/radicle-cli/examples/rad-inspect.md
T
cloudhead b24f8a30d6 node: Update inventory when unseeding
Previously, our advertized inventory was not always correct: when we
stopped seeding a repository, it was still advertised as part of our
inventory until node restart, because the `Storage` type doesn't have
access to seeding policies.

In this change, we remove the concept of inventory from `Storage` and
make the authoritative place for it the routing table in our database.

To make this work, we have to add our node to the database on profile
creation, to not violate the foreign key constraint on the routing
table. Hence, the tests are changed to include our alias which is now
always available.
2024-06-12 15:36:34 +02:00

83 lines
1.8 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
To display a repository's identifier, or *RID*, you may use the `rad inspect`
command from inside a working copy:
```
$ rad inspect
rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
```
As a shorthand, you can also simply use `rad .`:
```
$ rad .
rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
```
It's also possible to display all of the repository's git references:
```
$ rad inspect --refs
z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
└── refs
   ├── cobs
   │   └── xyz.radicle.id
   │      └── 0656c217f917c3e06234771e9ecae53aba5e173e
   ├── heads
   │   └── master
   └── rad
      ├── id
      └── sigrefs
```
And sigrefs:
```
$ rad inspect --sigrefs
z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi f209c9f68aa689af24220a20462e13ee9dfb2a95
```
Or display the repository identity's payload and delegates:
```
$ rad inspect --payload
{
"xyz.radicle.project": {
"defaultBranch": "master",
"description": "Radicle Heartwood Protocol & Stack",
"name": "heartwood"
}
}
$ rad inspect --delegates
did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi (alice)
```
Finally, the `--history` flag allows you to examine the identity document's
history:
```
$ rad inspect --history
commit 0656c217f917c3e06234771e9ecae53aba5e173e
blob d96f425412c9f8ad5d9a9a05c9831d0728e2338d
date Thu, 15 Dec 2022 17:28:04 +0000
Initialize identity
{
"payload": {
"xyz.radicle.project": {
"defaultBranch": "master",
"description": "Radicle Heartwood Protocol & Stack",
"name": "heartwood"
}
},
"delegates": [
"did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi"
],
"threshold": 1
}
```
The identity document is the metadata associated with a repository, that is
only changeable by delegates.