Code Monkey home page Code Monkey logo

giwow's Introduction

๐Ÿ”ฑ Giwow

Manage your git projects with one command

Go version Lint passing Documentation

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

๐Ÿ”‘ Key features

For more information, please visit Giwow website

๐Ÿš€ Getting started

๐Ÿ“ฆ Installation

$ go install github.com/nicolasdscp/giwow@latest

or

$ 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/subsubGroupA

If 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/subGroupA

This 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-token

This will basically add a new entry to ~/.netrc with the following content:

machine <repo-url> login my-user password my-token

You 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-token

Note that you can replace gitlab.com with 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 gitlab

Working 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 --clone flag 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 discover will 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

giwow's People

Contributors

nicolasdscp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.