Skip to main content

A comprehensive AI-powered code analysis and automation CLI tool

Project description

Sutra Knowledge CLI

An intelligent codebase analysis and knowledge management tool that provides AI-powered insights, semantic search capabilities, and comprehensive project understanding through advanced parsing and embedding technologies.

Overview

Sutra Knowledge CLI is a powerful command-line application designed to help developers understand, analyze, and interact with codebases using artificial intelligence. It combines semantic search, graph-based analysis, and AI agents to provide deep insights into your projects.

Key Features

🔍 Intelligent Code Analysis

  • Single Project Processing: Analyze individual codebases with detailed parsing and embedding generation
  • Multi-Project Management: Process and manage multiple projects simultaneously
  • Semantic Search: Find code patterns and implementations using natural language queries
  • Graph-Based Understanding: Build knowledge graphs of your codebase for better comprehension

🤖 AI-Powered Assistance

  • AI Agent Integration: Interactive AI agent for code understanding and assistance
  • Context-Aware Responses: Get intelligent answers about your codebase
  • Memory Management: Persistent conversation context and project knowledge

🌐 Web Integration

  • Web Search: Search the web for relevant programming information
  • Web Scraping: Extract and analyze web content for development insights
  • Authentication: Secure access to external services and APIs

📊 Project Management

  • Project Listing: View and manage all analyzed projects
  • Database Statistics: Monitor analysis progress and storage metrics
  • Data Management: Clear and maintain project databases

Available Commands

Command Description
single Process a single project for analysis
multi Process multiple projects simultaneously
list List all analyzed projects
clear Clear database data and reset projects
stats Display database statistics and metrics
agent Start interactive AI agent session
parse Parse and analyze code structures
search Perform semantic search across codebases
auth Manage authentication and API keys
web_search Search web for programming resources
web_scrap Scrape and analyze web content

Quick Start

  1. Installation: See INSTALL.md for installing binary instead of using the source code. Use below steps if you want to run the source code directly.

  2. Basic Usage:

    # Analyze a single project
    python main.py single /path/to/your/project
    
    # Start interactive AI agent
    python main.py agent
    
    # Search your codebase
    python main.py search "authentication logic"
    
    # List all projects
    python main.py list
    
  3. Configuration: The tool uses JSON configuration files for project settings and supports various programming languages and frameworks.

Architecture

Sutra Knowledge CLI is built with a modular architecture:

  • CLI Interface: User-friendly command-line interface with comprehensive argument parsing
  • Parsing Engine: Advanced code parsing supporting multiple languages
  • Embedding System: Semantic embedding generation for intelligent search
  • Graph Processing: Knowledge graph construction and analysis
  • AI Services: Integration with language models and AI agents
  • Authentication: Secure API and service authentication
  • Database Layer: Efficient storage and retrieval of project data

Use Cases

  • Code Review: Understand large codebases quickly
  • Documentation: Generate insights for better documentation
  • Refactoring: Identify patterns and relationships for safe refactoring
  • Learning: Explore unfamiliar codebases with AI assistance
  • Knowledge Management: Build searchable knowledge bases of your projects

Requirements

  • Python 3.8+
  • Required dependencies (see requirements.txt)
  • Optional: API keys for enhanced AI features

Getting Help

  • Use python main.py --help for command-line help
  • Use python main.py <command> --help for command-specific help
  • Check the documentation in the docs/ directory (if available)

Contributing

This project welcomes contributions. Please ensure your code follows the established patterns and includes appropriate tests.

License

See LICENSE file for details.


Sutra Knowledge CLI - Intelligent codebase understanding through AI-powered analysis

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sutrakit-0.1.0.tar.gz (194.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sutrakit-0.1.0-py3-none-any.whl (240.3 kB view details)

Uploaded Python 3

File details

Details for the file sutrakit-0.1.0.tar.gz.

File metadata

  • Download URL: sutrakit-0.1.0.tar.gz
  • Upload date:
  • Size: 194.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sutrakit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cf8189123f0597819c6bcd660f0d5de620da03dc1a49aa07d52d789573babbe6
MD5 2e3280f988461f28a796d1cbc082b435
BLAKE2b-256 20195463039a5376a31f845c18c95d122fa431270641897505926be4a44da244

See more details on using hashes here.

File details

Details for the file sutrakit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sutrakit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 240.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sutrakit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d2da287fa8544b46450f99f77d76566648adcbe7cc8a7317a9d580130ed91f9a
MD5 78789d07ee3a18b9d9a864342ce5e186
BLAKE2b-256 880ed739928564a90f9962fb02708be64e05a187477a816a0f7bff6d15c84f54

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page