diff --git a/radicle-cli/examples/rad-node.md b/radicle-cli/examples/rad-node.md index 6f9824c4..a57265c3 100644 --- a/radicle-cli/examples/rad-node.md +++ b/radicle-cli/examples/rad-node.md @@ -2,22 +2,20 @@ The radicle node is our daemon friend that is running as a background process. It allows us to interact with the network as well as storing some key data that we may be interested in. -
-🚧 `rad node start` is under construction 🚧 If the node is not running we can start it by using the `rad node start` command: - - - -
+``` +$ rad node start +✓ Node is already running. +``` We can confirm the status of the node at any time by using the `rad node status` command (or just `rad node` for short): ``` $ rad node status -✓ Node is running +✓ Node is running. ``` The node also allows us to connect with other nodes in the @@ -79,13 +77,17 @@ $ rad node routing ╰─────────────────────────────────────────────────────╯ ``` -
-🚧 `rad node stop` is under construction 🚧 Finally, if we want to stop the daemon process from running we can issue the `rad node stop` command: - - - - -
+``` +$ rad node stop +✓ Stopping node... +``` + +Running the command again gives us an error: + +``` +$ rad node stop +✗ Stopping node... error: node is not running +``` diff --git a/radicle-cli/src/commands/node/control.rs b/radicle-cli/src/commands/node/control.rs index f65f9f33..7b513a3f 100644 --- a/radicle-cli/src/commands/node/control.rs +++ b/radicle-cli/src/commands/node/control.rs @@ -21,7 +21,7 @@ pub fn start( profile: &Profile, ) -> anyhow::Result<()> { if node.is_running() { - term::success!("Node is already running"); + term::success!("Node is already running."); return Ok(()); } let envs = if profile.keystore.is_encrypted()? { @@ -142,9 +142,13 @@ pub fn connect(node: &mut Node, nid: NodeId, addr: Address) -> anyhow::Result<() pub fn status(node: &Node, profile: &Profile) -> anyhow::Result<()> { if node.is_running() { - term::success!("Node is {}", term::format::positive("running")); + term::success!("Node is {}.", term::format::positive("running")); } else { - term::info!("Node is {}", term::format::negative("stopped")); + term::info!("Node is {}.", term::format::negative("stopped")); + term::info!( + "To start it, run {}.", + term::format::command("rad node start") + ); return Ok(()); }