{"id":51176152,"url":"https://github.com/vibedrift/vibedrift","last_synced_at":"2026-06-27T04:00:45.067Z","repository":{"id":365993571,"uuid":"1271687319","full_name":"VibeDrift/VibeDrift","owner":"VibeDrift","description":"Ship agentic. Stay coherent. Self-checking code integrity for AI coding agents, via MCP.","archived":false,"fork":false,"pushed_at":"2026-06-27T02:31:26.000Z","size":962,"stargazers_count":36,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-27T03:18:16.944Z","etag":null,"topics":["ai-agents","ai-coding","code-analysis","developer-tools","drift-detection","mcp","static-analysis","typescript"],"latest_commit_sha":null,"homepage":"https://vibedrift.ai","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/VibeDrift.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-16T23:16:55.000Z","updated_at":"2026-06-27T02:31:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/VibeDrift/VibeDrift","commit_stats":null,"previous_names":["vibedrift/vibedrift"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/VibeDrift/VibeDrift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VibeDrift%2FVibeDrift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VibeDrift%2FVibeDrift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VibeDrift%2FVibeDrift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VibeDrift%2FVibeDrift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VibeDrift","download_url":"https://codeload.github.com/VibeDrift/VibeDrift/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VibeDrift%2FVibeDrift/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34840899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-27T02:00:06.362Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-agents","ai-coding","code-analysis","developer-tools","drift-detection","mcp","static-analysis","typescript"],"created_at":"2026-06-27T04:00:44.326Z","updated_at":"2026-06-27T04:00:45.061Z","avatar_url":"https://github.com/VibeDrift.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"assets/vibedrift-logo.png\" alt=\"VibeDrift\" width=\"120\" height=\"120\" /\u003e\n\n# VibeDrift\n\n### Your AI agent gets worse as your project grows.\n\nIt forgets your patterns, repeats code, and breaks what worked. **VibeDrift catches the drift before it spreads** — locally, on your machine.\n\n[![Website](https://img.shields.io/badge/vibedrift.ai-FFD000?style=flat\u0026labelColor=1a1a1a)](https://vibedrift.ai) [![npm](https://img.shields.io/npm/v/@vibedrift/cli.svg?color=FFD000)](https://www.npmjs.com/package/@vibedrift/cli) [![Vibe Drift Score](https://img.shields.io/badge/Vibe_Drift_Score-72-9ACD32?style=flat\u0026labelColor=1a1a1a)](https://vibedrift.ai/guide) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE) [![Discord](https://img.shields.io/badge/Discord-join-5865F2?style=flat)](https://discord.gg/YVcQ65Jt3Q)\n\n**Free · Open source · Runs on your machine**\n\n\u003c/div\u003e\n\n---\n\nEvery fresh agent session starts with no memory of the conventions your codebase already settled on. So it makes reasonable choices that just aren't *your* choices. One handler throws a typed error; the next returns a plain object. Eight services use a repository layer; the ninth reaches for raw SQL. Everything compiles, everything passes review, and the codebase slowly stops agreeing with itself.\n\nThat gap is **drift** — and it's invisible to linters, because a linter checks one file at a time. VibeDrift checks your codebase *against itself*: it learns the patterns your code already agrees on, then flags every file that deviates, and points you at the exact line.\n\n\u003e Full documentation, the scoring guide, and what each finding means live at **[vibedrift.ai/guide](https://vibedrift.ai/guide)**.\n\n## Quick start\n\n```bash\nnpx @vibedrift/cli\n```\n\nThat's it. No install, no signup. Scans the current directory and opens an interactive HTML report. Your code never leaves your machine.\n\nInstall globally if you prefer:\n\n```bash\nnpm i -g @vibedrift/cli\nvibedrift                       # scan ./\nvibedrift ./path/to/project     # scan a specific path\n```\n\n## Configure once\n\nSet up exclusions and defaults in one step:\n\n```bash\nvibedrift init\n```\n\n`init` detects fixtures and generated code, then asks which paths to skip, your CI score floor, your default report format, and whether to install a pre-push hook. It writes two committable files: **`.vibedriftignore`** (which paths to skip) and **`.vibedrift/config.json`** (behavior — default format, CI threshold). Commit them so your whole team scans the same way.\n\nQuick one-offs without the wizard:\n\n```bash\nvibedrift ignore \"**/fixtures/**\"     # add a path glob to .vibedriftignore\nvibedrift --exclude \"**/*.spec.*\"     # skip files for a single scan\nvibedrift --include \"src/**\"          # scan only these for a single scan\n```\n\n`.vibedriftignore` uses gitignore syntax and is honored by **both the CLI and the MCP server**, so excluded paths stop counting toward your score in either (`init` and `ignore` refresh the baseline for you). Use it for test fixtures, generated code, and vendored files that aren't really *yours*.\n\n## What it finds\n\n- Architectural inconsistencies (half your handlers use a repository, the rest hit raw SQL)\n- Hidden duplicates: two functions doing the same thing under different names\n- Convention drift across naming, imports, error handling, async style, and logging\n- Security gaps: hardcoded secrets, injection risks, unsanitized input\n- Dead code, complexity hotspots, and half-finished or placeholder implementations\n\nUnder the hood, VibeDrift learns your repo's dominant patterns by majority vote, fingerprints logic with Code DNA to catch near-duplicates, and rolls findings into a **Vibe Drift Score** and a **Hygiene Score**. See [ARCHITECTURE.md](./ARCHITECTURE.md) for the engine and the [scoring guide](https://vibedrift.ai/guide) for how findings are weighted.\n\n**Supported languages:** JavaScript, TypeScript, Python, Go, Rust.\n\n## From detection to prevention\n\nCatching drift after it ships is a postmortem. The real win is checking *while* the agent writes.\n\n1. **Detect** — `vibedrift` scans your repo, scores it against its own conventions, and shows the evidence. Great for audits and CI gates.\n2. **Prevent in the loop** — the [MCP server](#mcp-server) lets your agent ask the codebase about itself *before* it writes a line, so new code matches the first time.\n3. **Prevent at the source** — [VibeLang](https://thevibelang.org), where behavioral intent becomes compiler-enforced, so drift can't compile.\n\nDetection tells you, in-loop prevention nudges you, language-level prevention makes it impossible. MCP is the rung that's live today.\n\n## Commands\n\n```\nvibedrift [path]            Scan a project (default command)\nvibedrift watch [path]      Re-scan on file changes (Pro)\nvibedrift mcp               Run the MCP server (Claude Code / Cursor / any MCP client)\nvibedrift login / logout    Account auth\nvibedrift status            Account, plan, and token\nvibedrift hook \u003caction\u003e     Install or remove a git pre-push drift gate\nvibedrift doctor            Diagnose install, auth, and API\nvibedrift update            Update to the latest version\n```\n\nCommon scan options:\n\n```\n--format \u003chtml|terminal|json|csv|docx\u003e   output format (html is the default)\n--fail-on-score \u003cn\u003e                       exit 1 if the score is below n (CI gate)\n--diff [ref]                              scan only files changed in git (vs HEAD, or vs a ref/branch)\n--deep                                    AI-powered deep analysis (requires login)\n--include / --exclude \u003cglob\u003e              filter the files scanned (repeatable)\n--write-context                           write committable .vibedrift/ context files\n--local-only                              skip every network call (fully offline)\n```\n\nRun `vibedrift --help` for the complete list.\n\n## Deep scan\n\n`vibedrift --deep` adds cloud-powered analysis that local static checks cannot do: semantic duplicate detection, name-versus-behavior intent checks, an in-loop Claude verdict on borderline matches, and a synthesized coherence report graded against your own patterns. Scope it to your change set with `--diff`:\n\n```bash\nvibedrift login\nvibedrift . --deep              # full-repo deep scan\nvibedrift . --deep --diff       # deep-scan only what you changed (fast pre-PR check)\nvibedrift . --deep --diff main  # deep-scan everything that differs from a branch\n```\n\nDeep scan sends function snippets only (never full files or file paths), processed in memory and not stored. The free tier includes a monthly allowance of deep scans; see [vibedrift.ai](https://vibedrift.ai) for current plans.\n\n## MCP server\n\nVibeDrift ships an MCP server so an AI coding agent can consult your repo's own conventions while it writes — turning drift detection into drift prevention. It exposes five tools:\n\n- `get_intent_hints` reads the conventions your `CLAUDE.md` / `AGENTS.md` / `.cursorrules` declare\n- `get_dominant_pattern` returns the repo's majority pattern for a dimension, with examples to copy\n- `check_file_drift` checks whether a file matches the repo's patterns\n- `find_similar_function` finds an existing near-duplicate so the agent reuses instead of rewriting\n- `validate_change` checks whether a proposed function would introduce drift or duplicate something\n\nThese tools run on your machine, send no code, and need no login. They build the repo's baseline automatically on first use. (The `validate_change` and `find_similar_function` tools can opt into a deeper semantic pass, which is the only part that's metered.)\n\n### Install in any MCP client\n\nVibeDrift is a standard [MCP](https://modelcontextprotocol.io) server launched over stdio with `npx -y @vibedrift/cli mcp`.\n\n**Claude Code** (writes the config for you):\n\n```bash\nclaude mcp add vibedrift -- npx -y @vibedrift/cli mcp\n```\n\n**Cursor, GitHub Copilot, Windsurf, Antigravity, OpenAI Codex, Kiro, Claude Desktop, VS Code, Zed, and any other MCP client** use the same command in their MCP config:\n\n```json\n{\n  \"mcpServers\": {\n    \"vibedrift\": { \"command\": \"npx\", \"args\": [\"-y\", \"@vibedrift/cli\", \"mcp\"] }\n  }\n}\n```\n\nIf a tool returns `no_baseline`, run `vibedrift` once in that repo to build it.\n\n### Without MCP\n\nThe same five tools are also a plain import and an Agent Skill over the same engine, for agents that do not speak MCP:\n\n- **Import:** `import { validateChange, findSimilarFunction } from \"@vibedrift/cli/tools\"` (see [docs/tools-api.md](./docs/tools-api.md))\n- **Agent Skill:** a self-contained skill at [`skills/vibedrift/`](./skills/vibedrift/SKILL.md)\n\n## CI integration\n\nA GitHub Action runs VibeDrift on pull requests, posts a score-delta comment, and can fail the check:\n\n```yaml\n# .github/workflows/vibedrift.yml\nname: VibeDrift\non: [pull_request]\npermissions:\n  pull-requests: write\njobs:\n  drift-check:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: skhan75/vibedrift-actions@v1\n        with:\n          fail-on-score: 70\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\nSee the [Action repository](https://github.com/skhan75/vibedrift-actions) for all inputs and outputs.\n\n## Privacy\n\n- **Your code never leaves your machine.** No source, file contents, or file paths are ever sent.\n- **Anonymous scan beacon, on by default for everyone.** After each scan VibeDrift sends a small anonymous beacon: language, file count, lines of code, scan time, CLI version, finding count, and score. No code, no paths, no identifiers. Turn it off with `vibedrift telemetry disable`, `VIBEDRIFT_TELEMETRY_DISABLED=1`, or `--local-only`.\n- **Update check.** Once a day, scans check the npm registry for a newer version (cached, fails silently, skipped under `--local-only`).\n- **`--local-only`** skips every network call, even when logged in.\n- Auth state lives at `~/.vibedrift/config.json` (mode 0600); scan history at `~/.vibedrift/scans/`, never in your project tree.\n\n### Environment variables\n\n| Variable | Purpose |\n|---|---|\n| `VIBEDRIFT_TOKEN` | Bearer token for CI / non-interactive use |\n| `VIBEDRIFT_API_URL` | Override the API base URL |\n| `VIBEDRIFT_TELEMETRY_DISABLED` | Set to `1` to turn off the beacon and update check |\n\n## Contributing\n\nContributions are welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md) for setup and how to add an analyzer, [AGENTS.md](./AGENTS.md) for codebase conventions, and [SECURITY.md](./SECURITY.md) for reporting security issues.\n\n## License\n\nMIT. See [LICENSE](./LICENSE). The CLI runs entirely on your machine; the optional cloud deep-scan service it talks to is a separate hosted product.\n\n## Links\n\n- **Website:** [vibedrift.ai](https://vibedrift.ai)\n- **Docs \u0026 scoring guide:** [vibedrift.ai/guide](https://vibedrift.ai/guide)\n- **Blog:** [vibedrift.ai/blog](https://vibedrift.ai/blog)\n- **Releases:** [vibedrift.ai/releases](https://vibedrift.ai/releases)\n- **FAQ:** [vibedrift.ai/faq](https://vibedrift.ai/faq)\n- **Issues:** [GitHub Issues](https://github.com/VibeDrift/VibeDrift/issues)\n- **Community:** [Discord](https://discord.gg/YVcQ65Jt3Q)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvibedrift%2Fvibedrift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvibedrift%2Fvibedrift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvibedrift%2Fvibedrift/lists"}