@kolaborate/kola-code v1.1.0
Kola-Code
A secure, terminal-based AI coding assistant powered by OpenRouter API with DeepSeek R1 as the default model.
š Quick Start for Kolaborate Team
1. Install (30 seconds)
curl -fsSL https://raw.githubusercontent.com/kolaborateplatform/AI-Agents/main/kola-code/install.sh | bash2. Get API Key (1 minute)
- Visit https://openrouter.ai/
- Sign up/login
- Go to https://openrouter.ai/keys
- Create a new key (it's free!)
3. Login
kola-code login
# Paste your API key when prompted4. Initialize Your Project (Optional but Recommended)
# Generate project context file
kola-code init5. Start Using!
# Quick question
kola-code "how do I center a div?"
# Interactive chat
kola-code chat
# Analyze your code
kola-code chat -f app.js -p "optimize this code"Features
- š Secure API key storage using system keychain
- š¬ Interactive chat sessions with AI models
- š File context support for code analysis
- šØ Beautiful terminal UI with custom branding
- āļø Configurable model selection and parameters
- š Fast and lightweight CLI tool
- š Default model: DeepSeek R1 (free tier)
- š§ Advanced MCP tools integration:
- š Filesystem: read, write, list files
- š§ Memory: persistent conversation memory and knowledge graphs
- š¤ Sequential Thinking: step-by-step reasoning for complex problems
- š Context7: up-to-date documentation from official sources
š® Upcoming Features
We're constantly working to enhance Kola-Code. Here's what's coming soon:
ā Recently Implemented
- ā Memory Integration: Persistent conversation memory with knowledge graphs
- ā Context7 Integration: Up-to-date documentation from official sources
- ā Sequential Thinking: Step-by-step reasoning for complex problems
- ā Enhanced Command System: Instant suggestions and smart completions
- ā Cross-Platform Support: Full Windows, macOS, and Linux compatibility
š® Coming Soon
- āļø Custom System Prompts: Personalized AI behavior and team standards
- š Enhanced Authentication: Multiple providers and team management
- š ļø VS Code Integration: Dedicated extension for seamless development
- š Analytics & Insights: Usage metrics and code quality recommendations
š” Want a specific feature? Open an issue or reach out to our team!
Installation
For Kolaborate Team (Recommended)
Option 1: Quick Install Script (Easiest)
curl -fsSL https://raw.githubusercontent.com/kolaborateplatform/AI-Agents/main/kola-code/install.sh | bashOption 2: Manual Install
# Clone the repository
git clone https://github.com/kolaborateplatform/AI-Agents.git
cd AI-Agents/kola-code
# Install dependencies and build
npm install
npm run build
# Install globally
npm install -g .Option 3: Direct from GitHub
# Download and install in one command
npx degit kolaborateplatform/AI-Agents/kola-code kola-code-temp && cd kola-code-temp && npm install && npm run build && npm install -g . && cd .. && rm -rf kola-code-tempAlternative Installation Methods
Using npm (when published)
npm install -g @kolaborate/kola-codeFrom source
git clone https://github.com/kolaborateplatform/AI-Agents.git
cd AI-Agents/kola-code
npm install
npm run build
npm linkSetup
- Get your OpenRouter API key from OpenRouter
- Run the login command:
For Development/Local Testing:
# If you cloned the repo and are developing locally
npm run dev loginFor Installed Version:
# If you installed globally via npm
kola-code login- Enter your API key when prompted (it will be stored securely)
Common Use Cases
š Debug Code
# Debug an error
kola-code "TypeError: Cannot read property 'map' of undefined"
# Analyze error logs
kola-code chat -f error.log -p "what's causing this error?"š Code Review
# Security review
kola-code chat -f api.js -p "check for security vulnerabilities"
# Performance optimization
kola-code chat -f app.js -p "how can I make this faster?"š” Generate Code
# Create components
kola-code "create a React navbar component with dropdown"
# Write functions
kola-code "write a Python function to validate email addresses"š Learn & Explain
# Explain code
kola-code chat -f algorithm.py -p "explain how this works"
# Learn concepts
kola-code "explain async/await in JavaScript with examples"All Commands
Essential Commands
kola-code login- Store your OpenRouter API key securelykola-code init- Initialize project context (creates kola.md)kola-code chat- Start interactive chat sessionkola-code "your question"- Quick one-off question
Additional Commands
kola-code status- Check authentication statuskola-code config- Configure settings (model, temperature, etc.)kola-code mcp- Configure MCP servers (enable/disable memory, thinking, etc.)kola-code logout- Remove stored credentialskola-code --help- Show all commands
Chat Options
-f, --file <path>- Include a file in the conversation-p, --prompt <text>- Initial prompt for the chat-m, --model <model>- Use a specific AI model--no-tools- Disable MCP filesystem tools
Using MCP Tools
Kola-Code includes MCP (Model Context Protocol) filesystem tools that allow the AI to:
- Read files from your project
- Write and create new files
- List directory contents
- Search for files
Slash Commands
All commands now use the / prefix for clarity:
/help(or/h) - Show all available commands/tools(or/t) - List available MCP tools/stats(or/s) - Show session statistics/model(or/m) - Show current AI model/context(or/ctx) - Show loaded context files/clear(or/c) - Clear conversation history/exit(or/q) - Exit the chat
Pro tip: Just type / and you'll see command suggestions!
Rich Terminal UI
Kola-Code features an enhanced terminal experience:
- š Token Usage: See prompt/completion tokens for each response
- ā±ļø Response Time: Track how long each response takes
- š° Cost Tracking: Automatic cost calculation (free for DeepSeek)
- š§ Tool Tracking: See which tools were used in each response
- š Session Statistics: Track total usage with
/statscommand
Example metrics line:
ā±ļø 2.3s | š Tokens: 1.2k ā 450 (1.7k total) | š§ Tools: read_file, list_directoryThe AI can use these tools to help you with tasks like:
# Generate code and save to file
kola-code "create a React component for a user profile and save it to UserProfile.jsx"
# Analyze project structure
kola-code "list all JavaScript files in the src directory and analyze the project structure"
# Refactor code
kola-code "read the api.js file and refactor it to use async/await"Security
- API keys are stored in your system's secure keychain (Keychain on macOS, Credential Manager on Windows, Secret Service on Linux)
- No credentials are stored in plain text
- All API communications use HTTPS
Configuration
Run kola-code config to customize:
- Default AI model
- Temperature (creativity level)
- Max tokens (response length)
Troubleshooting
"Command not found" after installation
# Try reopening your terminal or run:
source ~/.bashrc # or ~/.zshrc for zsh usersAPI Key Issues
# Check if you're logged in
kola-code status
# Re-login if needed
kola-code logout
kola-code loginInstallation Failed
# Try manual installation
git clone https://github.com/kolaborateplatform/AI-Agents.git
cd AI-Agents/kola-code
npm install
npm run build
npm install -g .š Documentation
For Developers
š Complete Developer Guide - Comprehensive guide covering:
- Architecture & design patterns
- MCP integration details
- Cross-platform development
- Command system implementation
- Publishing & release workflows
- Recent improvements & changelog
Quick Development Setup
# Clone and setup
git clone https://github.com/kolaborateplatform/AI-Agents.git
cd AI-Agents/kola-code
npm install
# Run in development mode
npm run dev
# Quick dev cycle (build, install, chat)
npm run dev:chatAdditional Documentation
- CHANGELOG.md - Version history and changes
- Cross-Platform Guide - Platform compatibility details
- MCP Integration - Model Context Protocol setup
- Publishing Guide - NPM publishing instructions
Support
- š§ Email: support@kolaborate.com
- š Issues: https://github.com/kolaborateplatform/AI-Agents/issues
- š Docs: See QUICK_START.md for detailed guide
License
MIT Ā© Kolaborate Team