Heimdall
A CLI to help with your git directories (for now π).
Based on the myth of the Nordic God, Heimdall, the CLI is here to ease with your multiple Git repositories.
A quick demo of the interactive mode.
How to install
On MacOS:
Heimdall is available through brew
brew tap yodamad/tools
brew install heimdall
On Linux: β οΈ Use it at your own risk for now β οΈ
There are available on Release page but not well tested to be honest
On Windows: β Not available for now, some compatibilities problems.
Available options
You can display options with -h
option
heimdall -h
_ _ _ _
/\ /\___(_)_ __ ___ __| | __ _| | |
/ /_/ / _ \ | '_ ` _ \ / _` |/ _` | | |
/ __ / __/ | | | | | | (_| | (_| | | |
\/ /_/ \___|_|_| |_| |_|\__,_|\__,_|_|_|
Version dev
Usage:
heimdall [flags]
heimdall [command]
Examples:
heimdall -h
Available Commands:
completion Generate the autocompletion script for the specified shell
git-info List all directories containing a `.git` folder
help Help about any command
Flags:
-h, --help help for heimdall
-i, --i interactive mode
-l, --log-dir string log directory (default ".")
-r, --root-dir string root directory (default ".")
-v, --verbose verbose output
Use "heimdall [command] --help" for more information about a command.
git-info
or gi
This option helps you with your git repositories. It will list them and tell you if they are up-to-date or not.
/\ /\___(_)_ __ ___ __| | __ _| | |
/ /_/ / _ \ | '_ ` _ \ / _` |/ _` | | |
/ __ / __/ | | | | | | (_| | (_| | | |
\/ /_/ \___|_|_| |_| |_|\__,_|\__,_|_|_|
Version dev
Usage:
heimdall git-info [flags]
Aliases:
git-info, gi
Flags:
-d, --depth int search depth (default 3)
-h, --help help for git-info
Global Flags:
-i, --i interactive mode
-l, --log-dir string log directory (default ".")
-r, --root-dir string root directory (default ".")
-v, --verbose verbose output
The command do a local and a remote checks.
By default, it will search in the current directory, but you can override this with -r
flag. Also, it searches no more then 3 levels of subdirectories, you can override this with the -d
flag.
heimdall git-info -r /home/user/work/
Searching in /home/user/work/...
+---------------------------------------+--------+---------------+----------------+
| PATH | BRANCH | LOCAL_CHANGES | REMOTE_CHANGES |
+---------------------------------------+--------+---------------+----------------+
| /home/user/work/project1 | main | π΄ | π΄(1) |
+---------------------------------------+--------+---------------+----------------+
| /home/user/work/project2 | main | π΄ | π’ |
+---------------------------------------+--------+---------------+----------------+
| /home/user/work/project3 | master | π’ | π’ |
+---------------------------------------+--------+---------------+----------------+
| /home/user/work/project4 | main | π΄ | π’ |
+---------------------------------------+--------+---------------+----------------+
-i
: Interactive mode
With interactive mode, you can easily:
- Pick the folder you want to inspect
- Display local changes of a picked folder after analyzing
- Display remote commits of a picked folder after analyzing
- (soon) Update one or several folders
heimdall git-info -i
_ _ _ _
/\ /\___(_)_ __ ___ __| | __ _| | |
/ /_/ / _ \ | '_ ` _ \ / _` |/ _` | | |
/ __ / __/ | | | | | | (_| | (_| | | |
\/ /_/ \___|_|_| |_| |_|\__,_|\__,_|_|_|
Version 0.0.4
π Search in directory /Users/admin_local/work/gitlab/fun-with/fun-with-k8s [Y/n] :
Searching in '/Users/admin_local/work/gitlab/fun-with/fun-with-k8s' ...
β οΈ Error analyzing /Users/admin_local/work/gitlab/fun-with/fun-with-k8s/external-api, skip it...
...
Found 4 folder(s) (Skip 1 folders because of errors, use '-v' to check in details)
+------------------------------------------------------------------------------------------+--------+---------------+----------------+
| PATH | BRANCH | LOCAL_CHANGES | REMOTE_CHANGES |
+------------------------------------------------------------------------------------------+--------+---------------+----------------+
| /Users/admin_local/work/gitlab/fun-with/fun-with-k8s/external-dns | main | π΄ | π’ |
+------------------------------------------------------------------------------------------+--------+---------------+----------------+
| /Users/admin_local/work/gitlab/fun-with/fun-with-k8s/fun-with-fluxcd | main | π’ | π’ |
+------------------------------------------------------------------------------------------+--------+---------------+----------------+
| /Users/admin_local/work/gitlab/fun-with/fun-with-k8s/fun-with-kyverno | main | π΄ | π’ |
+------------------------------------------------------------------------------------------+--------+---------------+----------------+
| /Users/admin_local/work/gitlab/fun-with/fun-with-k8s/fun-with-vault-and-external-secrets | main | π’ | π’ |
+------------------------------------------------------------------------------------------+--------+---------------+----------------+
...
Interactive mode options:
[X] π€ Display local changes of a repository
[ ] π Update one or several repositories (git pull)
[ ] β
I'm done
Pick one:
[X] /Users/admin_local/work/gitlab/fun-with/fun-with-k8s/external-dns
[ ] /Users/admin_local/work/gitlab/fun-with/fun-with-k8s/fun-with-kyverno
...
π¦ 1 files
hashnode-demo.yaml - M
...
What to do next::
[X] π Check another folder
[ ] β
I'm done
...
Interactive mode options:
[ ] π€ Display local changes of a repository
[ ] π Update one or several repositories (git pull)
[X] β
I'm done