{"id":47630433,"url":"https://github.com/maxgfr/csv-ai-analyzer","last_synced_at":"2026-04-06T11:00:31.165Z","repository":{"id":328290652,"uuid":"1110751478","full_name":"maxgfr/csv-ai-analyzer","owner":"maxgfr","description":"A self-hosted, browser-based AI CSV analyzer","archived":false,"fork":false,"pushed_at":"2026-04-02T06:31:43.000Z","size":11897,"stargazers_count":75,"open_issues_count":1,"forks_count":8,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-02T23:52:04.121Z","etag":null,"topics":["ai","browser","chatbot","chatgpt","csv","csv-files","data-analysis","data-visualization","local-first","nextjs","openai","papaparse","privacy","self-hosted"],"latest_commit_sha":null,"homepage":"https://maxgfr.github.io/csv-ai-analyzer","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxgfr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-05T17:01:37.000Z","updated_at":"2026-04-02T06:31:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/maxgfr/csv-ai-analyzer","commit_stats":null,"previous_names":["maxgfr/csv-ai-analyzer"],"tags_count":39,"template":false,"template_full_name":null,"purl":"pkg:github/maxgfr/csv-ai-analyzer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxgfr%2Fcsv-ai-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxgfr%2Fcsv-ai-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxgfr%2Fcsv-ai-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxgfr%2Fcsv-ai-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxgfr","download_url":"https://codeload.github.com/maxgfr/csv-ai-analyzer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxgfr%2Fcsv-ai-analyzer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31469743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T08:36:52.050Z","status":"ssl_error","status_checked_at":"2026-04-06T08:36:51.267Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","browser","chatbot","chatgpt","csv","csv-files","data-analysis","data-visualization","local-first","nextjs","openai","papaparse","privacy","self-hosted"],"created_at":"2026-04-01T23:22:06.534Z","updated_at":"2026-04-06T11:00:31.103Z","avatar_url":"https://github.com/maxgfr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📊 CSV AI Analyzer\n\n[![Live Demo](https://img.shields.io/badge/demo-live-brightgreen.svg)](https://maxgfr.github.io/csv-ai-analyzer)\n[![Next.js](https://img.shields.io/badge/Next.js-black.svg)](https://nextjs.org/)\n[![TailwindCSS](https://img.shields.io/badge/TailwindCSS-38bdf8.svg)](https://tailwindcss.com/)\n[![Docker](https://img.shields.io/badge/Docker-ready-2496ED.svg)](https://www.docker.com/)\n[![npm](https://img.shields.io/npm/v/csv-charts-ai.svg)](https://www.npmjs.com/package/csv-charts-ai)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\u003e 🚀 **[Try it live →](https://maxgfr.github.io/csv-ai-analyzer)**\n\nApp preview:\n\n![CSV AI Analyzer preview](.github/assets/app.gif)\n\nA modern, elegant application to analyze your CSV and Excel (.xlsx) files with Artificial Intelligence using multiple AI providers (OpenAI, Anthropic, Google, Mistral, and more). **Privacy-first**: the app does not store your data. Use a self-hosted/custom endpoint to keep processing entirely local; otherwise API calls go to the selected provider. **Self-hostable** with Docker.\n\n## ✨ Features\n\n### 📁 File Upload \u0026 Parsing\n- **Drag \u0026 Drop** or file selection — supports **CSV** and **Excel (.xlsx)** files\n- **Automatic detection** of delimiters (comma, semicolon, tab) for CSV files\n- **Configurable settings**: delimiter, header row, encoding\n- **Type inference** for columns (text, number, date)\n\n### 📋 Data Visualization\n- **Interactive table** with sorting and pagination\n- **Data preview** with automatic formatting\n- **Smooth navigation** for large datasets\n\n### 🤖 AI-Powered Analysis\n- **Multiple AI providers**: OpenAI, Anthropic Claude, Google Gemini, Mistral, and more\n- **Custom endpoint support**: Connect to Ollama, LM Studio, vLLM, or any OpenAI-compatible API\n- **Intelligent analysis** of your data with AI-generated insights\n- **Markdown rendering**: AI responses rendered with full Markdown support (headings, lists, tables, syntax-highlighted code blocks)\n- **Streaming with Markdown**: Real-time streaming responses are rendered progressively as formatted Markdown\n- **Smart chart suggestions** tailored to your dataset\n- **Chart types**: Bar, Line, Pie, Scatter, Area\n\n### 🔒 Privacy\n- **Local or direct-to-provider**: the app does not store your data. Processing can happen in your browser when using a self-hosted/custom endpoint; otherwise API calls go directly to the chosen AI provider.\n- **API keys stored locally** in your browser\n- **No tracking** or third-party cookies\n\n### 🐳 Self-Hostable\n- **Docker ready**: Deploy in seconds with a single command\n- **Custom AI endpoints**: Use your own LLM server (Ollama, LM Studio, vLLM, etc.)\n- **Full control**: Host on your own infrastructure\n\n## 🚀 Installation\n\n### Option 1: Local Development\n\n```bash\n# Clone the repo\ngit clone https://github.com/maxgfr/csv-ai-analyzer.git\ncd csv-ai-analyzer\n\n# Install dependencies\npnpm install\n\n# Run in development\npnpm dev\n```\n\nThe application will be accessible at [http://localhost:3000](http://localhost:3000)\n\n### Auto-updating the models catalog\n\nThis project ships a static `public/models.json` that contains the models catalog fetched from `https://models.dev/api.json`.\n\n- You can regenerate the file locally with:\n\n```bash\npnpm run fetch-models\n```\n\n- A GitHub Action is configured to run this script once per day and automatically commit `public/models.json` if it changes.\n\n  - Workflow: `.github/workflows/update-models.yml`\n  - Runs daily (UTC 06:00) and is also triggerable manually with `workflow_dispatch`.\n\nIf you'd like the file to be refreshed more/less often you can update the cron schedule in the workflow file.\n\n### Option 2: Docker (Self-Hosting)\n\n```bash\n# Build the Docker image\ndocker build -t csv-ai-analyzer .\n\n# Run the container\ndocker run -p 3000:3000 csv-ai-analyzer\n```\n\nOr use Docker Compose:\n\n```yaml\n# docker-compose.yml\nversion: '3.8'\nservices:\n  csv-ai-analyzer:\n    build: .\n    ports:\n      - \"3000:3000\"\n    restart: unless-stopped\n```\n\n```bash\ndocker compose up -d\n```\n\nThe application will be accessible at [http://localhost:3000](http://localhost:3000)\n\nOr use the **[live version](https://maxgfr.github.io/csv-ai-analyzer)** directly!\n\n## 🎮 Usage\n\n### 1. Upload a File\n\nDrag and drop your CSV or Excel (.xlsx) file, or click to select a file.\n\n### 2. Configure Parsing (Optional)\n\nIf automatic detection doesn't work perfectly, adjust the settings:\n\n- Custom delimiter\n- Header row choice\n- File encoding\n\n### 3. Configure your AI Provider\n\nClick the ⚙️ icon to configure your AI provider:\n\n- **Choose a provider**: OpenAI, Anthropic, Google, Mistral, or others\n- **Enter your API key**: Each provider has its own API key format\n- **Custom Endpoint**: Enable \"Use Custom Endpoint\" to connect to local/self-hosted OpenAI-compatible APIs (Ollama, LM Studio, vLLM, etc.)\n\n#### Using Custom Endpoints (Ollama, LM Studio, vLLM, etc.)\n\n1. Toggle \"Use Custom Endpoint\" in settings\n2. Enter your API Base URL (e.g., `http://localhost:11434/v1` for Ollama)\n3. Enter your model name (e.g., `llama3.2`, `mistral`, `codellama`)\n4. API key is optional for most local servers\n\n**Example configurations:**\n\n| Provider | Base URL | Model Examples |\n|----------|----------|----------------|\n| Ollama | `http://localhost:11434/v1` | `llama3.2`, `mistral`, `codellama` |\n| LM Studio | `http://localhost:1234/v1` | Model name from LM Studio |\n| vLLM | `http://localhost:8000/v1` | Your loaded model name |\n| OpenRouter | `https://openrouter.ai/api/v1` | `openai/gpt-4o`, `anthropic/claude-3` |\n\n### 4. Analysis \u0026 Charts\n\nClick \"Run Complete Analysis\" and the AI will analyze your data, detect anomalies, and suggest relevant visualizations.\n\n## 📦 `csv-charts-ai` — Standalone Library\n\nThe core of this project is published as a standalone npm package [`csv-charts-ai`](https://www.npmjs.com/package/csv-charts-ai) — a full-featured library for AI-powered CSV analysis, chart generation, and interactive visualization. It works with **any LLM provider** (OpenAI, Anthropic, Google, Mistral, Ollama, or any OpenAI-compatible endpoint).\n\nUse it in React apps, Node.js scripts, APIs, or CLI tools.\n\n### Installation\n\n```bash\npnpm add csv-charts-ai\n```\n\nCore utilities are bundled. AI providers are **pluggable** — install only the ones you need (`@ai-sdk/openai`, `@ai-sdk/anthropic`, etc.). **Optional peer dependencies** (for React chart components only): `react`, `recharts`.\n\n### Quick Start — Full AI Analysis\n\n```ts\nimport { registerProvider, fromSDK, parseCSV, analyzeData } from \"csv-charts-ai\";\nimport { createOpenAI } from \"@ai-sdk/openai\";\n\n// 1. Register your AI provider(s) — once, at app startup\nregisterProvider(\"openai\", fromSDK(createOpenAI));\n\n// 2. Parse any CSV string (auto-detects delimiter, infers types)\nconst data = parseCSV(csvString);\n\n// 3. Run full analysis: summary + anomalies + charts in parallel\nconst result = await analyzeData({\n  model: { apiKey: \"sk-...\", model: \"gpt-4o\" },\n  data,\n});\n\nconsole.log(result.summary.keyInsights);\nconsole.log(`Found ${result.anomalies.length} anomalies`);\nconsole.log(`Generated ${result.charts.length} chart suggestions`);\n```\n\n### React Components\n\nChart components live in a separate entry point (`csv-charts-ai/charts`) so the core stays React-free:\n\n```tsx\nimport { ChartDisplay, defaultDarkTheme } from \"csv-charts-ai/charts\";\n\n// Display AI-generated charts with interactive toolbar (zoom, sort, trendline, export)\n\u003cChartDisplay data={data} charts={charts} theme={defaultDarkTheme} /\u003e\n\n// Unstyled mode — strip all Tailwind classes and style it yourself\n\u003cChartDisplay data={data} charts={charts} unstyled className=\"my-charts\" /\u003e\n```\n\n### Multi-Provider Support\n\nRegister only the providers you use, then pass config objects or `LanguageModel` instances:\n\n```ts\nimport { registerProvider, fromSDK } from \"csv-charts-ai\";\nimport { createOpenAI } from \"@ai-sdk/openai\";\nimport { createAnthropic } from \"@ai-sdk/anthropic\";\n\nregisterProvider(\"openai\", fromSDK(createOpenAI));\nregisterProvider(\"anthropic\", fromSDK(createAnthropic));\n\n// OpenAI (default)\n{ apiKey: \"sk-...\", model: \"gpt-4o\" }\n\n// Anthropic\n{ apiKey: \"sk-ant-...\", model: \"claude-sonnet-4-20250514\", provider: \"anthropic\" }\n\n// Ollama / vLLM / LM Studio (local, uses openai provider)\n{ apiKey: \"\", model: \"llama3\", baseURL: \"http://localhost:11434/v1\" }\n\n// Any Vercel AI SDK LanguageModel instance (no registration needed)\nconst anthropic = createAnthropic({ apiKey: \"sk-ant-...\" });\nsuggestCharts({ model: anthropic(\"claude-sonnet-4-20250514\"), data });\n```\n\n### AI Functions Reference\n\n| Function | Description |\n|----------|-------------|\n| `analyzeData()` | Full pipeline: summary + anomalies + charts in parallel |\n| `suggestCharts()` | Generate 2–4 chart suggestions from data |\n| `suggestCustomChart()` | Generate a single chart from a text prompt |\n| `repairChart()` | Fix a chart config that failed to render |\n| `summarizeData()` | AI-generated data summary with key insights |\n| `detectAnomalies()` | Find outliers, missing values, type mismatches |\n| `askAboutData()` | Ask natural-language questions about data |\n| `streamAskAboutData()` | Streaming version with `onChunk` callback |\n| `suggestQuestions()` | Suggest interesting questions to ask about the data |\n\n### React Components Reference (`csv-charts-ai/charts`)\n\n| Component | Description |\n|-----------|-------------|\n| `ChartDisplay` | Multi-chart container with optional card wrapper and theme |\n| `SingleChart` | Individual chart with toolbar (sort, zoom, trendline, CSV/PNG export) |\n| `ChartToolbar` | Standalone toolbar component |\n| `ChartThemeProvider` | React context for chart theming |\n| `ChartIconProvider` | React context for pluggable icons (default: built-in SVGs) |\n| `defaultDarkTheme` / `defaultLightTheme` | Built-in themes |\n\n### Utilities Reference\n\n| Utility | Description |\n|---------|-------------|\n| `parseCSV(csv, options?)` | Parse CSV string into `TabularData` with auto-delimiter detection |\n| `parseXLSX(file, options?)` | Parse XLSX file into `TabularData` (browser) |\n| `computeDiff(dataA, dataB, options)` | Compare two datasets (index, key, or content matching) |\n| `generateDataSummary(data)` | Detailed human-readable data summary |\n| `registerProvider()` / `fromSDK()` | Register AI providers (pluggable) |\n| `createModel()` / `createAppModel()` | Create a `LanguageModel` from config |\n| `processChartData()` | Process and aggregate chart data |\n| `COLORS` | Default 8-color palette |\n\nChart types: `bar`, `line`, `area`, `scatter`, `pie`. Aggregations: `sum`, `avg`, `count`, `min`, `max`, `none`. Multi-series supported via `groupBy`.\n\nSee the full documentation with all options and examples in [`packages/csv-charts-ai/README.md`](packages/csv-charts-ai/README.md).\n\n## 🛠️ Tech Stack\n\n| Technology | Usage |\n|-------------|-------|\n| **Next.js** | React Framework with App Router |\n| **TailwindCSS** | Styling and design system |\n| **PapaParse** | Client-side CSV parsing |\n| **read-excel-file** | Lightweight XLSX parsing (~35 KB) |\n| **Recharts** | React charting library |\n| **react-markdown** | Markdown rendering for AI responses |\n| **rehype-highlight** | Syntax highlighting in code blocks |\n| **Lucide React** | Modern icons |\n| **js-cookie** | Secure local persistence |\n| **tsup** | Package bundling for `csv-charts-ai` |\n| **semantic-release** | Automated npm publishing via CI |\n\n## 📁 Project Structure\n\n```\ncsv-ai-analyzer/\n├── src/                          # Next.js application\n│   ├── app/_components/          # React components\n│   ├── lib/                      # Services, parsers, stores\n│   └── styles/                   # Global CSS\n├── packages/\n│   └── csv-charts-ai/            # csv-charts-ai npm package\n│       ├── src/                   # Package source (ChartDisplay, SingleChart, etc.)\n│       ├── dist/                  # Built output (ESM + .d.ts)\n│       └── package.json\n├── pnpm-workspace.yaml           # Monorepo workspace config\n└── package.json                  # Root app\n```\n\n## 📝 License\n\nMIT - Use as you wish!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxgfr%2Fcsv-ai-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxgfr%2Fcsv-ai-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxgfr%2Fcsv-ai-analyzer/lists"}