{"id":47740294,"url":"https://github.com/kaicontext/kai","last_synced_at":"2026-04-11T15:14:53.196Z","repository":{"id":328411370,"uuid":"1114929612","full_name":"kaicontext/kai","owner":"kaicontext","description":"Kai is a semantic analysis engine that sits on top of Git. It captures meaningful changes, generates semantic diffs, and produces safe selective CI plans.","archived":false,"fork":false,"pushed_at":"2026-04-02T18:15:13.000Z","size":27765,"stargazers_count":10,"open_issues_count":28,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T08:31:44.502Z","etag":null,"topics":["call-graph","cli","code-intelligence","developer-tools","golang","mcp","model-context-protocol","semantic-analysis","semantic-diff"],"latest_commit_sha":null,"homepage":"https://kailayer.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaicontext.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-12T05:07:25.000Z","updated_at":"2026-04-02T20:21:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"9f44c968-72c4-4b27-aa38-0307386be484","html_url":"https://github.com/kaicontext/kai","commit_stats":null,"previous_names":["kailayerhq/kai","kaicontext/kai"],"tags_count":50,"template":false,"template_full_name":null,"purl":"pkg:github/kaicontext/kai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaicontext%2Fkai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaicontext%2Fkai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaicontext%2Fkai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaicontext%2Fkai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaicontext","download_url":"https://codeload.github.com/kaicontext/kai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaicontext%2Fkai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31509941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["call-graph","cli","code-intelligence","developer-tools","golang","mcp","model-context-protocol","semantic-analysis","semantic-diff"],"created_at":"2026-04-02T23:39:57.735Z","updated_at":"2026-04-07T11:00:57.263Z","avatar_url":"https://github.com/kaicontext.png","language":"Go","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"kai.webp\" alt=\"Kai Logo\" width=\"400\"\u003e\n\u003c/p\u003e\n\n# Kai\n\n**Semantic infrastructure for code change.**\n\nKai understands what code *means* — functions, dependencies, behavior impact —\nnot just which lines changed. This semantic graph powers precise CI,\ncontext-aware IDEs, and verifiable AI coding agents.\n\n[kaicontext.com](https://kaicontext.com) · [Docs](https://docs.kaicontext.com) · [Slack](https://join.slack.com/t/kailayer/shared_invite/zt-3q8ulczwl-vkZ05GQH~kwudonmH53hGg)\n\n---\n\n## Install\n\n```bash\n# curl\ncurl -sSL https://get.kaicontext.com | sh\n\n# Homebrew\nbrew install kaicontext/kai/kai\n```\n\n## Quick Start\n\n```bash\nkai init                      # Detects git, offers history import + auto-sync\nkai capture -m \"Initial\"      # Snapshot your code with a message\nkai push                      # Push to kaicontext.com\nkai diff                      # Semantic change impact\n```\n\nIn a git repo, `kai init` will:\n1. Offer to **import git history** as semantic snapshots\n2. Install a **post-commit hook** for automatic capture on each commit\n3. Generate a **GitHub Actions / GitLab CI** workflow to keep Kai in sync\n\nFor full command reference, see [docs/cli-reference.md](docs/cli-reference.md).\n\n---\n\n## MCP Server\n\nKai ships an [MCP](https://modelcontextprotocol.io) server that gives AI coding assistants\naccess to call graphs, dependency maps, impact analysis, and test coverage.\n\n```bash\n# Claude Code\nclaude mcp add kai -- kai mcp serve\n\n# Or without installing kai (npx downloads it automatically)\nclaude mcp add kai -- npx -y kai-mcp\n```\n\nNo setup required — the server lazily initializes the semantic graph on first use.\n\n12 tools: `kai_status`, `kai_symbols`, `kai_files`, `kai_diff`, `kai_impact`, `kai_callers`, `kai_callees`, `kai_context`, `kai_dependencies`, `kai_dependents`, `kai_tests`, `kai_refresh`.\n\nSee [docs/mcp.md](docs/mcp.md) for Cursor setup, tool reference, and troubleshooting.\n\n---\n\n## Code Reviews\n\nKai reviews are anchored to semantic changesets, not line diffs.\n\n```bash\nkai review open --title \"Add auth middleware\"   # Create a review\nkai push                                         # Push to kaicontext.com\nkai fetch --review abc123                        # Sync comments from web\nkai review comments abc123                       # View inline comments locally\n```\n\nOn the web, reviews show semantic diffs (what functions changed, not just which lines), inline commenting, and one-click merge that updates `snap.main`.\n\n---\n\n## CI Integration\n\nKai CI runs workflows defined in `.kailab/workflows/` with semantic checkout, parallel jobs, and 30-minute default timeouts.\n\n```bash\nkai ci runs                   # List CI runs\nkai ci logs 42                # View logs for run #42\nkai ci cancel 42              # Cancel a run\nkai capture -m \"Fix bug\"      # Message shows as CI run headline\n```\n\nEmail notifications on pipeline completion are sent to the snapshot author via Postmark.\n\n---\n\n## What Kai Builds\n\nFor every capture, Kai constructs a queryable semantic model:\n\n| Layer | What It Captures |\n|-------|----------------|\n| **Functions \u0026 methods** | Signatures, bodies, call graphs |\n| **Dependencies** | Module relationships, imports, data flow |\n| **Behavior changes** | What actually changed in meaning, not just text |\n| **Test coverage** | Which tests cover which source files (static + transitive) |\n\nThis graph is immutable, content-addressed, and designed for machine reasoning.\n\n---\n\n## Use Cases\n\n### Selective CI\nKai determines which tests actually need to run based on behavioral impact,\nnot file diffs. Result: 80% CI time reduction for early users.\n\n### AI Code Context\n12 MCP tools give AI assistants structured access to your codebase's\ndependency graph, call graph, impact analysis, and test coverage.\n\n### Code Reviews\nSemantic diff shows *what changed* (function added, condition modified, API changed)\ninstead of raw line diffs. Inline comments anchored to symbols, not lines.\n\n### Verified AI Agents\nAgent proposes edit → Kai validates impact →\nagent executes with proof, not generation with hope.\n\n---\n\n## Language Support\n\nKai uses [tree-sitter](https://tree-sitter.github.io/) for parsing and builds semantic graphs for 9 languages.\nEach language is validated with [end-to-end tests](kai-e2e/) against real open-source projects:\n\n| Language | Symbols | Callers/Callees | Dependencies | Tests | Impact | E2E Fixtures |\n|----------|---------|-----------------|--------------|-------|--------|-------------|\n| **Go** | functions, methods, interfaces, structs | cross-package via import aliases | Go package resolution | same-dir `_test.go` + transitive | via dependency graph | [chi](https://github.com/go-chi/chi), [lo](https://github.com/samber/lo) |\n| **Rust** | functions, structs, enums, traits, impl methods, macros | cross-file via exports | `crate::`, `super::`, `self::`, `mod`, wildcards | filename pattern matching for integration tests | via dependency graph | [just](https://github.com/casey/just), [miniserve](https://github.com/svenstaro/miniserve) |\n| **TypeScript/JavaScript** | functions, classes, methods, variables | via imports | relative + workspace resolution | `*.test.ts`, `__tests__/` patterns | via dependency graph | — |\n| **Python** | functions, classes, methods | via imports | dotted module resolution | `test_*.py`, `*_test.py` patterns | via dependency graph | — |\n| **Ruby** | methods, classes, modules | via exports | `require`, `require_relative`, Zeitwerk autoload | `*_spec.rb`, `*_test.rb` patterns | via dependency graph | — |\n| **SQL** | — | — | — | — | — | — |\n| **PHP** | functions, classes, methods | — | — | — | — | — |\n| **C#** | functions, classes, methods | — | — | — | — | — |\n\n67 E2E tests across Go and Rust, all passing. Run them with:\n\n```bash\ncd kai-e2e \u0026\u0026 ./scripts/run-tests.sh\n```\n\n---\n\n## Architecture\n\nKai is fully open source under Apache 2.0: core engine, CLI, and server.\nKai Cloud is the hosted version — same code, managed infrastructure.\n\n```\nkai capture → local semantic graph (SQLite)\nkai push    → kaicontext.com (Postgres + GCS)\n                ├── File viewer with search, language breakdown\n                ├── CI with SSE live updates\n                ├── Code reviews with semantic diffs\n                └── Email notifications (Postmark)\n```\n\nSee [What's Open Source vs. Kai Cloud](docs/architecture-boundary.md).\n\n---\n\n## License\n\n[![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nSee [LICENSE](LICENSE).\n\n---\n\n## Community \u0026 Contributing\n\n- [Slack](https://join.slack.com/t/kailayer/shared_invite/zt-3q8ulczwl-vkZ05GQH~kwudonmH53hGg)\n- [Contributing guidelines](CONTRIBUTING.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaicontext%2Fkai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaicontext%2Fkai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaicontext%2Fkai/lists"}