oli is an open-source alternative to Claude Code with powerful agentic capabilities for coding assistance. Features:
⚠️ This project is in a very early stage and is prone to bugs and issues! Please post your issues as you encounter them.
npm install -g oli-tui
This will install the latest version from npm and handle all dependencies automatically.
brew install amrit110/oli/oli
Homebrew will download and install the latest version directly.
# Clone the repository
git clone https://github.com/amrit110/oli
cd oli
# Build both backend and frontend
./build.sh
# Run the hybrid application
./run.sh
# Install Python dependencies (for pre-commit)
python -m pip install uv
uv venv
uv pip install -e .
# Install pre-commit hooks
pre-commit install
# Run Rust linting and formatting
cargo fmt
cargo clippy
# Run TypeScript checks in the UI directory
cd ui
npm run lint
npm run format
For API-based features, set up your environment variables:
# Create a .env file in the project root
echo "ANTHROPIC_API_KEY=your_key_here" > .env
# OR
echo "OPENAI_API_KEY=your_key_here" > .env
Claude 3.7 Sonnet provides the most reliable and advanced agent capabilities:
This implementation includes: - Optimized system prompts for Claude 3.7 - JSON schema output formatting for structured responses - Improved error handling and retry mechanisms
oli supports local models through Ollama:
bash
ollama servebash
# Examples of compatible models
ollama pull qwen2.5-coder:14b
ollama pull qwen2.5-coder:3b
ollama pull llama3:8bNote: For best results with tool use and agent capabilities, use models like Qwen 2.5 Coder which support function calling.
./run.sh
Local models via Ollama (Qwen, Llama, etc.)
Make your coding query in the chat interface:
The application uses a hybrid architecture:
┌───────────────┐ ┌───────────────┐
│ React + Ink UI│◄───────┤ Rust Backend │
│ │ JSON │ │
│ - UI │ RPC │ - Agent │
│ - Task Display│ │ - Tool Exec │
│ - Loading │ │ - Code Parse │
└───────────────┘ └───────────────┘
Here are some example queries to try:
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.