diff --git a/implementations/rust/ockam/ockam_command/src/reset.rs b/implementations/rust/ockam/ockam_command/src/reset/mod.rs similarity index 93% rename from implementations/rust/ockam/ockam_command/src/reset.rs rename to implementations/rust/ockam/ockam_command/src/reset/mod.rs index 3b4877b364b..9c6899817bb 100644 --- a/implementations/rust/ockam/ockam_command/src/reset.rs +++ b/implementations/rust/ockam/ockam_command/src/reset/mod.rs @@ -12,10 +12,18 @@ use ockam_api::terminal::ConfirmResult; use ockam_api::{color, fmt_ok, CliState}; use ockam_node::Context; +use crate::docs; 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)] diff --git a/implementations/rust/ockam/ockam_command/src/reset/static/after_long_help.txt b/implementations/rust/ockam/ockam_command/src/reset/static/after_long_help.txt new file mode 100644 index 00000000000..8261ae9e3e0 --- /dev/null +++ b/implementations/rust/ockam/ockam_command/src/reset/static/after_long_help.txt @@ -0,0 +1,11 @@ +```sh +# Removes the local Ockam configuration including all Identities and Nodes. +$ ockam reset + +# Removes orchestrator resources (i.e. Spaces and Projects) +# in addition to deleting the local state. +$ ockam reset --all + +# To confirm without prompting. +$ ockam reset -y +``` diff --git a/implementations/rust/ockam/ockam_command/src/reset/static/long_about.txt b/implementations/rust/ockam/ockam_command/src/reset/static/long_about.txt new file mode 100644 index 00000000000..af07dba8e15 --- /dev/null +++ b/implementations/rust/ockam/ockam_command/src/reset/static/long_about.txt @@ -0,0 +1,5 @@ +WARNING: + +The `reset` command is dangerous and should be used with caution as it will remove all local state PERMANENTLY. This behaviour can be useful for cleaning up your development environment and starting afresh from scratch. However, you'll typically want to use specific delete commands such as `node delete`, `identity delete`, and `space delete` for more granular control on deletes. + +Note that running `reset` will also sign you out of your Ockam account. You can sign in again and reactivate your machine with `ockam enroll`. diff --git a/implementations/rust/ockam/ockam_command/src/status.rs b/implementations/rust/ockam/ockam_command/src/status/mod.rs similarity index 95% rename from implementations/rust/ockam/ockam_command/src/status.rs rename to implementations/rust/ockam/ockam_command/src/status/mod.rs index 704d3d02d92..77cf3e0badc 100644 --- a/implementations/rust/ockam/ockam_command/src/status.rs +++ b/implementations/rust/ockam/ockam_command/src/status/mod.rs @@ -22,8 +22,17 @@ use ockam_api::nodes::{BackgroundNodeClient, InMemoryNode}; use ockam_api::output::Output; use ockam_api::{fmt_heading, fmt_log, fmt_separator, fmt_warn}; -/// Display information about the system's status +use crate::docs; + +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 your Ockam instance #[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, diff --git a/implementations/rust/ockam/ockam_command/src/status/static/after_long_help.txt b/implementations/rust/ockam/ockam_command/src/status/static/after_long_help.txt new file mode 100644 index 00000000000..504951d2c5a --- /dev/null +++ b/implementations/rust/ockam/ockam_command/src/status/static/after_long_help.txt @@ -0,0 +1,4 @@ +```sh +# Display information about your Ockam instance and your Orchestrator resources. +$ ockam status +``` diff --git a/implementations/rust/ockam/ockam_command/src/status/static/long_about.txt b/implementations/rust/ockam/ockam_command/src/status/static/long_about.txt new file mode 100644 index 00000000000..bcba0fb349f --- /dev/null +++ b/implementations/rust/ockam/ockam_command/src/status/static/long_about.txt @@ -0,0 +1,5 @@ +This command shows information such as the current version of Ockam in use, the Ockam Orchestrator and Project versions, as well as your Spaces and the users associated with them. + +It also lists any cryptographic Identities stored in your vault and their enrollment status with the Ockam Orchestrator. + +Additionally, it shows a quick overview of any available Nodes: their status, associated routes and protocols, listeners and services, and more.