xc-groq
v1.0.11
Published
AI-powered code improver for C, Python, JS, TS, Rust, Go
Maintainers
Readme
xc
AI-powered code improver for C, Python, JavaScript, TypeScript, Rust, and Go.
_ _____
| |/ ____|
| | |
| | |
|_|_|____
v1.0.0 · AI-powered code improverInstall
# npm (recommended)
npm install -g xc-cli
# curl
curl -fsSL https://raw.githubusercontent.com/rushpym-dotcom/xc/main/install.sh | bash
# wget
wget -qO- https://raw.githubusercontent.com/rushpym-dotcom/xc/main/install.sh | bashSetup
Get a free Gemini API key at aistudio.google.com/app/apikey (1500 req/day free).
xc config --key YOUR_GEMINI_KEY
# or
export XC_GEMINI_KEY=your_keyUsage
xc <file> # Analyze and improve a file
xc explain <file> # Explain what the code does
xc fix <file> # Fix bugs and errors
xc fix <file> --issue "..." # Fix a specific issue
xc stats <file> # Show code metrics
xc cache list # List cached improvements
xc cache clear # Clear all cached data
xc help # Show helpFlags
--lang <c|py|js|ts|rs|go> Force language detection
--apply Apply without confirmation prompt
--no-cache Skip cache lookup
--issue "<text>" Describe specific issue to fixSupported Languages
| Extension | Language |
|-----------------|------------|
| .c, .h | C |
| .py | Python |
| .js, .mjs | JavaScript |
| .ts, .tsx | TypeScript |
| .rs | Rust |
| .go | Go |
How it works
- Reads your file and detects language automatically
- Sends code to Gemini 2.0 Flash for improvement
- Gemini reviews the result twice before returning
- Shows a rich diff with titled change blocks
- Asks for confirmation before writing anything
- Creates a backup in
~/.xc/backups/before applying - Caches results in
~/.xc/cache/to avoid duplicate API calls
Focus areas
xc improves code in this priority order:
- Security — vulnerabilities, unsafe inputs, injection risks
- Performance — algorithmic improvements, inefficient patterns
- Quality — readability, naming, idiomatic style
All improved files get a // Improved by xc marker at the end.
Config
Config is stored at ~/.xc/config.json. Environment variables take priority.
| Variable | Description |
|-----------------|--------------------|
| XC_GEMINI_KEY | Gemini API key |
License
MIT
