repos

A simple command line tool to manage local repositories.

Notes

Building

First, install Rust https://www.rust-lang.org/install.html .

Then,

sh cargo build --release

Copy the built target/release/repos (target\release\repos.exe in Windows) command line executable program to any place for use.

Tutorials

Prepare your metadata file

See Repos.sample.toml for sample.

To use the sample metadata file, just copy it to the root directory of your repositories and rename it to Repos.toml.

Add a new repository

  1. Put new repository metadata to Repos.toml
  2. Run repos sync {repo_url}

Update an existed repository

Run repos sync {repo_url}.

Remove an existed repository

  1. Run repos remove {repo_url}
  2. Delete repository metadata from Repos.toml manually

Update all repositories

Run repos sync.

List repositories of a topic

Run repos topic {topic}.

List all topics with count of their repositories

Run repos topics.

Output stats of all repositories

Run repos stats.

Clean up unused resources

Run repos cleanup.

Search repositories

Run repos search {keyword}.

Output proxy configuration

Run repos proxy.

Change proxy configuration

Edit proxy section in metadata file.

Metadata

See Repos.template.toml for an overview.

repository

proxy

Local files and directories

These files and directories are all in current/working directory (pwd).

Metadata file

Repos.toml

repository directory

{host}/{path_to_repo}

e.g. repository directory of url https://example.com/org/repo.git is example.com/org/repo.

Subcommands

Examples:

repos sync https://github.com/org/repo.git repos sync repos remove https://github.com/org/repo.git repos topics repos topic rust repos stats repos cleanup repos search keyword repos proxy

Limitations

There are some limitations now.