Files
heartwood/radicle-cli/examples/rad-auth.md
T
Alexis Sellier 0a93fa833e cli: Simplify & improve CLI output
Improvements to the CLI output as well as converging towards
`termion` as a backend.

The crates we were using for prompting and spinners were based on
a terminal backend called `console`, which is not really used
anywhere else. There were also limitations in terms of the output
of these crates.

Therefore, we switched to the `inquire` crate for prompting, using
the `termion` backend, which is very standard.

Additionally, we simplify the terminal output to use symbols:

! for Warning
✓ for Success
✗ for Error

... Instead of a mix of words and symbols.

We also include a modified version of the `yansi` crate which plays
well with our table formatting functions by automatically truncating
and padding output in a unicode-aware way.
2023-02-27 17:10:52 +01:00

27 lines
871 B
Markdown

Initializing a new identity with `rad-auth`.
The example below is run with `RAD_PASSPHRASE` set.
```
$ rad auth
Initializing your 🌱 profile and identity
✓ Creating your 🌱 Ed25519 keypair...
✓ Your Radicle ID is did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi. This identifies your device.
👉 To create a radicle project, run `rad init` from a git repository.
```
You can get the above information at all times using the `self` command:
```
$ rad self
ID did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
Node ID z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
Key (hash) SHA256:UIedaL6Cxm6OUErh9GQUzzglSk7VpQlVTI1TAFB/HWA
Key (full) ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHahWSBEpuT1ESZbynOmBNkLBSnR32Ar4woZqSV2YNH1
Storage (git) [..]/storage
Storage (keys) [..]/keys
Node (socket) [..]/node/radicle.sock
```