Type-safe API
Full TypeScript support with proper type inference and branded types for compile-time safety
Type-safe API
Full TypeScript support with proper type inference and branded types for compile-time safety
Multi-runtime
Works seamlessly with Node.js, Deno, and Bun through runtime-specific adapters
Git LFS Support
Built-in LFS support with real-time progress tracking for large file operations
Abort Control
Cancel long-running operations using the standard AbortController API
import { TypeGit } from 'type-git';import { nodeAdapter } from 'type-git/node';
const git = new TypeGit(nodeAdapter);
// Clone with progress trackingawait git.clone('https://github.com/user/repo.git', './repo', { progress: (p) => console.log(`${p.phase}: ${p.percent}%`),});
// Open and work with repositoryconst repo = await git.open('./repo');const status = await repo.status();console.log(status.files);