bgauryy/octocode

View on GitHub ↗

Code research platform for AI agents; find, understand, and prove context across your code and all of GitHub, in a fraction of the tokens. One toolset, MCP or CLI

913 ★77 forksTypeScriptUpdated 1mo ago

What you need to know

Evidence-first code research platform for AI agents and developers — search and read GitHub repos, PRs, issues, npm packages, and local code through a Rust-backed engine, exposed as both a CLI and an MCP server with compact, token-efficient, secrets-redacted results.

Install

npx octocode --help (CLI; requires Node.js 20.12+)
MCP (new Rust engine): npx @octocodeai/mcp@latest; classic: npx octocode-mcp@latest
npx octocode auth login (optional but unlocks private repos and higher API rate limits)

Usage

  • •Run tools directly: npx octocode tools localSearchCode --queries '{"path":".","searchText":"authenticate"}'
  • •MCP: install via one-click (Cursor/VS Code/Windsurf/Kiro/Goose/LM Studio) or claude mcp add-json octocode --scope user '{"command":"npx","type":"stdio","args":["@octocodeai/mcp@latest"]}'
  • •Config: env vars or <octocode-home>/.octocoderc (tokens never in .octocoderc); set ENABLE_LOCAL=true and ENABLE_CLONE=true to turn on local tools / cloning on MCP
  • •Skills: npx octocode skill install octocode-research --platform pi

Key features

  • ✓17 tools: GitHub code/file/repo/PR/issue/commit/release/discussion search, clone (ghCloneRepo), local search incl. structural AST queries, localFindDeadCode, npm search, and LSP semantic navigation (definition/references/callers/callees/callHierarchy)
  • ✓Rust engine minifies and skeletonizes code across 70+ languages so a 100 KB file reads in a few hundred tokens
  • ✓Secret redaction on every byte in and out (300+ provider credential patterns, JWT, PEM, tokens); sensitive files blocked by default
  • ✓Benchmarked ~5x leaner context vs gh+rtk / gh+Headroom at near-ceiling correctness on 25 research questions
  • ✓13 bundled agent skills (research, brainstorming, RFC-generator, roast, subagent, etc.)
  • ✓Works without GitHub: clone any repo locally and point local tools at it

Best for

Deep, exact, cross-repository research before an agent changes code — dependency tracing, call-graph proof, PR review threads, and version-range facts

Caveats

  • ⚠GitHub-backed tools require auth (Octocode OAuth, gh auth login, or PAT with repo/read:user/read:org)
  • ⚠MCP defaults local tools and clone OFF (ENABLE_LOCAL=true / ENABLE_CLONE=true); ghListReleases and ghSearchDiscussions are opt-in on both surfaces
  • ⚠LSP navigation needs installed language servers (JS/TS have a native no-server path)
  • ⚠Node.js 20.12+ required; prebuilt Rust engine needs glibc/musl on Linux and x64/arm64 arch
Platforms: macOS · Linux · WindowsClients: Cursor · VS Code · Windsurf · Kiro · Goose · LM Studio · Claude Code · Pi
Documentation ↗

Reviewed 2026-08-07

Topics

Stars
913★
Forks
77
Language
TypeScript
License
MIT
Created
2025-06-05
Last push
2026-08-12