Skip to content

Commit

Permalink
docs(rust): Update CLI documentation for the status and reset com…
Browse files Browse the repository at this point in the history
…mands

Signed-off-by: Wryhder <[email protected]>
  • Loading branch information
Wryhder committed Aug 3, 2024
1 parent 50287fd commit 6f09a32
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 0 deletions.
7 changes: 7 additions & 0 deletions implementations/rust/ockam/ockam_command/src/reset/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@ use ockam_node::Context;

use crate::util::async_cmd;

const LONG_ABOUT: &str = include_str!("./static/long_about.txt");
const AFTER_LONG_HELP: &str = include_str!("./static/after_long_help.txt");

/// Removes the local Ockam configuration including all Identities and Nodes
#[derive(Clone, Debug, Args)]
#[command(
long_about = docs::about(LONG_ABOUT),
after_long_help = docs::after_help(AFTER_LONG_HELP)
)]
pub struct ResetCommand {
/// Confirm the reset without prompting
#[arg(long, short)]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This will prompt you for confirmation before proceeding
$ ockam reset

# To confirm without prompting
$ ockam reset -y

# Remove your spaces from the Orchestrator
ockam reset --all
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[TBD]
7 changes: 7 additions & 0 deletions implementations/rust/ockam/ockam_command/src/status/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,15 @@ use ockam_api::nodes::{BackgroundNodeClient, InMemoryNode};
use ockam_api::output::Output;
use ockam_api::{fmt_heading, fmt_log, fmt_separator, fmt_warn};

const LONG_ABOUT: &str = include_str!("./static/long_about.txt");
const AFTER_LONG_HELP: &str = include_str!("./static/after_long_help.txt");

/// Display information about the system's status
#[derive(Clone, Debug, Args)]
#[command(
long_about = docs::about(LONG_ABOUT),
after_long_help = docs::after_help(AFTER_LONG_HELP)
)]
pub struct StatusCommand {
#[command(flatten)]
timeout: TimeoutArg,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# To show information about all of the system's Identities and Nodes
# Includes all identities, whether enrolled or unenrolled
$ ockam status

# Change the default timeout duration of the status command
# Defaults to 2s if unspecified
$ ockam status --timeout 0.5s
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[TBD: Is the following useful information?]
[TBD: What needs to be elaborated on, and in what way?]

The status command displays the current status of your machine, including information such as:
- controller and project version [TBD: what are these?]
- all cryptographic identities stored in your vault, their enrollment status with the Ockam Orchestrator,
date of enrollment (if enrolled), and the email address associated with each identity
- the status of any Nodes, process ids, associated routes and transport protocols, secure channels,
portals, and running services

0 comments on commit 6f09a32

Please sign in to comment.