# 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)
```bash
# 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](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**:
```bash
# 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*
Raw data
{
"_id": null,
"home_page": null,
"name": "sutrakit",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "ai, code-analysis, automation, cli, agent",
"author": null,
"author_email": "Your Name <your.email@example.com>",
"download_url": "https://files.pythonhosted.org/packages/3d/0a/1ed58141d7bd2730a214d2cdf3dfe6747434f875d4237cb2366554282863/sutrakit-0.1.2.tar.gz",
"platform": null,
"description": "\n# Sutra Knowledge CLI\n\nAn 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.\n\n## Overview\n\nSutra 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.\n\n## Key Features\n\n### \ud83d\udd0d **Intelligent Code Analysis**\n- **Single Project Processing**: Analyze individual codebases with detailed parsing and embedding generation\n- **Multi-Project Management**: Process and manage multiple projects simultaneously\n- **Semantic Search**: Find code patterns and implementations using natural language queries\n- **Graph-Based Understanding**: Build knowledge graphs of your codebase for better comprehension\n\n### \ud83e\udd16 **AI-Powered Assistance**\n- **AI Agent Integration**: Interactive AI agent for code understanding and assistance\n- **Context-Aware Responses**: Get intelligent answers about your codebase\n- **Memory Management**: Persistent conversation context and project knowledge\n\n### \ud83c\udf10 **Web Integration**\n- **Web Search**: Search the web for relevant programming information\n- **Web Scraping**: Extract and analyze web content for development insights\n- **Authentication**: Secure access to external services and APIs\n\n### \ud83d\udcca **Project Management**\n- **Project Listing**: View and manage all analyzed projects\n- **Database Statistics**: Monitor analysis progress and storage metrics\n- **Data Management**: Clear and maintain project databases\n\n## Available Commands\n\n| Command | Description |\n|---------|-------------|\n| `single` | Process a single project for analysis |\n| `multi` | Process multiple projects simultaneously |\n| `list` | List all analyzed projects |\n| `clear` | Clear database data and reset projects |\n| `stats` | Display database statistics and metrics |\n| `agent` | Start interactive AI agent session |\n| `parse` | Parse and analyze code structures |\n| `search` | Perform semantic search across codebases |\n| `auth` | Manage authentication and API keys |\n| `web_search` | Search web for programming resources |\n| `web_scrap` | Scrape and analyze web content |\n\n## Installation\n\n### Option 1: Pip Install (Recommended)\n\n```bash\n# Install sutrakit directly from repository\npip install git+https://github.com/sutragraph/sutracli.git\n\n# Setup the ~/.sutra directory and download models/parsers\nsutrakit-setup\n\n# Analyze your first project\nsutrakit --directory /path/to/your/project\n```\n\n### Option 2: Binary Installation\n\nSee [INSTALL.md](INSTALL.md) for installing the pre-built binary instead of using the source code.\n\n## Quick Start\n\n1. **Using Source Code**: Use below steps if you want to run the source code directly.\n\n2. **Basic Usage**:\n ```bash\n # Analyze a single project\n python main.py single /path/to/your/project\n\n # Start interactive AI agent\n python main.py agent\n\n # Search your codebase\n python main.py search \"authentication logic\"\n\n # List all projects\n python main.py list\n ```\n\n3. **Configuration**: The tool uses JSON configuration files for project settings and supports various programming languages and frameworks.\n\n## Architecture\n\nSutra Knowledge CLI is built with a modular architecture:\n\n- **CLI Interface**: User-friendly command-line interface with comprehensive argument parsing\n- **Parsing Engine**: Advanced code parsing supporting multiple languages\n- **Embedding System**: Semantic embedding generation for intelligent search\n- **Graph Processing**: Knowledge graph construction and analysis\n- **AI Services**: Integration with language models and AI agents\n- **Authentication**: Secure API and service authentication\n- **Database Layer**: Efficient storage and retrieval of project data\n\n## Use Cases\n\n- **Code Review**: Understand large codebases quickly\n- **Documentation**: Generate insights for better documentation\n- **Refactoring**: Identify patterns and relationships for safe refactoring\n- **Learning**: Explore unfamiliar codebases with AI assistance\n- **Knowledge Management**: Build searchable knowledge bases of your projects\n\n## Requirements\n\n- Python 3.8+\n- Required dependencies (see requirements.txt)\n- Optional: API keys for enhanced AI features\n\n## Getting Help\n\n- Use `python main.py --help` for command-line help\n- Use `python main.py <command> --help` for command-specific help\n- Check the documentation in the `docs/` directory (if available)\n\n## Contributing\n\nThis project welcomes contributions. Please ensure your code follows the established patterns and includes appropriate tests.\n\n## License\n\nSee LICENSE file for details.\n\n---\n\n*Sutra Knowledge CLI - Intelligent codebase understanding through AI-powered analysis*\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A comprehensive AI-powered code analysis and automation CLI tool",
"version": "0.1.2",
"project_urls": {
"Homepage": "https://github.com/sutragraph/sutracli",
"Issues": "https://github.com/sutragraph/sutracli/issues",
"Repository": "https://github.com/sutragraph/sutracli"
},
"split_keywords": [
"ai",
" code-analysis",
" automation",
" cli",
" agent"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "8fc106c136116998ff4ae03e4c12222ef1637c95befd8ebb2f7a37fc0f955f39",
"md5": "b90e25bbd0305f964bff14fe849e66f5",
"sha256": "673528478218e8923722ad1175c001180dce402f095059e98c6209712d088294"
},
"downloads": -1,
"filename": "sutrakit-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b90e25bbd0305f964bff14fe849e66f5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 246500,
"upload_time": "2025-07-15T10:49:20",
"upload_time_iso_8601": "2025-07-15T10:49:20.315701Z",
"url": "https://files.pythonhosted.org/packages/8f/c1/06c136116998ff4ae03e4c12222ef1637c95befd8ebb2f7a37fc0f955f39/sutrakit-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3d0a1ed58141d7bd2730a214d2cdf3dfe6747434f875d4237cb2366554282863",
"md5": "688b9c38390a324af0504fc6fb9686a5",
"sha256": "f78aef7950c5d39a0c72baacfd60d7467fbf784b790aa20d8084a42f928bcb1b"
},
"downloads": -1,
"filename": "sutrakit-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "688b9c38390a324af0504fc6fb9686a5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 204861,
"upload_time": "2025-07-15T10:49:21",
"upload_time_iso_8601": "2025-07-15T10:49:21.345987Z",
"url": "https://files.pythonhosted.org/packages/3d/0a/1ed58141d7bd2730a214d2cdf3dfe6747434f875d4237cb2366554282863/sutrakit-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-15 10:49:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sutragraph",
"github_project": "sutracli",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "altgraph",
"specs": [
[
"==",
"0.17.4"
]
]
},
{
"name": "annotated-types",
"specs": [
[
"==",
"0.7.0"
]
]
},
{
"name": "anthropic",
"specs": [
[
"==",
"0.55.0"
]
]
},
{
"name": "anyio",
"specs": [
[
"==",
"4.9.0"
]
]
},
{
"name": "babel",
"specs": [
[
"==",
"2.17.0"
]
]
},
{
"name": "beautifulsoup4",
"specs": [
[
"==",
"4.13.4"
]
]
},
{
"name": "boto3",
"specs": [
[
"==",
"1.38.36"
]
]
},
{
"name": "botocore",
"specs": [
[
"==",
"1.38.36"
]
]
},
{
"name": "cachetools",
"specs": [
[
"==",
"5.5.2"
]
]
},
{
"name": "certifi",
"specs": [
[
"==",
"2025.6.15"
]
]
},
{
"name": "cffi",
"specs": [
[
"==",
"1.17.1"
]
]
},
{
"name": "charset-normalizer",
"specs": [
[
"==",
"3.4.2"
]
]
},
{
"name": "coloredlogs",
"specs": [
[
"==",
"15.0.1"
]
]
},
{
"name": "courlan",
"specs": [
[
"==",
"1.3.2"
]
]
},
{
"name": "cryptography",
"specs": [
[
"==",
"44.0.0"
]
]
},
{
"name": "dateparser",
"specs": [
[
"==",
"1.2.2"
]
]
},
{
"name": "distro",
"specs": [
[
"==",
"1.9.0"
]
]
},
{
"name": "docstring_parser",
"specs": [
[
"==",
"0.16"
]
]
},
{
"name": "filelock",
"specs": [
[
"==",
"3.18.0"
]
]
},
{
"name": "flatbuffers",
"specs": [
[
"==",
"25.2.10"
]
]
},
{
"name": "fsspec",
"specs": [
[
"==",
"2025.5.1"
]
]
},
{
"name": "google-api-core",
"specs": [
[
"==",
"2.25.1"
]
]
},
{
"name": "google-auth",
"specs": [
[
"==",
"2.40.3"
]
]
},
{
"name": "google-cloud-aiplatform",
"specs": [
[
"==",
"1.98.0"
]
]
},
{
"name": "google-cloud-bigquery",
"specs": [
[
"==",
"3.34.0"
]
]
},
{
"name": "google-cloud-core",
"specs": [
[
"==",
"2.4.3"
]
]
},
{
"name": "google-cloud-resource-manager",
"specs": [
[
"==",
"1.14.2"
]
]
},
{
"name": "google-cloud-storage",
"specs": [
[
"==",
"2.19.0"
]
]
},
{
"name": "google-crc32c",
"specs": [
[
"==",
"1.7.1"
]
]
},
{
"name": "google-genai",
"specs": [
[
"==",
"1.21.1"
]
]
},
{
"name": "google-resumable-media",
"specs": [
[
"==",
"2.7.2"
]
]
},
{
"name": "googleapis-common-protos",
"specs": [
[
"==",
"1.70.0"
]
]
},
{
"name": "grpc-google-iam-v1",
"specs": [
[
"==",
"0.14.2"
]
]
},
{
"name": "grpcio",
"specs": [
[
"==",
"1.73.1"
]
]
},
{
"name": "grpcio-status",
"specs": [
[
"==",
"1.73.1"
]
]
},
{
"name": "h11",
"specs": [
[
"==",
"0.16.0"
]
]
},
{
"name": "hf-xet",
"specs": [
[
"==",
"1.1.5"
]
]
},
{
"name": "htmldate",
"specs": [
[
"==",
"1.9.3"
]
]
},
{
"name": "httpcore",
"specs": [
[
"==",
"1.0.9"
]
]
},
{
"name": "httpx",
"specs": [
[
"==",
"0.28.1"
]
]
},
{
"name": "huggingface-hub",
"specs": [
[
"==",
"0.33.2"
]
]
},
{
"name": "humanfriendly",
"specs": [
[
"==",
"10.0"
]
]
},
{
"name": "idna",
"specs": [
[
"==",
"3.10"
]
]
},
{
"name": "jiter",
"specs": [
[
"==",
"0.10.0"
]
]
},
{
"name": "jmespath",
"specs": [
[
"==",
"1.0.1"
]
]
},
{
"name": "jusText",
"specs": [
[
"==",
"3.0.2"
]
]
},
{
"name": "loguru",
"specs": [
[
"==",
"0.7.3"
]
]
},
{
"name": "lxml",
"specs": [
[
"==",
"5.4.0"
]
]
},
{
"name": "lxml_html_clean",
"specs": [
[
"==",
"0.4.2"
]
]
},
{
"name": "macholib",
"specs": [
[
"==",
"1.16.3"
]
]
},
{
"name": "markdownify",
"specs": [
[
"==",
"1.1.0"
]
]
},
{
"name": "mpmath",
"specs": [
[
"==",
"1.3.0"
]
]
},
{
"name": "Nuitka",
"specs": [
[
"==",
"2.7.12"
]
]
},
{
"name": "numpy",
"specs": [
[
"==",
"2.2.6"
]
]
},
{
"name": "onnxruntime",
"specs": [
[
"==",
"1.22.0"
]
]
},
{
"name": "ordered-set",
"specs": [
[
"==",
"4.1.0"
]
]
},
{
"name": "packaging",
"specs": [
[
"==",
"25.0"
]
]
},
{
"name": "prompt-toolkit",
"specs": [
[
"==",
"3.0.39"
]
]
},
{
"name": "proto-plus",
"specs": [
[
"==",
"1.26.1"
]
]
},
{
"name": "protobuf",
"specs": [
[
"==",
"6.31.1"
]
]
},
{
"name": "pyasn1",
"specs": [
[
"==",
"0.6.1"
]
]
},
{
"name": "pyasn1_modules",
"specs": [
[
"==",
"0.4.2"
]
]
},
{
"name": "pycparser",
"specs": [
[
"==",
"2.22"
]
]
},
{
"name": "pydantic",
"specs": [
[
"==",
"2.11.5"
]
]
},
{
"name": "pydantic_core",
"specs": [
[
"==",
"2.33.2"
]
]
},
{
"name": "pyinstaller",
"specs": [
[
"==",
"6.14.2"
]
]
},
{
"name": "pyinstaller-hooks-contrib",
"specs": [
[
"==",
"2025.5"
]
]
},
{
"name": "python-dateutil",
"specs": [
[
"==",
"2.9.0.post0"
]
]
},
{
"name": "python-dotenv",
"specs": [
[
"==",
"1.1.0"
]
]
},
{
"name": "pytz",
"specs": [
[
"==",
"2025.2"
]
]
},
{
"name": "PyYAML",
"specs": [
[
"==",
"6.0.1"
]
]
},
{
"name": "regex",
"specs": [
[
"==",
"2024.11.6"
]
]
},
{
"name": "requests",
"specs": [
[
"==",
"2.32.3"
]
]
},
{
"name": "rsa",
"specs": [
[
"==",
"4.9.1"
]
]
},
{
"name": "s3transfer",
"specs": [
[
"==",
"0.13.0"
]
]
},
{
"name": "setuptools",
"specs": [
[
"==",
"80.9.0"
]
]
},
{
"name": "shapely",
"specs": [
[
"==",
"2.1.1"
]
]
},
{
"name": "six",
"specs": [
[
"==",
"1.17.0"
]
]
},
{
"name": "sniffio",
"specs": [
[
"==",
"1.3.1"
]
]
},
{
"name": "soupsieve",
"specs": [
[
"==",
"2.7"
]
]
},
{
"name": "sqlite-vec",
"specs": [
[
"==",
"0.1.6"
]
]
},
{
"name": "sympy",
"specs": [
[
"==",
"1.14.0"
]
]
},
{
"name": "tenacity",
"specs": [
[
"==",
"8.5.0"
]
]
},
{
"name": "tld",
"specs": [
[
"==",
"0.13.1"
]
]
},
{
"name": "tokenizers",
"specs": [
[
"==",
"0.21.1"
]
]
},
{
"name": "tqdm",
"specs": [
[
"==",
"4.66.4"
]
]
},
{
"name": "trafilatura",
"specs": [
[
"==",
"2.0.0"
]
]
},
{
"name": "tree_sitter",
"specs": [
[
"==",
"0.20.1"
]
]
},
{
"name": "typing-inspection",
"specs": [
[
"==",
"0.4.1"
]
]
},
{
"name": "typing_extensions",
"specs": [
[
"==",
"4.14.1"
]
]
},
{
"name": "tzlocal",
"specs": [
[
"==",
"5.3.1"
]
]
},
{
"name": "urllib3",
"specs": [
[
"==",
"2.5.0"
]
]
},
{
"name": "wcwidth",
"specs": [
[
"==",
"0.2.13"
]
]
},
{
"name": "websockets",
"specs": [
[
"==",
"15.0.1"
]
]
},
{
"name": "wheel",
"specs": [
[
"==",
"0.45.1"
]
]
},
{
"name": "xmltodict",
"specs": [
[
"==",
"0.14.2"
]
]
},
{
"name": "zstandard",
"specs": [
[
"==",
"0.23.0"
]
]
}
],
"lcname": "sutrakit"
}