var cmds = require('./cmds') exports.help = ` Usage: git ssb [--version] [command] [--help] Commands: create Create a git repo on SSB fork Fork a git repo on SSB forks List forks of a repo issues List issues for a repo prs List pull requests for a repo authors List contributors to a repo log List history of updates to a repo name Name a repo named Search for repos by name pull-request Create a pull-request web Serve a web server for repos help Get help about a command ` exports.fn = function (argv) { if (argv.version) return require('./version')(argv) if (argv.help) return require('./help').fn(argv) if (argv._.length === 0) return require('./help').fn(argv) var cmd = argv._.shift() var mod = cmds.getCmd(cmd) var fn = mod && mod.fn if (!fn) throw `No such command '${cmd}'` fn(argv) }