Skip to content

kitsuyui/mure

mure

Coverage A command line tool for creating and managing multiple repositories.

Installation

cargo install mure

Environment variables

This application requires the following environment variable.

  • GH_TOKEN

GH_TOKEN is GitHub access token.

(I haven't set it up to automatically read the contents of .env yet.)

Usage

directory structure

$HOME/.mure.toml ... configuration file
$HOME/.dev ... development directory
$HOME/.dev/repo ... repositories directory
$HOME/.dev/github.com/{owner}/{repo} ... working repository symlink

When you clone a repository, it will be cloned into the $HOME/.dev/repo/github.com/{owner}/{repo} directory. It also creates a symlink at $HOME/.dev/github.com/{owner}/{repo} for daily work.

requirements

  • GH_TOKEN environment variable is required for authentication.

mure init

Generate .mure.toml file in home directory.

[core]
base_dir = "~/.dev"
editor = "code"

[github]
username = "kitsuyui"

[shell]
cd_shims = "mucd"

Set up shell environment for mure

Add following script to your shell configuration file such as ~/.bashrc, ~/.zshrc or etc.

eval $(mure init --shell)

mure clone

mure clone clone the repository to the common directory. And makes symbolic links to the working repository.

mure clone <url>

mure issues

mure issues shows the list of issues and pull requests of all repositories.

Example:

example-mure-issues

Options

--query option is available for advanced search like --query 'user:kitsuyui' See this page for more about advanced search: https://docs.github.com/en/search-github/searching-on-github/searching-for-repositories

Default search query is user:{username} is:public fork:false archived:false

Customization

You can customize the output format by setting github.queries in .mure.toml. For example, if you want to show both of my (user:kitsuyui) repositories and the organization gitignore-in's repositories, you can set github.queries like this:

[github]
queries = [
  "user:kitsuyui",
  "owner:gitignore-in",
]

mure refresh

mure refresh updates the repository.

mure list

mure list shows repositories managed by mure.

mure list
mure list --full
mure list --path
mure list --full --path

By default, mure list prints repository names. --full prints owner/repository names, --path prints relative repository paths, and --full --path prints absolute repository paths for scripts.

mure edit

mure edit <name> opens a managed repository with an editor.

mure edit something

The editor is selected from core.editor in .mure.toml, Git core.editor, EDITOR, then VISUAL.

mucd

mucd is a command line shims for changing directory shortcut. mucd enables you to change directory into the repository.

mucd something  # => Same as `cd "$(mure path something)"`

You can change the name of the shim by set shell.cd_shims in .mure.toml to another name.

mure path

mure path shows the path of the repository for given repository name. (Internally, mure path is used for mucd command.)

Setup shell completion

For zsh, load completions after compinit.

autoload -Uz compinit
compinit

# mure subcommands
eval "$(mure completion --shell zsh)"

# mucd target completion (dynamic)
eval "$(mure completion --shell zsh --cd)"

mure completion --shell <shell> also supports other shells such as bash, fish, powershell, and elvish.

Contributing

.gitignore is auto-generated from .gitignore.in by the daily CI workflow. Edit .gitignore.in instead of .gitignore directly.

Quality Gates

The octocov workflow enforces the repository's metric thresholds:

  • line coverage must stay at or above 70%
  • the code-to-test ratio must stay at or above 1:0.005
  • test execution time in GitHub Actions must stay under 10 minutes

Development

This repository uses lefthook to run the same checks as CI locally, so problems surface before they reach CI.

# Install the Git hooks (once; requires lefthook on your PATH)
lefthook install

Once installed, the hooks run automatically:

  • pre-commit: cargo fmt --all -- --check and cargo clippy -- -D warnings
  • pre-push: the above plus cargo test

CI still runs the full suite (see .github/workflows/); the hooks only bring that feedback earlier on your machine.

License

BSD-3-Clause

About

multiple repository management tool

Resources

License

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages