ββββββ βββββββ ββ ββ ββ ββββββ βββ ββ
ββ ββ ββ ββ ββ ββ ββ ββ ββββ ββ
ββ βββ βββββββ ββ ββ ββ ββ ββ ββ ββ ββ
ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ
ββββββ ββ ββ βββββββ βββββββ ββββββ ββ βββββ
AI-powered code review tool that analyzes TypeScript/JavaScript changes against your coding guidelines using Scaleway AI. Golum helps maintain code quality by automatically reviewing your code changes and providing actionable feedback based on your team's best practices.
go run github.com/lawndlwd/golum@main \
--project-path ../project-name \
--target-branch origin/main \
--ai-token $AI_TOKEN \
--rules-file ./rules/rules.md# Install
go install github.com/lawndlwd/golum@main
# Run
golum --project-path ../shire/ --target-branch origin/main --ai-token $AI_TOKEN --rules-file ./rules/rules.md- Go 1.23+
- Git repository
- Scaleway AI API token (or compatible OpenAI API)
- Rules file (
.mdfile or directory with.mdfiles)
go run github.com/lawndlwd/golum@main \
--project-path ../project-name \
--target-branch origin/main \
--ai-token $AI_TOKEN \
--rules-file ./rules/rules.mdgo run github.com/lawndlwd/golum@main \
--project-path ../project-name \
--target-branch origin/main \
--ai-token $AI_TOKEN \
--rules-file ./rules/rules.mdCompare your local (staged + unstaged) changes against a remote branch:
go run github.com/lawndlwd/golum@main \
--project-path ../project-name \
--target-branch origin/main \
--ai-token $AI_TOKEN \
--rules-file ./rules/rules.md \
--local| Option | Description | Example |
|---|---|---|
--ai-token |
AI API token (required) | --ai-token $AI_TOKEN |
--rules-file |
Path to rules file or directory (required) | --rules-file ./rules/rules.md |
| Option | Description | Default | Environment Variable |
|---|---|---|---|
--ai-token |
Scaleway AI API token | - | SCW_SECRET_KEY_AI_USER, AI_TOKEN |
--ai-endpoint |
AI endpoint URL | https://api.scaleway.ai/3e211a1d-e19d-4e63-b47f-c88d70377aac/v1 |
SCALEWAY_AI_ENDPOINT |
--ai-model |
AI model name | qwen3-235b-a22b-instruct-2507 |
SCALEWAY_AI_MODEL |
--temperature |
Sampling temperature (0 for deterministic) | 0.0 |
REVIEW_TEMPERATURE |
| Option | Description | Default |
|---|---|---|
--rules-file |
Path to .md file or directory with .md files |
- |
--rules-dir |
Rules directory (ignored if --rules-file is set) |
- |
| Option | Description | Default | Environment Variable |
|---|---|---|---|
--project-path |
Path to repository | . |
- |
--target-branch |
Base branch for comparison | HEAD |
TARGET_BRANCH |
--local |
Compare local changes to origin/target-branch | false |
LOCAL |
| Option | Description | Default | Environment Variable |
|---|---|---|---|
--tree-sitter |
Use Tree-sitter for enhanced context | true |
USE_TREE_SITTER |
export AI_TOKEN="your-token-here"
export TARGET_BRANCH="origin/main"
go run github.com/lawndlwd/golum@main \
--project-path ../project-name \
--target-branch origin/main \
--rules-file ./rules/rules.mdgo run github.com/lawndlwd/golum@main \
--project-path ../project-name \
--target-branch origin/main \
--ai-token $OPENAI_API_KEY \
--ai-endpoint https://api.openai.com/v1 \
--ai-model gpt-4 \
--rules-file ./rules/rules.mdIf you have a directory with multiple .md files:
go run github.com/lawndlwd/golum@main \
--project-path ../project-name \
--target-branch origin/main \
--ai-token $AI_TOKEN \
--rules-file ./rules/All .md files in the directory will be loaded and combined.
go run github.com/lawndlwd/golum@main \
--project-path /path/to/your/repo \
--target-branch origin/main \
--ai-token $AI_TOKEN \
--rules-file ./rules/rules.mdCreate a Markdown file (.md) with your coding guidelines:
# React & TypeScript Guidelines
## Naming Conventions
- Components: PascalCase (`UserProfile`, `DataTable`)
- Files: PascalCase for components, camelCase for utilities
- Hooks: camelCase with `use` prefix (`useUserData`)
## Component Structure
- Always use functional components with hooks
- Prefer named exports over default exports
- Destructure props in function signatureThe tool will:
- Load a single
.mdfile if you specify a file path - Load all
.mdfiles from a directory if you specify a directory - Sort files alphabetically and combine them
See rules/rules.md for a complete example.
The tool shows color-coded review results:
- π¨ Blocking Issues: Critical problems that must be fixed
β οΈ Issues: Problems that should be addressed- β Questions: Questions about the code
- π‘ Suggestions: Non-blocking suggestions
Example:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π CODE REVIEW RESULTS
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π src/components/Button.tsx
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β οΈ Line 42: ISSUE
Violates naming convention: Component should use PascalCase.
Fix by renaming to UserButton.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Found 1 issue(s) across 1 file(s)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
0: No critical issues found1: Critical (blocking) issues found
- Analyzes git diffs to find changed TypeScript/JavaScript files
- Filters to
.ts,.tsx,.js,.jsxfiles only - Extracts code context around changed lines (using Tree-sitter)
- Groups files into batches for efficient processing
- Sends batches to AI with your rules and code context
- Displays formatted review comments
git clone https://github.com/lawndlwd/golum.git
cd golum
go build -o golum ./cmdgolum/
βββ cmd/
β βββ main.go # CLI entry point
βββ internal/
β βββ types/ # Shared types
β βββ parser/ # Tree-sitter parser
β βββ diff/ # Diff processing
β βββ ai/ # AI client and prompts
β βββ bestpractices/ # Rules loader
β βββ filter/ # File filtering
β βββ git/ # Git operations
β βββ review/ # Review orchestration
β βββ output/ # Output formatting
βββ rules/
βββ rules.md # Example rules
- MCP Integration for Enhanced Reviews: Integrate with Model Context Protocol (MCP) to search information from a list of resources (documentation, codebase knowledge, API specs) for more accurate and context-aware code reviews
- GitLab MR Integration: Add support for reviewing GitLab MRs directly with
--gitlab-host,--gitlab-token, and--gitlab-projectflags to fetch and review MR diffs automatically - Incremental Reviews: Support reviewing only new changes since last review to avoid re-reviewing unchanged code
- Custom Severity Levels: Allow users to define custom severity levels and their meanings in the rules file
- Multi-language Support: Extend beyond TypeScript/JavaScript to support Python, Go, Rust, and other languages with appropriate parsers
- Review Templates: Support for different review templates (strict, lenient, security-focused) that can be selected via flags
- Review History: Track review history and show what changed between reviews
- Interactive Mode: Add an interactive mode to approve/reject suggestions and generate a summary report
- Webhook Support: Add webhook support to automatically trigger reviews on MR/PR events
- Parallel Processing: Process multiple files in parallel for faster reviews on large codebases
- Caching: Cache parsed code context and AI responses to speed up repeated reviews