A CLI tool to automatically generate and update README.md files using ISO 639 language codes nomenclature by scanning project codebases. It also performs thorough code reviews, which highlight security vulnerabilities, performance bottlenecks, concurrency issues, and other potential problems.
Created Thales to solve the inconvenience of manually updating README.md files and ensure code quality through automated reviews as codebases evolve.
Follow these steps to set up and execute Thales:
- Installation
Download the latest version of Thales for your operating system from the releases page.
Add Thales binaries for all OS/architectures and code review outputs to your .gitignore
file:
# Thales Binaries
thales_*
*.zip
# Thales Code Review
code_reviews/
reviews/
custom_reviews/
*_review/
- Environment Setup
Thales supports multiple LLMs. Set up the API key for your preferred model:
For Claude (default):
- Get your API key from Anthropic's Claude Platform
For OpenAI:
- Get your API key from the OpenAI Platform Dashboard
For Grok-2:
- Get your API key from xAI's Developer Portal
For Mixtral:
- Get your API key from the Mistral AI Platform
Configure your environment variables with the following command:
export ANTHROPIC_API_KEY="enter_claude_api_key" && \
export OPENAI_API_KEY="enter_openai_api_key" && \
export GROK_API_KEY="enter_grok_api_key" && \
export MIXTRAL_API_KEY="enter_mixtral_api_key"
- Usage
For MacOS:
# Documentation tasks
./thales_darwin_amd64 --new # New README with default settings
./thales_darwin_amd64 --update --lang es # Update README in Spanish
./thales_darwin_amd64 --new --output docs/README.md # Custom output location
# Code review
./thales_darwin_amd64 --cb . --llm claude # Review codebase with Claude
./thales_darwin_amd64 --sf main.go --llm openai # Review file with OpenAI
./thales_darwin_amd64 --cb . --llm grok2 # Review codebase with Grok-2
./thales_darwin_amd64 --cb . --llm mixtral # Review codebase with Mixtral
./thales_darwin_amd64 --cb . --llm claude --focus security # Security review with Claude
./thales_darwin_amd64 --cb . --llm openai --focus performance # Performance review with OpenAI
./thales_darwin_amd64 --sf main.go --llm claude --severity high # High-severity with Claude
./thales_darwin_amd64 --cb . --llm openai --focus all --severity medium # All areas with OpenAI
# Advanced options
./thales_darwin_amd64 --list-languages # List supported languages
./thales_darwin_amd64 --llm openai # Use OpenAI instead of Claude
./thales_darwin_amd64 --review-output reports # Custom review output directory
./thales_darwin_amd64 --cb . --pdf # Review codebase with PDF output
./thales_darwin_amd64 --sf main.go --pdf # Review single file with PDF output
./thales_darwin_amd64 --cb . --html # Review codebase with HTML output
./thales_darwin_amd64 --sf main.go --html # Review single file with HTML output
For Linux:
# Documentation tasks
./thales_linux_amd64 --new # New README
./thales_linux_amd64 --update --lang pt # Update in Portuguese
./thales_linux_amd64 --new --llm openai --lang it # Use OpenAI, Italian output
# Code review
./thales_linux_amd64 --cb . --llm claude # Full review with Claude
./thales_linux_amd64 --sf src/main.go --llm openai # Single file with OpenAI
./thales_linux_amd64 --sf main.go --llm grok2 # Single file with Grok-2
./thales_linux_amd64 --cb . --llm mixtral # Full review with Mixtral
./thales_linux_amd64 --cb . --llm claude --focus security,performance # Multi-focus with Claude
./thales_linux_amd64 --sf lib/utils.go --llm openai --severity high # Critical with OpenAI
./thales_linux_amd64 --cb . --llm claude --review-output custom_reviews # Custom dir with Claude
# Advanced options
./thales_linux_amd64 --list-languages # Available languages
./thales_linux_amd64 --llm claude # Specify LLM
./thales_linux_amd64 --cb . --pdf # Review codebase with PDF output
./thales_linux_amd64 --sf main.go --pdf # Review single file with PDF output
./thales_linux_amd64 --cb . --html # Review codebase with HTML output
./thales_linux_amd64 --sf main.go --html # Review single file with HTML output
For Windows:
# Documentation tasks
.\thales_windows_amd64.exe --new # Generate README
.\thales_windows_amd64.exe --update --lang zh # Update in Chinese
.\thales_windows_amd64.exe --new --output docs\README.md # Custom location
# Code review
.\thales_windows_amd64.exe --cb . --llm claude # Review with Claude
.\thales_windows_amd64.exe --sf main.go --llm openai # Review with OpenAI
.\thales_windows_amd64.exe --cb . --llm grok2 # Review with Grok-2
.\thales_windows_amd64.exe --cb . --llm mixtral # Review with Mixtral
.\thales_windows_amd64.exe --cb . --llm claude --focus security # Security with Claude
.\thales_windows_amd64.exe --sf app.go --llm openai --severity medium # Medium+ with OpenAI
.\thales_windows_amd64.exe --cb . --llm claude --focus all # Full review with Claude
# Advanced options
.\thales_windows_amd64.exe --list-languages # Show languages
.\thales_windows_amd64.exe --llm openai # Use OpenAI
.\thales_windows_amd64.exe --review-output reviews # Set review output
.\thales_windows_amd64.exe --cb . --pdf # Review codebase with PDF output
.\thales_windows_amd64.exe --sf main.go --pdf # Review single file with PDF output
.\thales_windows_amd64.exe --cb . --html # Review codebase with HTML output
.\thales_windows_amd64.exe --sf main.go --html # Review single file with HTML output
- Finish
To unset the environment variables you set, you can use the following command:
unset ANTHROPIC_API_KEY && \
unset OPENAI_API_KEY && \
unset GROK_API_KEY && \
unset MIXTRAL_API_KEY
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.
@misc{thalesafo2025,
author = {Oketunji, A.F.},
title = {Thales},
year = 2025,
version = {1.0.8},
publisher = {Finbarrs Oketunji},
doi = {10.5281/zenodo.14994039},
url = {https://doi.org/10.5281/zenodo.14994039}
}
(c) 2025 Finbarrs Oketunji. All Rights Reserved.
Thanks for all the emails! It is named after Thales of Miletus.