git-cli-api
v0.2.0
Published
Interface with the Git CLI using JavaScript
Downloads
6
Maintainers
Readme
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"
}
);