ai

(β˜… 3,009)

πŸ€– Type-safe, provider-agnostic TypeScript AI SDK for streaming chat, tool calling, agents, and multimodal apps across OpenAI, Anthropic, Gemini, React, Vue, Svelte, and Solid.

Showing a partial file list β€” download the zip above to see everything.

  • .cursorignore
  • .editorconfig
  • .gitattributes
  • .gitignore
  • .npmrc
  • .nvmrc
  • .oxfmtrc.json
  • .oxlintrc.json
  • AGENTS.md
  • CHANGELOG.md
  • CLAUDE.md
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • kiira.config.ts
  • knip.json
  • LICENSE
  • nx.json
  • package.json
  • README.md

# Installation Guide

1. Get the code
git clone https://github.com/TanStack/ai

Downloads the entire project code from GitHub to your computer.

cd ai

Moves into the project folder you just downloaded.

2. Node.js

Easy Recommended
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Node.js Node.js must be installed to use npm. The LTS version is recommended.
pnpm add @tanstack/ai @tanstack/ai-openai

Type this command into your terminal and run it.

pnpm add @tanstack/ai @tanstack/ai-client @tanstack/ai-react @tanstack/ai-openai

Type this command into your terminal and run it.

pnpm add @tanstack/ai @tanstack/ai-openrouter

Type this command into your terminal and run it.

<img alt="NPM downloads" src="https://img.shields.io/npm/dm/@tanstack/ai.svg" />

Type this command into your terminal and run it.

βœ… After running the command, open the address shown in the terminal (usually something like http://localhost:3000) in your browser.

Pulled directly from this repo's README.

// repository documentation