Quick Start
Installation
npm install type-gitpnpm add type-gitimport { TypeGit } from 'npm:type-git';import { denoAdapter } from 'npm:type-git/deno';bun add type-gitBasic Usage
Using TypeGit Class (Recommended)
import { TypeGit } from 'type-git';import { nodeAdapter } from 'type-git/node';
const git = new TypeGit(nodeAdapter);
// Clone a repositoryawait git.clone('https://github.com/user/repo.git', './my-repo');
// Open existing repositoryconst repo = await git.open('./my-repo');
// Check statusconst status = await repo.status();console.log('Modified files:', status.files.filter(f => f.isModified));Using Factory Function
import { createGit } from 'type-git';import { nodeAdapter } from 'type-git/node';
const git = createGit(nodeAdapter);Next Steps
- Installation Guide - Detailed installation instructions
- Basic Usage - Learn the core concepts
- API Reference - Complete API documentation