Installation
Requirements
- Node.js: 20.0.0 or higher
- Deno: 1.40 or higher
- Bun: 1.0 or higher
- Git: Must be installed and available in PATH
Package Installation
npm install type-gitpnpm add type-gityarn add type-gitbun add type-gitRuntime Setup
type-git provides pre-configured classes for each runtime:
Node.js
import { TypeGit } from 'type-git/node';
const git = new TypeGit();Deno
import { TypeGit } from 'npm:type-git/deno';
const git = new TypeGit();Bun
import { TypeGit } from 'type-git/bun';
const git = new TypeGit();Verifying Installation
import { TypeGit } from 'type-git/node';
const git = new TypeGit();const version = await git.version();console.log('Git version:', version);