Your local AI-powered code assistant. Review, generate, search, and refactor code with an intelligent AI agentโall running locally with complete privacy.
Project description
๐ง Cognify AI
Code Cognition โ Your AI-Powered Code Assistant
Features โข VSCode Extension โข Installation โข Providers โข Usage โข Docs
A powerful CLI tool and VSCode extension that brings AI-powered code cognition to your development workflow. Review code, generate functions, search your codebase semantically, and refactor projectsโwith support for multiple LLM providers including local (Ollama) and cloud options with free tiers.
โจ Features
| Feature | Description |
|---|---|
| ๐ Code Review | Analyze code for bugs, security issues, and style problems |
| โก Code Generation | Generate functions, classes, and tests from natural language |
| ๐ Semantic Search | Search your codebase using natural language queries |
| ๐ AI File Editing | Edit files with natural language instructions |
| ๐ Multi-File Refactor | Refactor across multiple files at once |
| โ๏ธ Symbol Renaming | Rename functions, classes, variables across your project |
| ๐ฌ Interactive Chat | Chat with AI about your code |
| ๐ Codebase Indexing | Create searchable semantic index with RAG |
| ๐ Multi-Provider | Support for 6 LLM providers (local & cloud) |
| ๐ฅ๏ธ VSCode Extension | Full IDE integration with sidebar chat |
| ๐ File Operations | Create/modify/delete files directly from chat |
| ๐๏ธ Multi-Session Chat | Multiple persistent chat sessions |
| ๐ค Multi-Agent System | 6 specialized AI agents with auto-selection |
| ๐ง Project Intelligence | Auto-detect project type, frameworks, architecture |
| ๐ Debug Helper | Stack trace analysis and error debugging |
| ๐ Error Detection | Auto-detect errors in 7 languages |
| ๐ฑ Android/Termux | Mobile development support |
| โน๏ธ Stop Generation | Cancel AI responses mid-generation (NEW) |
| ๐ง Smart Progress | Context-aware progress indicators (NEW) |
๐ฅ๏ธ VSCode Extension
The Cognify AI VSCode extension brings all the power of Cognify directly into your IDE with a beautiful sidebar chat interface.
Extension Features (v1.2.0)
- โ๏ธ Sidebar Chat Panel - Chat with AI directly in VSCode sidebar
- ๐ Add Context - Include code from your editor in conversations
- ๐ Code Review - Review files with inline diagnostics
- โจ Code Generation - Generate code from descriptions
- ๐ก Code Explanation - Get explanations for selected code
- โ๏ธ AI Editing - Edit code with natural language
- ๐ File Operations - Create, modify, delete files from chat
- ๐๏ธ Multi-Session Chat - Multiple persistent chat sessions
- ๐ค Multi-Agent System - 6 specialized agents with auto-selection
- ๐ง Project Intelligence - Auto-detect project type & tech stack
- ๐ Diff Engine - View and approve code changes before applying
- ๐ Debug Helper - Stack trace analysis & error debugging
- ๐ Error Detection - Auto-detect errors in 7 languages
- ๐ฑ Android/Termux - Custom CLI path for mobile dev
- โน๏ธ Stop Generation - Cancel AI responses mid-stream (NEW v1.2.0)
- ๐ง Smart Progress - Context-aware progress steps (NEW v1.2.0)
Quick Actions
- ๐ Review current file
- ๐ก Explain selected code
- โจ Suggest improvements
- ๐งช Generate tests
Install VSCode Extension
# Build from source
cd vscode-extension
npm install
npm run compile
npx vsce package --no-dependencies
# Install the extension
code --install-extension cognify-code-1.2.0.vsix
Or install via VSCode:
- Open VSCode
- Go to Extensions sidebar
- Click "..." โ "Install from VSIX..."
- Select
cognify-code-1.2.0.vsix
Using the Extension
- Click the โ๏ธ Cognify icon in the Activity Bar (left sidebar)
- Use quick actions or type your question
- Click "๐ Add Context" to include code from your editor
- Press Enter or click Send
Keyboard Shortcuts:
| Command | Mac | Windows/Linux |
|---|---|---|
| Review File | Cmd+Shift+R |
Ctrl+Shift+R |
| Generate Code | Cmd+Shift+G |
Ctrl+Shift+G |
| Explain Code | Cmd+Shift+E |
Ctrl+Shift+E |
| Open Chat | Cmd+Shift+C |
Ctrl+Shift+C |
๐ค Supported Providers
| Provider | Free Tier | API Key | Best For |
|---|---|---|---|
| Ollama | โ Unlimited | โ None | Privacy, offline use |
| Google AI | โ Generous | โ Required | 1M+ token context |
| Groq | โ 1000 req/day | โ Required | Fastest inference |
| Cerebras | โ Available | โ Required | Fast inference |
| OpenRouter | โ Free models | โ Required | Model variety |
| OpenAI | โ Paid only | โ Required | GPT-4 quality |
๐ Quick Start
Option 1: Local with Ollama (No API Key)
# Install Ollama from https://ollama.ai
ollama pull deepseek-coder:6.7b
ollama serve
Option 2: Cloud with Free Tier
# Google AI Studio (1M token context, free)
export GOOGLE_API_KEY="your-key" # Get from https://aistudio.google.com/apikey
# OR Groq (fastest inference, free tier)
export GROQ_API_KEY="your-key" # Get from https://console.groq.com/keys
# OR OpenRouter (free models available)
export OPENROUTER_API_KEY="your-key" # Get from https://openrouter.ai/keys
Installation
Quick Install
pip install cognify-code
Complete Installation Guide
For detailed setup including:
- Offline LLMs with Ollama (DeepSeek Coder, Qwen, CodeLlama)
- Cloud Providers (Groq, Google AI, Cerebras, OpenAI)
- VSCode Extension installation
- Android/Termux support
- Troubleshooting guide
๐ Complete Installation Guide
Install from Source
# Clone the repository
git clone https://github.com/akkssy/cognify-ai.git
cd cognify-ai
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install the package
pip install -e .
Verify Installation
# Check status and available providers
cognify status
cognify providers
๐ CLI Usage
Code Review
cognify review path/to/file.py
cognify review src/ --format json
Code Generation
cognify generate "binary search function" --language python
cognify generate "REST API client class" --mode class
Semantic Search
# First, index your codebase
cognify index .
# Then search
cognify search "error handling"
File Editing
cognify edit config.py "add logging to all functions" --preview
Interactive Chat
cognify chat
All Commands
cognify --help
โ๏ธ Configuration
Configuration is managed via config.yaml:
llm:
provider: "ollama"
model: "deepseek-coder:6.7b"
base_url: "http://localhost:11434"
temperature: 0.1
max_tokens: 4096
Or use environment variables:
export AI_ASSISTANT_LLM_PROVIDER="groq"
export AI_ASSISTANT_LLM_MODEL="llama-3.3-70b-versatile"
export GROQ_API_KEY="your-key"
๐ Project Structure
cognify-ai/
โโโ src/ai_code_assistant/ # Core Python package
โ โโโ cli.py # Command-line interface
โ โโโ providers/ # LLM providers
โ โโโ reviewer/ # Code review
โ โโโ generator/ # Code generation
โ โโโ retrieval/ # Semantic search
โ โโโ editor/ # AI file editing
โ โโโ chat/ # Interactive chat
โโโ vscode-extension/ # VSCode Extension
โ โโโ src/ # Extension source
โ โโโ images/ # Icons
โ โโโ package.json # Extension manifest
โโโ tests/ # Unit tests
โโโ docs/ # Documentation
โโโ config.yaml # Configuration
๐งช Testing
PYTHONPATH=src pytest tests/ -v
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
๐ License
MIT License - see LICENSE for details.
Made with โค๏ธ for developers who want flexible AI-powered coding assistance
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cognify_code-1.2.0.tar.gz.
File metadata
- Download URL: cognify_code-1.2.0.tar.gz
- Upload date:
- Size: 121.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a80fa25a2faba04af5fb1fcc26c33bca5cb162235721b33aa4a3576147870a4
|
|
| MD5 |
aea48a9b39e2bce02c7f963427a69b06
|
|
| BLAKE2b-256 |
5e7d004989794dc377fb78e7f668d56359234143879316d74ccd9bf14b4c2242
|
File details
Details for the file cognify_code-1.2.0-py3-none-any.whl.
File metadata
- Download URL: cognify_code-1.2.0-py3-none-any.whl
- Upload date:
- Size: 143.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a99e8c5c866a7a4bd811b3444e11130bd44aa99c5df418d6a5c98034862b2943
|
|
| MD5 |
a1417ca0a0bd7ddfc57b71c1870752a9
|
|
| BLAKE2b-256 |
b2e7942f4ab53998af4b282bf5da76ace2783d3a0ea798570e64ef2d6122b546
|