From 6fcdb95f0a8a151ecf3272c7e8d05bea0c03e211 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Wed, 30 Aug 2023 13:35:15 +0200 Subject: [PATCH] cli: Improve `rad init` help output --- radicle-cli/examples/rad-auth.md | 7 +++++-- radicle-cli/src/commands/auth.rs | 18 ++++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/radicle-cli/examples/rad-auth.md b/radicle-cli/examples/rad-auth.md index 5452266f..748fd1c6 100644 --- a/radicle-cli/examples/rad-auth.md +++ b/radicle-cli/examples/rad-auth.md @@ -7,9 +7,12 @@ $ rad auth --alias "alice" Initializing your radicle 👾 identity ✓ Creating your Ed25519 keypair... -✓ Your Radicle DID is did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi. This identifies your device. +✓ Your Radicle DID is did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi. This identifies your device. Run `rad self` to show it at all times. +✓ You're all set. -To create a radicle project, run `rad init` from a git repository. +To create a radicle project, run `rad init` from a Git repository. +To clone a project, run `rad clone `. For example, `rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5` clones the Radicle 'heartwood' project. +To get a list of all commands, run `rad help`. ``` You can get the above information at all times using the `self` command: diff --git a/radicle-cli/src/commands/auth.rs b/radicle-cli/src/commands/auth.rs index ca04a93e..5572d578 100644 --- a/radicle-cli/src/commands/auth.rs +++ b/radicle-cli/src/commands/auth.rs @@ -132,15 +132,25 @@ pub fn init(options: Options) -> anyhow::Result<()> { } term::success!( - "Your Radicle DID is {}. This identifies your device.", - term::format::highlight(profile.did()) + "Your Radicle DID is {}. This identifies your device. Run {} to show it at all times.", + term::format::highlight(profile.did()), + term::format::command("rad self") ); - + term::success!("You're all set."); term::blank(); term::info!( - "To create a radicle project, run {} from a git repository.", + "To create a radicle project, run {} from a Git repository.", term::format::command("rad init") ); + term::info!( + "To clone a project, run {}. For example, {} clones the Radicle 'heartwood' project.", + term::format::command("rad clone "), + term::format::command("rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5") + ); + term::info!( + "To get a list of all commands, run {}.", + term::format::command("rad help"), + ); Ok(()) }