Crate r3bl_cmdr

Source
Expand description

§Why R3BL?

R3BL TUI library & suite of apps focused on developer productivity

§Table of contents

§Introduction

Please read the main README.md of the r3bl-open-core monorepo and workspace to get a better understanding of the context in which this crate is meant to exist.

§Installation

The three apps, edi, giti, and ch, that comprise r3bl-cmdr will make you smile and make you more productive. These apps are currently available as early access preview 🐣.

  • 😺 giti - an interactive git CLI app designed to give you more confidence and a better experience when working with git.
  • 🦜 edi - a TUI Markdown editor that lets you edit Markdown files in your terminal in style.
  • 🔮 ch - a Claude Code history browser that lets you select and copy previous Claude Code prompts to clipboard.

To install r3bl-cmdr on your system, run the following command, assuming you have cargo on your system:

cargo install r3bl-cmdr

If you don’t have cargo on your system, you can either:

  1. Follow these instructions to install cargo on your system first. Then run cargo install r3bl-cmdr to install this crate. Here are the commands for Linux:

    # Install Rust toolchain using rustup.
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    # Install the r3bl-cmdr crate.
    cargo install r3bl-cmdr
  2. Build the binaries from the crate’s source code. First clone this repo. Then, run:

    git clone https://github.com/r3bl-org/r3bl-open-core/ # clone the repo locally
    cd r3bl-open-core       # navigate to the repo root
    ./bootstrap.sh          # install all required tools
    cd cmdr/                # navigate to the cmdr crate
    cargo install --path .  # after install, the binaries are in ~/.cargo/bin

§Changelog

Please check out the changelog to see how the crate has evolved over time.

§Learn how these crates are built, provide feedback

To learn how we built this crate, please take a look at the following resources.

  • If you like consuming video content, here’s our YT channel. Please consider subscribing.
  • If you like consuming written content, here’s our developer site.

§Run giti binary target

giti video

To run from binary:

  • Run cargo install r3bl-cmdr (detailed instructions above). This will install giti locally to ~/.cargo/bin.
  • Run giti from anywhere on your system.
  • Try giti --help to see the available commands.
  • To delete one or more branches in your repo run giti branch delete.
  • To checkout a branch run giti branch checkout.
  • To create a new branch run giti branch new.

To run from source:

  • Clone the r3bl-open-core repo.
  • Run ./bootstrap.sh to install all required tools (Linux/macOS).
  • Run fish run.fish install-cmdr to install giti locally to ~/.cargo/bin.
  • Run giti from anywhere on your system.
  • Try giti --help to see the available commands.
  • To delete one or more branches in your repo run giti branch delete.
  • To checkout a branch run giti branch checkout.
  • To create a new branch run giti branch new.
  • If you want to generate log output for giti, run giti -l. For example, giti -l branch delete. To view this log output run fish run.fish log.

§Run edi binary target

edi video

To run from binary:

  • Run cargo install r3bl-cmdr (detailed instructions above). This will install edi locally to ~/.cargo/bin.
  • Run edi from anywhere on your system.
  • Try edi --help to see the available commands.
  • To open an existing file, run edi <file_name>. For example, edi README.md.

To run from source:

  • Clone the r3bl-open-core repo.
  • Run ./bootstrap.sh to install all required tools (Linux/macOS).
  • Run fish run.fish install-cmdr to install edi locally to ~/.cargo/bin.
  • Run edi from anywhere on your system.
  • Try edi --help to see the available commands.
  • To open an existing file, run edi <file_name>. For example, edi README.md.
  • If you want to generate log output for edi, run edi -l. For example, edi -l README.md. To view this log output run fish run.fish log.

§Run ch binary target

ch video

To run from binary:

  • Run cargo install r3bl-cmdr (detailed instructions above). This will install ch locally to ~/.cargo/bin.
  • Run ch from anywhere on your system.
  • Try ch --help to see the available commands.
  • ch browses your Claude Code prompt history for the current project.
  • Select a prompt to copy it to your clipboard instantly.
  • Supports prompts with pasted images (saves them to Downloads folder).

To run from source:

  • Clone the r3bl-open-core repo.
  • Run ./bootstrap.sh to install all required tools (Linux/macOS).
  • Run fish run.fish install-cmdr to install ch locally to ~/.cargo/bin.
  • Run ch from anywhere on your system.
  • Try ch --help to see the available commands.
  • If you want to generate log output for ch, run ch -l. For example, ch -l. To view this log output run fish run.fish log.

§Build, run, test tasks

§Prerequisites

🌠 The easiest way to get started is to use the bootstrap script:

./bootstrap.sh

This script automatically installs:

  • Rust toolchain via rustup
  • Nushell shell
  • File watchers (inotifywait/fswatch)
  • All required cargo development tools

For manual installation:

  1. Install the Rust toolchain using rustup by following the instructions here.
  2. Install nu shell: cargo install nu
  3. Install development tools: fish run.fish install-cargo-tools

§Binary Development Commands

For cmdr binary development, use these commands from the repository root:

§Building and Installing Binaries

CommandDescription
fish run.fish install-cmdrInstall cmdr binaries to ~/.cargo/bin
fish run.fish run-binariesInteractively run edi, giti, or rc
fish run.fish docker-buildBuild release binaries in Docker
fish run.fish logMonitor log files with smart detection

§Testing and Development

CommandDescription
fish run.fish testRun all tests
fish run.fish clippyRun clippy with fixes
fish run.fish watch-all-testsWatch files, run all tests
fish run.fish watch-clippyWatch files, run clippy

For complete development setup and all available commands, see the repository README.

§Binary Development Features

  • Interactive binary selection: Choose which binary to run with fuzzy search
  • Smart log monitoring: Automatically detects and manages log files from binaries
  • Docker builds: Build release binaries in isolated Docker environment
  • Cross-platform file watching: Uses inotifywait (Linux) or fswatch (macOS)

Re-exports§

pub use analytics_client::*;
pub use common::*;

Modules§

analytics_client
ch
common
edi
giti
rc

Constants§

DEBUG_ANALYTICS_CLIENT_MOD
DEVELOPMENT_MODE