ziri
v0.3.3
Published
Ziri — AI code context CLI (per-repo stores, streaming embeddings, multi-repo registry)
Maintainers
Readme
Ziri — AI Code Context CLI
High-performance AI code context CLI with intelligent semantic search, local AI chat, and comprehensive code analysis capabilities.
🚀 Quick Start
# Install
npm install -g ziri
# Setup Ollama (local, free, recommended)
# Download from: https://ollama.ai/download
ollama pull nomic-embed-text && ollama pull llama3.2
# Index your repository with enhanced context
ziri index
# Query with rich results
ziri query "authentication logic"
# Chat with AI using your codebase context
ziri chat "how does the user login system work?"✨ Key Features
- Rich Context Analysis - Deep metadata extraction with code snippets and surrounding context
- AI Chat Integration - Local Ollama chat with full codebase context awareness
- 10x Faster Indexing - Concurrent processing with intelligent batching
- Incremental Updates - Only re-index changed files for faster updates
- Multiple Providers - Ollama (default), OpenAI, Hugging Face, Cohere
- Memory Optimized - Handle large repositories without crashes
- Repository Isolation - Per-repo vector stores with no cross-contamination
- Multi-Language Support - Enhanced analysis for JavaScript, TypeScript, Python, Java, Dart, YAML, ESQL, DataWeave, Mulesoft, and more
- Advanced AST Analysis - Deep code structure understanding with function, class, and import extraction
- Error Resilience - Graceful handling of malformed code and API failures
📊 Performance
| Repository Size | Time | Improvement | |----------------|------|-------------| | Small (< 500 files) | 8s | 4x faster | | Medium (1000-3000 files) | 15-30s | 8x faster | | Large (5000+ files) | 1-3 min | 10x faster |
🤖 Supported Providers
| Provider | Type | Best For | Setup | Status |
|----------|------|----------|-------|--------|
| Ollama ⭐ | Local | Development, privacy, free, chat | ollama pull nomic-embed-text && ollama pull llama3.2 | ✅ Available out-of-the-box |
| OpenAI | Cloud API | Production, high quality | API key required | 🔧 Setup required |
| Hugging Face | Cloud API | Specific models, research | API key required | 🔧 Setup required |
| Cohere | Cloud API | Alternative to OpenAI | API key required | 🔧 Setup required |
⭐ Ollama is the default provider - no API keys needed, runs locally, supports chat!
🆚 VS Code Extension
Enhance your Ziri experience with the official VS Code extension:
📦 Installation
# Method A: Direct VSIX installation (recommended)
code --install-extension ziri-vscode-0.2.0.vsix
# Method B: From npm
npm install -g ziri-vscode
# Method C: VS Code Marketplace (once published)
# Search "Ziri Code Assistant" in extensions✨ Extension Features
- 🔍 In-Editor Search: Search without leaving VS Code
- 💬 AI Chat Integration: Ask questions about your codebase with rich UI
- 📊 Rich Results Display: Syntax highlighting, metadata, and scoring
- ⚙️ Configuration Settings: Customize behavior through VS Code settings
- 🔄 Auto-indexing: Optional automatic repository indexing
- 📋 Activity Bar Integration: Quick access to all features
- 🎨 Theme Support: Automatic VS Code theme integration
🚀 Quick Start with Extension
# 1. Install Ziri CLI (required by extension)
npm install -g ziri
# 2. Install VS Code extension
code --install-extension ziri-vscode-0.2.0.vsix
# 3. Use extension commands
# Open Command Palette (Ctrl+Shift+P)
# Run "Ziri: Index Current Repository"
# Run "Ziri: Search Codebase"
# Run "Ziri: Chat with Code Assistant"📚 Documentation
👤 For Users
- Getting Started - Installation, quickstart, and basic usage
- CLI Reference - Complete command documentation
- Configuration - Provider setup and performance tuning
- Troubleshooting - Common issues and solutions
🚀 For Deployment
- Docker Setup - Container deployment
- CI/CD Integration - GitHub Actions, GitLab CI, Jenkins
- Security Guide - Security best practices
👨💻 For Developers
- AGENTS.md - Complete development standards and instructions
- Architecture - System design and components
- Contributing - How to contribute to Ziri
- API Documentation - Internal APIs and interfaces
🔧 Advanced Usage
# Enhanced context with AI chat (default)
ziri index # Rich metadata extraction
ziri query "authentication logic" # Code snippets in results
ziri chat "explain this auth flow" # AI assistance with context
# Performance optimization
ziri benchmark --providers ollama,openai
ziri index --concurrency 4 --batch-size 75
# Multi-repository management
ziri sources add ~/code/backend --set backend
ziri sources add ~/code/frontend --set frontend
ziri query "API endpoints" --scope set:backend
ziri chat "how do these services communicate?" --scope set:backend
# Health monitoring and Ollama status
ziri doctor🛠️ Enhanced Context Features
- Rich Metadata: Automatic extraction of functions, classes, imports
- Code Snippets: See actual code in query results, not just file paths
- Surrounding Context: 2-3 lines before/after for better understanding
- Language Detection: Syntax highlighting and language-aware processing
- AI Chat: Local Ollama integration for contextual code assistance
- Better Relevance: Improved explanations of why results match your query
- Multi-Language Support: Enhanced analysis for 10+ programming languages
- AST-Based Analysis: Deep code understanding through Abstract Syntax Trees
🆘 Need Help?
- Quick Issues: Check the Troubleshooting Guide
- Getting Started: Follow the Quickstart Guide
- Advanced Setup: See Usage Examples
📄 License
MIT License - see LICENSE file for details.
Ziri - Making AI-assisted development faster and more intelligent, one repository at a time.
