
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
simple-git-promise
Advanced tools
DEPRECATED: this is just a 1 line wrapper around cmd-executor. You should probably just use that instead
DEPRECATED: This is just a 1-line wrapper around cmd-executor. You should probably just use that instead.
npm i simple-git-promise -S
const git = require('simple-git-promise')
// All calls return a promise, so you should probably wait for them to complete
// before running another command. You could use `.then()` or `await`
;(async () => {
// There are no specific attributes or functions defined on `git`.
// Instead, it is a proxy object that will take all attributes/function calls and
// parse them into a git command. For example:
// will run `git init`
await git.init()
// will run `git add .`
await git.add('.')
// will run `git commit -m "initial commit"`
await git.commit('-m "initial commit"')
// will run `git remote add origin git@github.com:renolc/simple-git-promise.git`
await git.remote.add('origin', 'git@github.com:renolc/simple-git-promise.git')
// Text that would be output by the git CLI are resolved by the promise
await git.branch('newBranch')
const msg = await git.checkout('newBranch')
console.log(msg) // "Switched to branch 'newBranch'\n"
// Finally, since what you can call on `git` is unbound, you could
// certainly do something nonsensical like:
try {
await git.bork.blarg(42) // will try to run `git bork blarg 42`
} catch (e) {
console.log(e) // error message containing "git: 'bork' is not a git command. See 'git --help'"
}
})()
FAQs
DEPRECATED: this is just a 1 line wrapper around cmd-executor. You should probably just use that instead
We found that simple-git-promise demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.