JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 44
  • Score
    100M100P100Q65471F
  • License MIT

Ziri — AI code context CLI (per-repo stores, streaming embeddings, multi-repo registry)

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ziri) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Ziri — AI Code Context CLI

    High-performance AI code context CLI with enhanced indexing, local AI chat, and intelligent semantic search 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

    • Enhanced Context (Default) - Rich metadata, code snippets, and surrounding context
    • AI Chat Integration - Local Ollama chat with codebase context
    • 10x Faster Indexing - Concurrent processing with intelligent batching
    • Incremental Updates - Only re-index changed files
    • 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
    Ollama Local Development, privacy, free, chat ollama pull nomic-embed-text && ollama pull llama3.2
    OpenAI Cloud API Production, high quality API key required
    Hugging Face Cloud API Specific models, research API key required
    Cohere Cloud API Alternative to OpenAI API key required

    Ollama is the default provider - no API keys needed, runs locally, supports chat!

    📚 Documentation

    👤 For Users

    🚀 For Deployment

    👨‍💻 For Developers

    🔧 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 (v1.0)

    • 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

    Migration from Legacy

    # Enhanced context is now default
    ziri index                    # Uses enhanced context
    
    # Legacy mode (deprecated, will be removed in v2.0)
    ziri index --legacy          # Old indexing method

    🛠️ Recent Improvements (v0.2.1)

    Enhanced Code Analysis

    • Improved AST Parsing: Better handling of complex language constructs
    • Multi-Language Support: Enhanced analyzers for Dart, YAML, IBM ACE, Mulesoft, and more
    • Regex Pattern Fixes: Resolved issues with import and function extraction across languages
    • Type Detection: More accurate classification of code elements

    Performance & Reliability

    • Memory Optimization: Better handling of large repositories
    • Error Handling: Improved resilience to API failures and malformed code
    • Batch Processing: More efficient embedding generation
    • Incremental Indexing: Faster updates with intelligent change detection

    Developer Experience

    • Better Documentation: Updated guides and examples
    • Enhanced Testing: More comprehensive test coverage
    • Configuration Management: Improved provider switching and validation

    🆘 Need Help?

    📄 License

    MIT License - see LICENSE file for details.


    Ziri - Making AI-assisted development faster and more intelligent, one repository at a time.