gitkraken-cli
v2.0.5
Published
CLI to launch GitKraken from a given path
Downloads
174
Maintainers
Readme
CLI to launch GitKraken from a given path.
Currently has only been tested on MacOS, feel free to submit a pull request to add Windows support.
Installation
yarn global add gitkraken-cli
npm install --global gitkraken-cli
CLI
kraken
Usage: kraken [options] [path]
Open repository with GitKraken
Options:
-v --version Output the version number
-h --help Display help for command
Commands:
help [command] Display help for command
Examples
Open current directory in GitKraken:
kraken
Open target directory in GitKraken:
kraken path/to/repo
API
Usage
import { createCommand } from "commander";
import openCommand, { openAction, open } from "gitkraken-cli";
// Add kraken to your own commander program:
program
.addCommand(openCommand)
// ...
// Add the open action to your own commander command:
program
.name("my-command")
.action(openAction);
// Call open programmatically:
open("path/to/repo").then(() => {
// GitKraken is now open...
});
Types
function open(path?: string): Promise<ExecResult>;
function openAction(path?: string | undefined): Promise<void>
const openCommand: commander.Command;
- @bconnorwhite/exec: Execute commands while keeping flags easily configurable as an object
- commander-version: A wrapper for Commander that automatically sets the version based on your package.json
- is-absolute: Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native
path.isAbolute
.
- @bconnorwhite/bob: Bob is a toolkit for TypeScript projects
- @types/is-absolute: TypeScript definitions for is-absolute