heimdall

command module
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README ΒΆ

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.

Simple demo

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

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
cmd
tui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL