manualfork v1.0.3
manualfork
A node utility to manually clone Github repositories. with bonus CLI!
Github, by design, restricts the number of times you can fork a repo into a single account. Even then, after forking, you are bound to the upstream in your repo page, which if you are doing an iterative work can sometimes be a hinderance to marketing. There are hacks and workarounds for this, but manualfork allows you to manually clone a repo with a single command.
Installation
npm i -g manualfork
Or if you want to use it in a program:
npm i manualfork
Usage
To use manualfork, you'll need to generate a Github Personal Access Token, found here. You should only grant this token the permissions it needs, which is repo. (If you discover it needs other permissions besides that, lemme know)
CLI
manualfork account/repo to other-account/other-repo -u username -t token
If you add your username and token to your environment under the variables GITHUB_USER
and GITHUB_TOKEN
, the command below will do the same thing:
manualfork account/repo to other-account/other-repo
If you want to create the new repo from scratch, just add the flag --create
or -c
Usage:
manualfork [OPTIONS] [ARGS]
Options:
-u, --user [STRING] Your Github Username (Default is username-from-environment)
-t, --token [STRING] Your Github Access Token (Default is token-from-environment)
-f, --force BOOL force push target branch
-c, --create BOOL create target repo on Github
-k, --no-color Omit color from output
--debug Show debug information
-v, --version Display the current version
-h, --help Display help and usage details
API
var manualfork = require('manualfork')
var manualforkOpts = {
username: username,
token: token,
host: 'github.com',
source: {
account: 'other-user',
repo: 'other-repo'
},
target: {
account: 'your-user',
repo: 'your-repo'
},
create: true
}
manualfork.fork(manualforkOpts)
.then(function (data) {
console.log('manualfork was successful!')
})
.catch(function (err) {
console..error(err)
})
Contributing
What is needed
Moar tests
License
ISC