simple-git

A lightweight, promise-based interface for running git commands from Node.js

Library
npm
v4.0.2
3,856 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
76 /100 Good
Development Activity 64
Maintenance 76
Community 64
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
77 /100 Good
Architecture 80
Code Quality 82
Innovation 65
Learning Curve 80

simple-git is a Node.js library that wraps the system git CLI binary behind a typed, chainable, promise-based API, letting applications clone repos, inspect status/logs/diffs, and run arbitrary git commands programmatically without shelling out manually or parsing raw CLI output themselves.

It has no native bindings — every operation ultimately spawns the real git executable as a child process and parses its output — which keeps it lightweight and always compatible with whatever git version is installed, at the cost of requiring git itself to be present on the host.

What You Get

  • A chainable, promise-based API covering the full common git command surface (clone, add, commit, push, pull, log, diff, status, branch, tag, and more)
  • Structured, typed response objects for commands like status() and log() instead of raw stdout strings
  • A plugin system for customizing behavior like timeouts, progress reporting, and command-error handling
  • Both callback and promise/async APIs for compatibility with older and modern Node.js codebases
  • TypeScript typings shipped in the package for full editor autocompletion

Common Use Cases

  • Automating repository setup in CLI scaffolding tools (clone a template, initialize a repo, make an initial commit)
  • Building CI/CD or release-automation scripts that need to tag, push, or inspect commit history programmatically
  • Powering a backend service that manages many git repositories (e.g. a Git-hosting or deployment platform)
  • Reading commit/diff/status information to build dashboards, changelogs, or code-review tooling

Under The Hood

Architecture — The repo is a Yarn-workspaces monorepo with the main simple-git package plus small internal helper packages (@simple-git/args-pathspec, @simple-git/argv-parser) under packages/. Inside simple-git/src, git-factory.ts constructs the root SimpleGit instance, lib/simple-git-api.ts and lib/api.ts define the fluent/chainable method surface, lib/runners handles actually spawning the git child process and streaming its stdout/stderr, lib/tasks implement each individual git subcommand (clone, log, diff, etc.) as isolated task modules, and lib/parsers turn raw CLI output into the library’s structured response objects (lib/responses). Tech Stack — TypeScript compiled via esbuild with esbuild-node-externals, tested with Jest (93+ spec files) and Babel for transform config, linted/formatted with Biome, and versioned/released via Changesets; runtime dependencies are minimal (@kwsites/file-exists, @kwsites/promise-deferred, debug) with the real git binary as the only true external dependency. Code Quality — The task-per-file structure (lib/tasks/) keeps each git subcommand’s argument-building and output-parsing logic isolated and independently testable, and the extensive spec suite covers parser edge cases for commands like log, status, and diff whose CLI output formats vary by git version and locale. API Design — The chainable method-call style (git.add('.').commit('message').push()) combined with both promise and legacy-callback support gives the library a low barrier to entry for simple scripts while still exposing raw/typed access to full command output for more advanced automation, and the plugin system lets consumers hook timeouts or progress events without forking the library.

Used by 24 apps in this directory

TypeScript
84%
Apache 2.0

ktx

AI Development · Analytics · Data Engineering

1,623

ktx builds a self-improving context layer over your data warehouse so AI agents like Claude Code and Codex query it with approved metric definitions instead of reinventing SQL logic from scratch.

View details
52
Repo Health
85
Technical
71
Dependency
Built with
TypeScript 84%
Updated 2 days ago
TypeScript
97%
Other

Lightdash

Analytics · Data Engineering

6,196

The open-source Looker alternative that turns your dbt project's metrics and dimensions into governed, self-serve charts and dashboards — no license key required.

View details
93
Repo Health
84
Technical
64
Dependency
Built with
TypeScript 97%
Updated today
TypeScript
92%
Other

n8n

Automation · No Code Platforms

208,437

Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.

View details
95
Repo Health
87
Technical
62
Dependency
Built with
TypeScript 92%
Updated yesterday
TypeScript
97%
GPL 3.0

OpenKnowledge

Code Editors · Knowledge Management · Note Taking

4,674

A beautiful, local-first markdown IDE that turns any git repo into a live collaborative workspace for humans and AI coding agents like Claude, Codex, and OpenCode.

View details
80
Repo Health
89
Technical
64
Dependency
Built with
TypeScript 97%
Updated today
TypeScript
98%
Other

Orama

Developer Tools · Search

10,584

A complete, embeddable search engine and RAG pipeline running in browsers, servers, and edge networks with full-text, vector, and hybrid search in under 2KB.

View details
64
Repo Health
83
Technical
64
Dependency
Built with
TypeScript 98%
Updated 6 days ago
TypeScript
98%
MIT

Promptfoo

AI Development

26,358

An open-source CLI and library for evaluating and red-teaming LLM applications — replace trial-and-error prompt engineering with systematic evals, vulnerability scanning, and CI/CD integration.

View details
90
Repo Health
73
Technical
67
Dependency
Built with
TypeScript 98%
Updated today
TypeScript
64%
AGPL 3.0

Puter

Developer Tools · File Storage

43,864

A self-hostable, web-based internet OS with desktop GUI, cloud storage, AI drivers, and a developer SDK — all running in your browser.

View details
88
Repo Health
88
Technical
67
Dependency
Built with
TypeScript 64%
JavaScript 33%
Updated today
JavaScript
86%
AGPL 3.0

SillyTavern

AI Assistants

34,869

The power-user LLM frontend that unifies dozens of AI backends with a rich scripting engine, immersive Visual Novel mode, and a thriving extension ecosystem.

View details
88
Repo Health
71
Technical
63
Dependency
Built with
JavaScript 86%
Updated 3 weeks ago
Python
100%
Other

Sourcebot

AI Code Assistants · Developer Tools · Search

4,005

A self-hosted, AI-powered code search engine that indexes every repo across GitHub, GitLab, Bitbucket, Gitea, Gerrit, and Azure DevOps, so both engineers and coding agents can search, browse, and ask questions about your codebase from one place.

View details
86
Repo Health
83
Technical
61
Dependency
Built with
Python 100%
Updated 2 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers