6 releases
new 0.1.5 | May 24, 2025 |
---|---|
0.1.4 | May 24, 2025 |
#522 in Development tools
95 downloads per month
32KB
634 lines
rkit 
A minimal, high-performance CLI suite written in Rust for organizing, scanning, and inspecting Git repositories under a user-defined workspace.
Installation
cargo install rkit
Features
clone
: Smart Git clone wrapper that organizes repositories by domain and organizationls
: List all Git repositories in your workspaceview
: View repository information and metadata
Shell Extensions
rkit provides optional shell extensions that add useful functions and completions to your shell configuration.
Prerequisites
For Bash/Zsh Users
Install the shell extension:
curl -sSL https://raw.githubusercontent.com/imthor/rkit/main/install.sh | bash
The script will:
- Check for required dependencies
- Ask for confirmation before installing each function
- Create a backup of your shell config file
- Add the selected functions and completions
After installation, either:
- Restart your shell, or
- Run
source ~/.zshrc
(for Zsh) orsource ~/.bashrc
(for Bash)
For Fish Users
Install the shell extension:
curl -sSL https://raw.githubusercontent.com/imthor/rkit/main/install.fish | fish
The script will:
- Check for required dependencies
- Ask for confirmation before installing each function
- Create a backup of your Fish config file
- Add the selected functions and completions
After installation, either:
- Restart your shell, or
- Run
source ~/.config/fish/config.fish
Available Extension Functions
After installing the shell extension, the following functions will be available:
clone
Clone a repository using rkit.
clone <repository>
cdc
Change directory to a repository using fuzzy search.
cdc [query] # Optional query to pre-filter the list
edit
Open a repository in your default editor (VS Code) using fuzzy search.
edit [query] # Optional query to pre-filter the list
Extension Features
- Fuzzy Search: All functions use fzf for intuitive repository selection
- Preview: See repository details while searching
- Shell Completions: Tab completion for repository names
- Query Support: Pre-filter the repository list with a query
- Safe Installation: Creates backup of your config file before making changes
Uninstalling Extensions
To remove the shell extension:
-
Open your shell config file:
- Zsh:
~/.zshrc
- Bash:
~/.bashrc
- Fish:
~/.config/fish/config.fish
- Zsh:
-
Remove the section that starts with
# rkit functions
-
Source your config file or restart your shell
Extension Backup
The installation scripts create a backup of your config file before making any changes. The backup will be saved as:
- Zsh/Bash:
~/.zshrc.bak
or~/.bashrc.bak
- Fish:
~/.config/fish/config.fish.bak
You can restore your original configuration by copying the backup file back if needed.
Configuration
The configuration file is located at:
- Unix-like systems:
~/.config/rkit/config.yaml
- Windows:
%APPDATA%\rkit\config.yaml
It will be created automatically on first run with platform-specific default values.
Default Configuration
The default configuration includes:
# Linux/macOS
project_root: ~/projects
rview:
- command: basename {REPO}
label: Repo
- command: git -C {REPO} rev-parse --abbrev-ref HEAD
label: Active Branch
- command: git -C {REPO} status
label: Status
- command: cat {REPO}/README.md
label: README
# Windows
project_root: %USERPROFILE%\projects
rview:
- command: powershell -Command "Split-Path -Leaf {REPO}"
label: Repo
- command: git -C {REPO} rev-parse --abbrev-ref HEAD
label: Active Branch
- command: git -C {REPO} status
label: Status
- command: type {REPO}\README.md
label: README
Usage
Clone a repository
rkit clone https://github.com/imthor/rkit.git
This will clone the repository to ~/projects/github.com/imthor/rkit
(or %USERPROFILE%\projects\github.com\username\repo
on Windows).
List repositories
rkit ls [--full]
Lists all Git repositories found under the configured project root. Use the --full
flag to show absolute paths instead of relative paths.
View repository information
rkit view path/to/repo
Displays repository information based on configured commands. The command will:
- Show the repository name
- Display the active branch
- Show the current git status
- Display the repository's README.md if available
- Fall back to directory listing if no README is found
Development
# Build
cargo build
# Run tests
cargo test
# Run with debug output
RUST_LOG=debug cargo run -- ls
# Run with trace output
RUST_LOG=trace cargo run -- ls
The project uses structured logging with different verbosity levels:
info
: Default level, shows basic operationsdebug
: Shows detailed operation informationtrace
: Shows all internal operations
License
MIT
Dependencies
~8–17MB
~219K SLoC