{"id":49284282,"url":"https://github.com/mr-karan/hodor","last_synced_at":"2026-04-25T20:31:37.447Z","repository":{"id":323662978,"uuid":"1090250497","full_name":"mr-karan/hodor","owner":"mr-karan","description":"Agentic code reviewer for GitHub PRs and GitLab MRs. Multi-step reasoning with autonomous tool orchestration — catches bugs requiring analysis across files.","archived":false,"fork":false,"pushed_at":"2026-03-25T10:29:43.000Z","size":767,"stargazers_count":93,"open_issues_count":4,"forks_count":8,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-26T11:39:09.221Z","etag":null,"topics":["agent","ai","ci-cd","code-quality","code-review","developer-tools","litellm","openhands"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mr-karan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-11-05T12:20:40.000Z","updated_at":"2026-03-25T10:29:47.000Z","dependencies_parsed_at":"2026-03-04T08:01:54.160Z","dependency_job_id":null,"html_url":"https://github.com/mr-karan/hodor","commit_stats":null,"previous_names":["mr-karan/hodor"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/mr-karan/hodor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-karan%2Fhodor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-karan%2Fhodor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-karan%2Fhodor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-karan%2Fhodor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mr-karan","download_url":"https://codeload.github.com/mr-karan/hodor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-karan%2Fhodor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32276432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"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":["agent","ai","ci-cd","code-quality","code-review","developer-tools","litellm","openhands"],"created_at":"2026-04-25T20:31:34.377Z","updated_at":"2026-04-25T20:31:37.441Z","avatar_url":"https://github.com/mr-karan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://zerodha.tech\"\u003e\u003cimg src=\"https://zerodha.tech/static/images/github-badge.svg\" align=\"right\" /\u003e\u003c/a\u003e\n\n# Hodor\n\n\u003e Agentic code reviewer for GitHub PRs, GitLab MRs, and local diffs. Powered by the [pi-coding-agent](https://github.com/badlogic/pi-mono) SDK.\n\nHodor runs as a stateful agent with tools (`bash`, `grep`, `read`, `git diff`) to autonomously analyze code changes, find bugs, and post structured reviews.\n\n## Install\n\n```bash\n# Just run it (zero install, always latest)\nnpx @mrkaran/hodor \u003cPR_URL\u003e\n\n# Or install globally\nnpm install -g @mrkaran/hodor\n```\n\nDocker images are also available at `ghcr.io/mr-karan/hodor:latest` for CI environments.\n\n## Setup\n\n```bash\n# Set an API key for your LLM provider\nexport ANTHROPIC_API_KEY=sk-...   # Anthropic (default)\nexport OPENAI_API_KEY=sk-...      # OpenAI\nexport AWS_PROFILE=default        # AWS Bedrock (no API key needed)\n\n# For posting reviews as comments\ngh auth login                     # GitHub\nglab auth login                   # GitLab\n```\n\n## Usage\n\n```bash\n# Review a GitHub PR\nnpx @mrkaran/hodor https://github.com/owner/repo/pull/123\n\n# Review a GitLab MR (including self-hosted)\nnpx @mrkaran/hodor https://gitlab.example.com/org/project/-/merge_requests/42\n\n# Post the review as a PR/MR comment\nnpx @mrkaran/hodor \u003cPR_URL\u003e --post\n\n# Use a different model\nnpx @mrkaran/hodor \u003cPR_URL\u003e --model openai/gpt-5\nnpx @mrkaran/hodor \u003cPR_URL\u003e --model bedrock/converse/anthropic.claude-sonnet-4-5-v2\n\n# Extended reasoning for complex PRs\nnpx @mrkaran/hodor \u003cPR_URL\u003e --reasoning-effort high\n\n# Custom review instructions\nnpx @mrkaran/hodor \u003cPR_URL\u003e --prompt \"Focus on SQL injection and auth bypasses\"\n\n# Verbose mode (watch the agent think)\nnpx @mrkaran/hodor \u003cPR_URL\u003e -v\n```\n\n\u003e If you installed globally with `npm install -g`, replace `npx @mrkaran/hodor` with `hodor`.\n\n## Local Mode\n\nReview local git changes without a PR URL. Useful for pre-push reviews, Bitbucket PRs, or any git repo.\n\n```bash\n# Review uncommitted changes against origin/main (default)\nnpx @mrkaran/hodor --local\n\n# Review against a specific branch or ref\nnpx @mrkaran/hodor --local --diff-against develop\nnpx @mrkaran/hodor --local --diff-against HEAD~3\n\n# Review a feature branch against main\ngit checkout feature-branch\nnpx @mrkaran/hodor --local --diff-against origin/main\n\n# Use a specific workspace directory\nnpx @mrkaran/hodor --local --workspace /path/to/repo\n\n# Combine with other flags\nnpx @mrkaran/hodor --local --diff-against origin/main --model openai/gpt-5 -v\n```\n\nLocal mode:\n- Includes **uncommitted changes** (staged + unstaged), not just commits\n- Auto-resolves to the **git repo root** (works from subdirectories)\n- Skips PR metadata fetching and workspace cloning\n- `--post` is disabled (no remote to post to)\n\n## CLI Flags\n\n| Flag | Default | Description |\n|------|---------|-------------|\n| `--model` | `anthropic/claude-sonnet-4-5-20250929` | LLM model (Anthropic, OpenAI, or Bedrock) |\n| `--reasoning-effort` | – | Extended thinking: `low`, `medium`, `high` |\n| `--ultrathink` | Off | Maximum reasoning effort |\n| `--local` | Off | Review local git changes (no PR URL required) |\n| `--diff-against` | `origin/main` | Git ref to diff against in `--local` mode |\n| `--post` | Off | Post review as a comment on the PR/MR |\n| `--prompt` | – | Append custom instructions to the review prompt |\n| `--prompt-file` | – | Use a custom prompt file |\n| `--workspace` | Temp dir | Workspace directory (reuse for faster multi-PR reviews) |\n| `--bedrock-tags` | – | JSON cost allocation tags for AWS Bedrock |\n| `--prometheus-push` | – | Push review metrics to a Prometheus Pushgateway |\n| `-v, --verbose` | Off | Stream agent reasoning and tool calls |\n\n## Environment Variables\n\n| Variable | Purpose |\n|----------|---------|\n| `ANTHROPIC_API_KEY` | Claude API key |\n| `OPENAI_API_KEY` | OpenAI API key |\n| `LLM_API_KEY` | Generic fallback (when provider-specific key is not set) |\n| `GITHUB_TOKEN` / `GITLAB_TOKEN` | Post comments to PRs/MRs (with `--post`) |\n| `AWS_PROFILE` or `AWS_ACCESS_KEY_ID` | AWS Bedrock auth (no API key needed) |\n\n## CI/CD\n\n### GitHub Actions\n\n```yaml\nname: Hodor Review\non:\n  pull_request:\n    types: [opened, synchronize]\n\njobs:\n  review:\n    runs-on: ubuntu-latest\n    container: ghcr.io/mr-karan/hodor:latest\n    steps:\n      - name: Run Hodor\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}\n        run: |\n          hodor \"https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}\" --post\n```\n\n### GitLab CI\n\n```yaml\ninclude:\n  - project: 'commons/gitlab-templates'\n    ref: master\n    file: '/hodor/.gitlab-ci-template.yml'\n\nhodor-review:\n  extends: .hodor-review\n```\n\nSee [AUTOMATED_REVIEWS.md](./docs/AUTOMATED_REVIEWS.md) for advanced CI workflows.\n\n## Token Optimization\n\nHodor automatically optimizes token usage:\n\n- **Diff embedding**: For PRs under 200KB, the diff is embedded directly in the prompt, cutting agent turns from ~60 to ~5.\n- **Incremental reviews**: On re-runs, only reviews changes since the last hodor comment (detected via SHA markers in posted comments).\n- **Compaction**: SDK auto-summarizes older conversation turns when context grows too large.\n\n## Skills\n\nHodor discovers repository-specific review guidelines from `.pi/skills/` or `.hodor/skills/`:\n\n```bash\nmkdir -p .hodor/skills/review-guidelines\n```\n\n```markdown\n# .hodor/skills/review-guidelines/SKILL.md\n---\nname: review-guidelines\ndescription: Security and performance review checklist.\n---\n\n- All API endpoints must have authentication checks.\n- Database queries must use parameterized statements.\n- API responses should be \u003c 200ms p95.\n```\n\nSkills are loaded automatically during reviews. See [SKILLS.md](./docs/SKILLS.md) for details.\n\n## Development\n\n```bash\nbun install          # Install dependencies\nbun run build        # Build\nbun run test         # Run tests\nbun run dev -- \u003curl\u003e # Run from source\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmr-karan%2Fhodor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmr-karan%2Fhodor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmr-karan%2Fhodor/lists"}