🔱 Giwow
Manage your git projects with one command
Giwow is a simple git workspace manager.
It allows you to manage all projects in a Gitlab group for example.
Clone, pull and push your projects in a single command.
You can connect giwow with Jira to sync your backlogs and issue.
$ giwow
Git workspace manager
Usage:
giwow [command]
Available Commands:
help Help about any command
projects Manage projects in the current workspace
prune Delete all configuration files and all workspaces
token Manage your platform tokens. This will interact with your $HOME/.netrc file
workspace Manage workspaces
Flags:
--debug Enable debug and verbose messages, use in development only
-h, --help help for giwow
-t, --toggle Help message for toggle
--verbose Enable verbose messages
🚀 Getting started
📦 Installation
$ go install github.com/nicolasdscp/giwow@latestor
$ git clone https://github.com/nicolasdscp/giwow.git
$ make install
🖥 Setting up your workspace
Choose a folder where your project's workspace will be stored. Then init a new workspace.
$ giwow workspace init <workspace-url>The workspace url must be a valid host URL. Look at the examples below.
private.gitlab.com/
└── org/
└── groupA/
└── subGroupA/
├── subsubGroupA/
│ ├── project1
│ └── ...
├── project1
└── ...
If you want to manage all project in subsubGroupA, you can use the following command:
$ giwow workspace init private.gitlab.com/org/groupA/subGroupA/subsubGroupAIf you think bigger and you want to manage all project in subGroupA including projects in subgroup, you can use the following command:
$ giwow workspace init private.gitlab.com/org/groupA/subGroupAThis format is required if you manage to connect to Gitlab or Github to clone your repositories.
🕵🏼 Working with private repositories
In order to work with private repositories, you need to configure ~/.netrc.
You can let giwow manage your credentials for you, or you can configure it manually.
If you don't want to configure it manually, you can use the giwow token add command.
$ giwow token add <repo-url>
or
$ giwow token add <repo-url> -u my-user -p my-tokenThis will basically add a new entry to ~/.netrc with the following content:
machine <repo-url> login my-user password my-tokenYou can list all your tokens with the giwow token ls command.
🦊 Gitlab connection
Giwow will use your .netrc file to connect to your Gitlab account.
First you need to authenticate with your Gitlab account.
It's highly recommended to use a personal access token instead of your password.
Then configure giwow to use your Gitlab account.
Note that if tou already have a personal access token in your .netrc, you can skip this step.
$ giwow token add gitlab.com -u gitlab-username -p access-tokenNote that you can replace
gitlab.comwith your Gitlab domain.
To generate a personal access token see Gitlab personal access tokens
Now set the type of your workspace to gitlab.
$ giwow workspace set --type gitlabWorking with gitlab allows you to automatically discover and clone all your projects.
📚 Working with projects
Now you can manage your projects with the giwow projects command.
Adding your projects
$ giwow projects add <project1> <project2> ...You can add the
--cloneflag to clone projects directly.
If you are using a Gitlab workspace you can automatically discover all your projects in your workspace.
$ giwow projects discover
> 🔎 Discovering projects in the current workspace ...
> 🦊 Using Gitlab API to discover projects ...
> 🎉 Discovered 13 projects
> ✅ 13 project(s) added to the workspace
Note that
discoverwill also add projects in sub groups. Giwow will automatically clone these projects in the good hierarchy.
Giwow will ignore archived projects.
Cloning your projects
Now you probably want to clone your projects.
$ giwow projects clone🛟 Useful commands
If you want to know more about a command, you can use the giwow [command] -h command.
$ giwow workspace info # Show workspace info
$ giwow projects prune # Delete all projects present in the workspace file (Not projects by themself)
$ giwow prune # Remove all configuration file from all workspaces including $HOME/.giwow