Skip to main content

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

Python 3.9+ MIT License Tests 6 Providers VSCode Extension


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

Cognify VSCode

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:

  1. Open VSCode
  2. Go to Extensions sidebar
  3. Click "..." โ†’ "Install from VSIX..."
  4. Select cognify-code-1.2.0.vsix

Using the Extension

  1. Click the โš›๏ธ Cognify icon in the Activity Bar (left sidebar)
  2. Use quick actions or type your question
  3. Click "๐Ÿ“Ž Add Context" to include code from your editor
  4. 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


Download files

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

Source Distribution

cognify_code-1.2.0.tar.gz (121.1 kB view details)

Uploaded Source

Built Distribution

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

cognify_code-1.2.0-py3-none-any.whl (143.2 kB view details)

Uploaded Python 3

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

Hashes for cognify_code-1.2.0.tar.gz
Algorithm Hash digest
SHA256 6a80fa25a2faba04af5fb1fcc26c33bca5cb162235721b33aa4a3576147870a4
MD5 aea48a9b39e2bce02c7f963427a69b06
BLAKE2b-256 5e7d004989794dc377fb78e7f668d56359234143879316d74ccd9bf14b4c2242

See more details on using hashes here.

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

Hashes for cognify_code-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a99e8c5c866a7a4bd811b3444e11130bd44aa99c5df418d6a5c98034862b2943
MD5 a1417ca0a0bd7ddfc57b71c1870752a9
BLAKE2b-256 b2e7942f4ab53998af4b282bf5da76ace2783d3a0ea798570e64ef2d6122b546

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