git-cli-api

0.2.0 • Public • Published

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"
    }
);

/git-cli-api/

    Package Sidebar

    Install

    npm i git-cli-api

    Weekly Downloads

    0

    Version

    0.2.0

    License

    MPL-2.0

    Unpacked Size

    156 kB

    Total Files

    13

    Last publish

    Collaborators

    • voidvoxel