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

Installation

Option 1: Pip Install (Recommended)

# Install sutrakit directly from repository
pip install git+https://github.com/sutragraph/sutracli.git

# Setup the ~/.sutra directory and download models/parsers
sutrakit-setup

# Analyze your first project
sutrakit --directory /path/to/your/project

Option 2: Binary Installation

See INSTALL.md for installing the pre-built binary instead of using the source code.

Quick Start

  1. Using 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.3.tar.gz (205.6 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.3-py3-none-any.whl (247.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sutrakit-0.1.3.tar.gz
  • Upload date:
  • Size: 205.6 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.3.tar.gz
Algorithm Hash digest
SHA256 2357d481d034338cc2be8223cd78064cfd9ca3e76ea396cb189fd0bd681a7865
MD5 33aeffe4da0ff735b206e8787e5d0000
BLAKE2b-256 b15d230a46723c194dc43cc6afbcc51cc2c127667ae1271898369c5e880b988c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sutrakit-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 247.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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 aabc48cf355b940b209f2e3159779c8ef8670f0f7f7eb361ec1d6f938d36c55b
MD5 5b19a5adb481b7fe526fb10c9e4935aa
BLAKE2b-256 84de29584f2843cda6603b1516b2e45c9075f571901bb677f3a0c58013ae2e7e

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