Getting Started - djvolz/coda-code-assistant GitHub Wiki
Welcome to Coda! This guide will help you get up and running with your AI-powered code assistant.
- Python 3.11 or higher
- uv (Python package manager)
- Git
git clone https://github.com/djvolz/coda-code-assistant.git
cd coda-code-assistant
We recommend using uv
for dependency management:
# Install dependencies
uv sync
# Run Coda
uv run coda
If you prefer using pip:
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -e .
When you run Coda for the first time, it will:
- Create a configuration directory at
~/.config/coda/
- Initialize with default settings
- Auto-detect available AI providers
# Start interactive chat
uv run coda
# Or with a specific provider
uv run coda --provider ollama
Coda supports multiple AI providers. Here's how to set them up:
Perfect for privacy-conscious users or offline development.
# Install Ollama from https://ollama.ai
# Pull a model
ollama pull llama3.1
# Start Ollama server (in a separate terminal)
ollama serve
# Use with Coda
uv run coda --provider ollama --model llama3.1
For enterprise users with Oracle Cloud access.
# Option 1: Environment variable
export OCI_COMPARTMENT_ID="ocid1.compartment.oc1..."
uv run coda --provider oci_genai
# Option 2: Configuration file (~/.config/coda/config.toml)
[providers.oci_genai]
compartment_id = "ocid1.compartment.oc1..."
export OPENAI_API_KEY="sk-..."
uv run coda --provider openai --model gpt-4
export ANTHROPIC_API_KEY="sk-ant-..."
uv run coda --provider anthropic --model claude-3-opus-20240229
export GOOGLE_API_KEY="..."
uv run coda --provider google --model gemini-pro
The default mode - start a conversation with your AI assistant:
uv run coda
Use these commands during chat:
-
/help
- Show available commands -
/mode <mode>
- Switch AI personality -
/session save
- Save your conversation -
/session load
- Resume a previous conversation -
/tools
- Manage AI tools and capabilities -
/theme <name>
- Change color theme -
/clear
- Clear conversation -
/exit
- Exit Coda
Get a quick answer without entering interactive mode:
uv run coda --one-shot "What is a Python decorator?"
# List available models
uv run coda --list-models
# Use a specific model
uv run coda --model gpt-4-turbo-preview
Coda stores configuration in ~/.config/coda/config.toml
:
# Default provider
default_provider = "ollama"
# UI Settings
[ui]
theme = "monokai" # Available: default, monokai, solarized, nord, minimal
show_thinking_indicator = true
show_model_info = true
# Provider-specific settings
[providers.openai]
api_key = "sk-..."
model = "gpt-4"
[providers.ollama]
base_url = "http://localhost:11434"
model = "llama3.1"
# Tool settings
[tools]
enabled = true
filesystem_enabled = true
git_enabled = true
web_enabled = true
Edit configuration:
# In Coda
/config edit
# Or directly
$EDITOR ~/.config/coda/config.toml
Coda can now execute tasks using built-in tools:
- File Operations: Read, write, and manage files
- Git Integration: Status, diff, commit operations
- Web Tools: Search the internet and fetch web content
- System Tools: Execute shell commands safely
Simply ask Coda to perform tasks that require tools:
You: "What files are in this directory?"
Coda: [Uses list_files tool to show directory contents]
You: "Search for information about Python decorators"
Coda: [Uses web_search tool to find current information]
Manage tools with the /tools
command. Learn more in Agent-Tools.
- Learn about AI Modes for specialized assistance
- Master Session Management to save and resume conversations
- Explore Agent-Tools for AI capabilities and tool usage
- Check Configuration for detailed setup options
- Join our Discord community
Having issues? Check our Troubleshooting guide or:
# Enable debug mode
uv run coda --debug
# Check version
uv run coda --version
Need help? Open an issue on GitHub.