rt means repo tree: a Git repository manager that stores repositories in a predictable directory tree derived from remote URLs.
Instead of cloning repositories into random locations, rt maps each Git remote to a stable path under one root directory.
Example:
- Remote:
git@github.com:acehinnnqru/rt.git - Local path:
{root}/github.com/acehinnnqru/rt
This structure makes repositories easy to find, script against, and navigate.
Given a Git remote URL, rt computes the destination path as:
{root}/{host}/{owner}/{repo}
Where:
rootis configured in~/.rt.tomlhostis the Git host (for examplegithub.com)owneris the namespace/user/orgrepois the repository name without.git
Configuration file: ~/.rt.toml
Default config (Unix-like systems):
root = "{$HOME}/r"
[clone]
depth = 1
[integrations]
zoxide = true
autojump = falseroot(string): base directory for all managed repositories.clone.depth(integer): shallow clone depth used during clone operations.integrations.zoxide(bool): whentrue, add cloned paths tozoxide.integrations.autojump(bool): whentrue, add cloned paths toautojump.
rt clone(alias:c): clone a repository into the computed tree path.rt delete(alias:d): delete a managed repository.rt tree(alias:t): print the repository tree underroot.rt help: show command help.
rt worktree (alias: wt) is a command group for git worktree.
rt worktree add(aliases:wt a,wa): create a new worktree.rt worktree list(aliases:wt l,wl): list worktrees for the current repository.rt worktree delete(aliases:wt d,wd): interactively delete a worktree for the current repository.
zoxide: automatically register cloned paths for faster directory jumping.autojump: automatically register cloned paths for autojump navigation.
clap: CLI parsing.tokio: async runtime.anyhow: error handling.serde: serialization/deserialization.toml: TOML parsing and serialization.
Contributions are welcome. Open an issue or pull request with ideas, bug reports, or improvements.