gitkraken-cli
TypeScript icon, indicating that this package has built-in type declarations

2.0.5 • Public • Published

gitkraken-cli

NPM TypeScript Coverage Status GitHub Stars Twitter Follow

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;

Dependenciesdependencies

  • @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.

Dev DependenciesDavid


License license

MIT

Package Sidebar

Install

npm i gitkraken-cli

Weekly Downloads

6

Version

2.0.5

License

MIT

Unpacked Size

7.84 kB

Total Files

11

Last publish

Collaborators

  • bconnorwhite