@axetroy/gpm
Git Package Manager, make you manage the repository easier
Last updated 2 months ago by axetroy .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install @axetroy/gpm -g
SYNC missed versions from official npm registry.

gpm.js

Greenkeeper badge Build Status Dependency License Prettier Node npm version Size

Git Package Manager, make you manage the repository easier

sceenshot

Documentation

简体中文

English

Features

  • [x] support Github, Gitlab, etc
  • [x] add, remove, clean, cache, list commands
  • [x] score, humanize, easier to manager
  • [x] plugin support, more hook, it can help you do more thing
  • [x] support i18n
  • [ ] add repository in multi directories

Installation

npm install @axetroy/gpm -g

Requirement

  • nodejs>=6.0
  • npm || yarn
  • Git

Supports

  • [x] Windows
  • [x] Linux
  • [x] MacOS

Usage

$ gpm --help

   gpm 6.3.3 - Git Package Manager, make you manage the repository easier

   USAGE

     gpm <command> [options]

   COMMANDS

     add <repo>                         add a repository to gpm
     remove [owner] [repo]              Remove a repository from registry and disk
     list [key]                         Display the all repositories in registry
     tree [key]                         Display the all repositories in registry as a tree view
     clean                              Clear the cache, usually is /home/axetroy/.gpm/temp
     find                               Find repository by a key, You can get all about the repository info
     relink                             Relink the base directory and gpm registry, like Angular, trigger the $digest in manual
     config <action> [key] [value]      A series handler of configurations.
     runtime                            Print the program runtime, useful for submit issue
     import <dir>                       Import local repository into gpm registry
     foreach <plugin>                   Run the plugin in each project. The current work directory is the current project.
     plugin <action> [key]              A series handler of plugin.
     licenses                           Give you the license (and URL to the source code) associated with each repository..
     help <command>                     Display help for a specific command

   GLOBAL OPTIONS

     -h, --help         Display help
     -V, --version      Display version
     --no-color         Disable colors
     --quiet            Quiet mode - only displays warn and error messages
     -v, --verbose      Verbose mode - will also output debug messages

Config

this is a default config, it will be generated in ~/.gpm by default

~/.gpm/gpm.config.json

{
  "name": "gpm",
  "base": "gpm",
  "checkUpgrade": false
}
  • name: user name
  • base: the repositories base dir, all repository will be install in this dir
  • checkUpgrade: check upgrade before run every command

Plugin

load plugin with option '-p, --plugin name'

only support ``gpm add```, more hooks are coming soon.

plugin's name should match this pattern: gpm-plugin-${name}

npm install gpm-plugin-npmi -g

gpm add https://github.com/zeit/release.git --plugin npmi

# it will run 'npm install' in the dist directory
name description
npmi gpm plugin for run npm install after add repository
pub gpm plugin for Dart project, run <pub get> after add repository
clear-node-modules gpm plugin for clean the all NodeJs project's node_modules directory

Structure

.
├── github.com
│   ├── axetroy
│   │   ├── aabbcc
│   │   ├── build-cli -> /home/axetroy/develop/build-cli
│   │   ├── commander.dart
│   │   ├── contributors-stat
│   │   ├── event-emitter.dart
│   │   ├── event-emitter.js
│   │   ├── git-url-parse
│   │   ├── gpm.dart
│   │   ├── gpm.go
│   │   ├── labrador-cli
│   │   ├── labrador-demo
│   │   ├── ng-promise -> /home/axetroy/develop/ng-promise
│   │   ├── nmr
│   │   ├── protocols
│   │   ├── songojs -> /home/axetroy/develop/songojs
│   │   ├── url-parser
│   │   ├── wechatapp-dev-tool-linux
│   │   ├── wxapp-socket
│   │   └── ymli
│   ├── chentsulin
│   │   └── electron-react-boilerplate
│   ├── electron
│   │   └── electron-quick-start -> /home/axetroy/develop/electron-quick-start
│   ├── fenivana
│   │   └── wx-mina-html-view
│   ├── geeeeeeeeek
│   │   └── electronic-wechat -> /home/axetroy/develop/electronic-wechat
│   ├── gpmer
│   │   ├── gpm.js
│   │   └── gpm.ruby
│   ├── lidong1665
│   │   └── WeiXinProject
│   ├── maichong
│   │   └── labrador-demo
│   ├── zarknight
│   │   └── wx-falls-layout
│   └── zeit
│       └── nextgram
└── xxx.net(private git server)
    ├── axetroy
    │   ├── xxx
    │   ├── xxx -> /home/axetroy/develop/xxx
    │   ├── xxx -> /home/axetroy/develop/xxx
    │   ├── xxx
    │   ├── xxx -> /home/axetroy/develop/xxx
    │   ├── xxx -> /home/axetroy/develop/xxx
    │   └── xxx
    ├── xxx
    │   └── xxx
    └── xxx
        ├── xxx -> /home/axetroy/develop/xxx
        ├── xxx -> /home/axetroy/develop/xxx
        └── xxx -> /home/axetroy/develop/xxx

Example

gpm add https://github.com/zeit/release.git
gpm add https://github.com/axetroy/gpm.git
gpm add https://github.com/axetroy/ymli.git

gpm ls

# print out
github.com: 
  axetroy: 
    gpm:  /home/axetroy/gpm/github.com/axetroy/gpm
    ymli: /home/axetroy/gpm/github.com/axetroy/ymli
  zeit: 
    release: /home/axetroy/gpm/github.com/zeit/release

Uninstall

npm uninstall @axetroy/gpm -g
rm -rf ~/.gpm      # all file, cache, contain in this dir

Contributing

git clone https://github.com/gpmer/gpm.js.git
cd ./gpm.js
yarn
./bin/gpm

You can flow Contribute Guide

Contributors


Axetroy

???? ???? ⚠️ ???? ????

Windom Z

???? ????

License

The MIT License

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 43
Dependencies (25)
Dev Dependencies (14)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |