Successor at github.com/osoy/osoy.
Lightweight git repository manager. Inspired by vim-plug, yarn and pacman. It supports multiple git hosting services.
This is a prototype (v0.0.7) written in POSIX shell.
It has currently been tested on Linux with dash but most likely will work on BSD and macOS with bash or zsh. This software relies on extended file metadata to determine whether a file is executable.
sed; grep; find; ls; sort; cut; tr; curl; git
On a *nix system, chances are you already have these installed.
You may have to install curl
and git
.
osoy [operator] [flags]
c|clone <query*> clone packages from GitHub, GitLab or Bitbucket
r|remove <query*> remove packages
s|symlink [query*] make packages' executables available in PATH
u|update [query*] update (all) packages
l|list [query*] list (all) packages
m|make [query*] make (all) packages
dir <query> print package's directory path
read <query> view package's README file
license <query> view package's LICENSE file
uninstall - uninstall osoy and all packages
<[[domain/]author/]package>
-d <domain> enforce a specific domain to clone from
-a <author> specify packages' author
-p <protocol> specify a protocol other than HTTPS
-b <branch> specify a single branch as the HEAD
-B - clone all branches
-y - proceed with defaults
-f - force overwriting and/or removing
-v - show version
-h - show help menu
-c - enable ansi colors
-C - disable ansi colors
Clone osoy git repository.
mkdir -p ~/.osoy/packages/github.com/osoy && cd ~/.osoy/packages/github.com/osoy && git clone https://github.com/osoy/osoy
Create a symbolic link for osoy executable.
mkdir -p ~/.osoy/bin && ln -s ~/.osoy/packages/github.com/osoy/osoy/osoy ~/.osoy/bin/osoy
Curl contents of the osoy file and execute with POSIX-compliant shell.
curl https://raw.githubusercontent.com/osoy/osoy/master/osoy | sh
Add osoy bin directory ~/.osoy/bin to your system path.
PATH="$PATH:$HOME/.osoy/bin"
To make it permanent add the previous line to your shell profile — ~/.bash_profile, ~/.zprofile, ~/.profile, etc. More at computerhope, askubuntu or google.
You can configure osoy by making an alias. For example, next line will enable colors by default
alias osoy='osoy -c'
Following line will make it easier to navigate to package's directory
oycd() { cd "$(osoy dir "$*")"; }
~/.osoy/
├── bin/
│ ├── <symlink> -> <executable>
│ : ...
│
└── packages/
├── <domain>/
│ : ...
│
├── <domain>/
: ├── <author>/
│ : ...
│
├── <author>/
: ├── <package>/
│ : ...
│
├── <package>/
: ├── <modules>/
├── <module>
├── <executable>
: ...
- Rewrite in rust