GithubHelp home page GithubHelp logo

danalexilewis / gitlump Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nabeix/gitlump

0.0 1.0 0.0 160 KB

A command line tool to manage all repositories of GitHub/GitHub Enterprise user or organization.

JavaScript 22.72% TypeScript 77.28%

gitlump's Introduction

gitlump Build Status

A command line tool to manage all repositories of GitHub user or organization.

Install

$ npm install -g gitlump

Usage

  Usage: gitlump [options] [command]


  Commands:

    create <type> <name>  Initialize with creating new directory.
    init <type> <name>    Initialize exisiting directory.
    clone                 Clone repositories.
    pull                  Pull repositories.
    exec                  Run git command.
    ls                    Show cloned repositories.
    ls-remote             Show remote repositories.

  Options:

    -h, --help     output usage information
    -V, --version  output the version number

Initialize

User repositries

$ gitlump create user <name>

Origanization repositories

$ gitlump create org <name>

After command finished, gitlump creates new directory named GitHub user or organization name, and creates .gitlump.json file in the directory.

Use existing directory

$ cd your-directory
$ gitlump init <type> <name>

.gitlump.json

.gitlump.json is a config file of gitlump.

{
  "endpoint": "https://api.github.com/",
  "type": "user",
  "name": "nabeix",
  "defaultProtocol": "ssh",
  "useAccessToken": false,
  "repos": [],
  "ignore": [],
  "cloned": []
}
  • endpoint GitHub API Endpoint (default https://api.github.com/)
    • If use GitHub Enterprise: http(s)://hostname/api/v3/
  • type user|org
  • name Github user or organization name
  • defaultProtocol ssh|https (default ssh)
  • useAccessToken true|false|string (default false)
    • If set true, read an access token from the environment variable GITLUMP_ACCESS_TOKEN.
    • If set an environment variable name, read an access token from the variable.
  • repos A list of repository specific settings (default blank)
    • Example: [{"name": "my-repo", "protocol": "https", "directory": "my-repo-directory"}]
      • name repository name
      • protocol (optional) used instead of defaultProtocol
      • directory (optional) clone directory name
  • ignore A list of repository names to be ignored (default blank)
  • cloned A list of cloned repository names (updated automatically by gitlump clone)

Clone

$ gitlump clone

gitlump clone automatically clones all repositories.

Pull

$ gitlump pull

gitlump pull runs git pull command in all repository directories.

This is a shorthand of gitlump exec pull.

Other Git commands

Almost all git commands are available after gitlump exec.

The followings are examples:

$ gitlump exec status
$ gitlump exec checkout master
$ gitlump exec commit -m "update"

Access token

An access token is needed if you have private repositories.

To use access token, set useAccessToken in .gitlump.json to true.

And set your access token to the environment variable GITLUMP_ACCESS_TOKEN.

export GITLUMP_ACCESS_TOKEN=your-access-token

If set the token to other environment variables:

"useAccessToken": "TOKEN_VARIABLE_NAME"
export TOKEN_VARIABLE_NAME=your-access-token

It is useful to use multiple access tokens.

export GITLUMP_ACCESS_TOKEN_FOR_GITHUB=github_com_token
export GITLUMP_ACCESS_TOKEN_FOR_GITHUB_ENTERPRISE=github_enterprise_token

In .gitlump.json for github.com repositories:

"useAccessToken": "GITLUMP_ACCESS_TOKEN_FOR_GITHUB"

In .gitlump.json for GitHub Enterprise repositories:

"useAccessToken": "GITLUMP_ACCESS_TOKEN_FOR_GITHUB_ENTERPRISE"

Contribution

  1. Fork it ( http://github.com/nabeix/gitlump )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

MIT

gitlump's People

Contributors

nabeix avatar

Watchers

James Cloos 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.