From bb0ed113d9e3a248f881a4e2af685cc5882f9710 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Wed, 21 Jan 2026 11:50:52 +0100 Subject: [PATCH] bin: Rename `commands` to `apps` --- README.md | 8 ++++---- bin/apps.rs | 8 ++++++++ bin/{commands => apps}/help.rs | 0 bin/{commands => apps}/inbox.rs | 0 bin/{commands => apps}/inbox/list.rs | 0 bin/{commands => apps}/issue.rs | 2 +- bin/{commands => apps}/issue/list.rs | 0 bin/{commands => apps}/patch.rs | 0 bin/{commands => apps}/patch/list.rs | 0 bin/{commands => apps}/patch/review.rs | 0 bin/{commands => apps}/patch/review/builder.rs | 0 bin/commands.rs | 8 -------- bin/main.rs | 4 ++-- 13 files changed, 15 insertions(+), 15 deletions(-) create mode 100644 bin/apps.rs rename bin/{commands => apps}/help.rs (100%) rename bin/{commands => apps}/inbox.rs (100%) rename bin/{commands => apps}/inbox/list.rs (100%) rename bin/{commands => apps}/issue.rs (99%) rename bin/{commands => apps}/issue/list.rs (100%) rename bin/{commands => apps}/patch.rs (100%) rename bin/{commands => apps}/patch/list.rs (100%) rename bin/{commands => apps}/patch/review.rs (100%) rename bin/{commands => apps}/patch/review/builder.rs (100%) delete mode 100644 bin/commands.rs diff --git a/README.md b/README.md index 80f86e97..44ff97e5 100644 --- a/README.md +++ b/README.md @@ -85,13 +85,13 @@ home.packages = [ ### Usage -This crate provides a binary called `rad-tui` which can be used as a drop-in replacement for `rad`. It maps known commands and operations to internal ones, running the corresponding interface, e.g. +This crate provides a binary called `rad-tui` which can be used as a drop-in replacement for `rad`. It maps known commands and operations to internal ones, running the corresponding app, e.g. ``` rad-tui patch ``` -runs the patch list interface and calls `rad` with the operation and id selected. Commands or operations not known to `rad-tui` will be forwarded to `rad`, e.g. the following just calls `rad node`: +runs the patch list app and calls `rad` with the operation and id selected. Commands or operations not known to `rad-tui` will be forwarded to `rad`, e.g. the following just calls `rad node`: ``` rad-tui node @@ -114,13 +114,13 @@ alias rad="rad-tui" #### CLI integration via JSON -The interfaces are designed to be modular and could also be integrated with existing CLI tooling. The binary is can be called and its output collected and processed, e.g. +The apps are designed to be modular and could also be integrated with existing CLI tooling. The binary is can be called and its output collected and processed, e.g. ``` rad-tui patch list --json ``` -runs the patch list interface and return a JSON object specifying the operation and id selected: +runs the patch list app and return a JSON object specifying the operation and id selected: ``` { "operation": "show", "ids": ["546443226b300484a97a2b2d7c7000af6e8169ba"], args:[] } diff --git a/bin/apps.rs b/bin/apps.rs new file mode 100644 index 00000000..5ff873c1 --- /dev/null +++ b/bin/apps.rs @@ -0,0 +1,8 @@ +#[path = "apps/help.rs"] +pub mod tui_help; +#[path = "apps/inbox.rs"] +pub mod tui_inbox; +#[path = "apps/issue.rs"] +pub mod tui_issue; +#[path = "apps/patch.rs"] +pub mod tui_patch; diff --git a/bin/commands/help.rs b/bin/apps/help.rs similarity index 100% rename from bin/commands/help.rs rename to bin/apps/help.rs diff --git a/bin/commands/inbox.rs b/bin/apps/inbox.rs similarity index 100% rename from bin/commands/inbox.rs rename to bin/apps/inbox.rs diff --git a/bin/commands/inbox/list.rs b/bin/apps/inbox/list.rs similarity index 100% rename from bin/commands/inbox/list.rs rename to bin/apps/inbox/list.rs diff --git a/bin/commands/issue.rs b/bin/apps/issue.rs similarity index 99% rename from bin/commands/issue.rs rename to bin/apps/issue.rs index 03cc0f93..bea501a0 100644 --- a/bin/commands/issue.rs +++ b/bin/apps/issue.rs @@ -17,7 +17,7 @@ use cli::terminal::patch::Message; use cli::terminal::Context; use cli::terminal::{Args, Error, Help}; -use crate::commands::tui_issue::list::IssueOperation; +use crate::apps::tui_issue::list::IssueOperation; use crate::terminal; use crate::ui::items::filter::DidFilter; use crate::ui::items::issue::filter::IssueFilter; diff --git a/bin/commands/issue/list.rs b/bin/apps/issue/list.rs similarity index 100% rename from bin/commands/issue/list.rs rename to bin/apps/issue/list.rs diff --git a/bin/commands/patch.rs b/bin/apps/patch.rs similarity index 100% rename from bin/commands/patch.rs rename to bin/apps/patch.rs diff --git a/bin/commands/patch/list.rs b/bin/apps/patch/list.rs similarity index 100% rename from bin/commands/patch/list.rs rename to bin/apps/patch/list.rs diff --git a/bin/commands/patch/review.rs b/bin/apps/patch/review.rs similarity index 100% rename from bin/commands/patch/review.rs rename to bin/apps/patch/review.rs diff --git a/bin/commands/patch/review/builder.rs b/bin/apps/patch/review/builder.rs similarity index 100% rename from bin/commands/patch/review/builder.rs rename to bin/apps/patch/review/builder.rs diff --git a/bin/commands.rs b/bin/commands.rs deleted file mode 100644 index c4dc17ad..00000000 --- a/bin/commands.rs +++ /dev/null @@ -1,8 +0,0 @@ -#[path = "commands/help.rs"] -pub mod tui_help; -#[path = "commands/inbox.rs"] -pub mod tui_inbox; -#[path = "commands/issue.rs"] -pub mod tui_issue; -#[path = "commands/patch.rs"] -pub mod tui_patch; diff --git a/bin/main.rs b/bin/main.rs index dbe53510..ac7523af 100644 --- a/bin/main.rs +++ b/bin/main.rs @@ -1,5 +1,5 @@ +mod apps; mod cob; -mod commands; mod git; mod log; mod settings; @@ -20,7 +20,7 @@ use radicle::version::Version; use radicle_cli::terminal as cli_term; -use commands::*; +use apps::*; use terminal as term; use crate::terminal::ForwardError;