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 authored and adrianbenavides committed Dec 17, 2024
1 parent dbdd6a7 commit 7d34513
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
Original file line number Diff line number Diff line change
@@ -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
```
Original file line number Diff line number Diff line change
@@ -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`.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```sh
# Display information about your Ockam instance and your Orchestrator resources.
$ ockam status
```
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 7d34513

Please sign in to comment.