简体中文 | English
- Node.js 18+ (20+ recommended)
- Git (optional: git-lfs)
@lancedb/lancedbuses N-API prebuilt binaries, supporting win32/linux/darwin (x64/arm64). If installation fails, first check: Node version >=18 and architecture is x64/arm64.tree-sitter/tree-sitter-typescriptrely on native extensions, usually fetching prebuilt binaries; if your platform/Node version doesn't hit a prebuilt binary, you need a local build toolchain:- Windows: Install "Visual Studio Build Tools (C++)" and Python (required by node-gyp)
- Linux: Install
build-essential,python3(package names may vary by distro)
npm i
npm run buildThis project uses TypeScript to compile output to dist/.
npm run start -- --helpIt is recommended to use node dist/bin/git-ai.js ... to verify behavior after packaging:
npm run build
node dist/bin/git-ai.js --help
node dist/bin/git-ai.js ai --helpnpm i -g .
git-ai --versionnpm testTests will create two types of repositories (Spring Boot / Vue) in a temporary directory and verify:
git-aiproxies common git commandsgit-ai ai index/pack/unpack/hooks- MCP server tool exposure
cd /path/to/repo
git-ai ai index --overwrite
git-ai ai packgit-ai ai hooks install
git-ai ai hooks statusgit-ai ai serveMCP tools require path in every tool call to select the target repository (atomic, no implicit defaults).
- Ensure
npm run buildhas generateddist/** package.jsonfilesfield includesdist/**andassets/**- Confirm no sensitive info (tokens/keys) is committed before publishing
Repository provides a release workflow: when pushing tag v*, it will:
npm ci+npm testnpm packgenerate tgz and upload as Release asset- Publish to GitHub Packages (npm.pkg.github.com)
Note:
- GitHub Packages npm package names require a scope. The workflow will temporarily change the package name to
@<repo_owner>/git-aiduring publishing (without modifying source package.json). - To publish to npmjs.org simultaneously, please configure
NPM_TOKENin repository Secrets.