This is a fork of fakerybakery's https://github.com/fakerybakery/claude-code-kimi-groq , experimenting with tool use support and additional security features. This is currently experimental, beta software. Use at your own risk, etc.
export GROQ_API_KEY=YOUR_GROQ_API_KEY
# one-time setup of uv, if needed
brew install astral-sh/uv/uv # or pipx install uv
# project setup
uv venv .venv
source .venv/bin/activate
uv pip install -e .
# run the proxy
python proxy.pyThe proxy supports several command-line options for configuration:
python proxy.py [OPTIONS]
Available options:
| Option | Default | Description |
|---|---|---|
--host |
127.0.0.1 | Host to bind the server to |
--port |
7187 | Port to run the server on |
--debug |
False | Use cheaper model while testing (llama-3.1-8b-instant) |
--log |
False | Enable detailed file logging of model responses |
--vfs-base |
Current directory | Set custom base directory for the Virtual File System |
--tools-dir |
./tools | Set custom directory for tool modules |
--help |
- | Show help message and exit |
Example with options:
python proxy.py --host 0.0.0.0 --port 8000 --debug --log --vfs-base /path/to/workspace --tools-dir /path/to/custom/toolsSet the Anthropic Base URL:
export ANTHROPIC_BASE_URL=http://localhost:7187
If you're not already authenticated with Anthropic you may need to run:
export ANTHROPIC_API_KEY=NOT_NEEDED
Run Claude Code with the Groq API key:
claudeIf you use this, I'd love to hear about your experience with Kimi K2 and how it compared with Claude! Please open an Issue to share your experience.
Inspired by claude-code-proxy
The project includes a comprehensive test suite focusing on security and functionality of core components:
- Path utilities (
utils.py) - Virtual File System (
vfs.py) - BashTool (
bash_tool.py)
Install development dependencies (including test tools):
pip install -e ".[dev]"Run all tests:
pytest tests/Run tests with coverage report:
pytest --cov=tools tests/See TESTING.md for detailed documentation on the test suite.