0.2.0 • Published 1 month ago

git-cli-api v0.2.0

Weekly downloads
-
License
MPL-2.0
Repository
-
Last release
1 month ago

git-cli-api

Interface with the Git CLI using JavaScript.

Installation

npm i git-cli-api

Usage

Clone a repository

Sync

import { git } from "git-cli-api";


git.cloneSync(
    "https://github.com/voidvoxel/limited-queue.git"
);

Async

import { git } from "git-cli-api";


async function main () {
    await git.clone(
        "https://github.com/voidvoxel/limited-queue.git"
    );
}


main();

Destination directory

import { git } from "git-cli-api";


git.cloneSync(
    "https://github.com/voidvoxel/limited-queue.git",
    "example"
);

Current working directory

import { git } from "git-cli-api";


git.cloneSync(
    "https://github.com/voidvoxel/limited-queue.git",
    "limited-queue",
    {
        cwd: "./example-dir"
    }
);