Code Cognition โ AI-Powered Code Assistant for CLI & VSCode
A powerful code assistant available as both CLI tool and VSCode extension.
Review code, generate functions, search semantically, and refactor projects with an intelligent multi-agent system.
Run locally with Ollama or connect to Groq, Google AI, OpenAI, and more.
Everything you need to supercharge your development workflow, running entirely on your local machine.
Analyze code for bugs, security vulnerabilities, performance issues, and style problems. Get actionable suggestions with severity levels.
Generate functions, classes, scripts, and unit tests from natural language descriptions. Includes type hints and docstrings.
Search your codebase using natural language queries. Powered by RAG (Retrieval Augmented Generation) for intelligent results.
Edit files with natural language instructions. Preview changes before applying, with automatic backup support.
Refactor across multiple files at once. Add docstrings, convert patterns, or apply consistent changes project-wide.
Rename functions, classes, and variables across your entire project. Smart detection ensures all references are updated.
Have conversations with AI about your code. Ask questions, get explanations, and receive suggestions interactively.
Create a searchable semantic index of your codebase. Enables fast, intelligent code discovery and context retrieval.
Interactive agent that understands your intent. Generate, review, edit, explain, and refactor code with natural language commands.
Smart intent detection automatically routes your requests to the right handlerโgenerate, review, edit, explain, or refactor.
Full IDE integration with sidebar chat, quick actions, and context-aware assistance. No need to leave your editor!
6 specialized agents (Generator, Reviewer, Tester, Documenter, General, Debug Helper) that auto-select based on your message and collaborate via handoffs.
Stack trace analysis and error debugging. Auto-detects errors in 7 languages with AI-powered fix suggestions.
Create, modify, and delete files directly from chat. Diff preview before applying changes.
Multiple independent chat sessions with persistence. Switch between conversations.
Cancel AI responses mid-generation. Send button transforms to stop button.
Mobile development support with custom CLI path configuration.
Real-time token-by-token responses with blinking cursor. See AI thinking as it writesโno more waiting for complete responses.
Choose your LLM: Ollama (local), Groq, Google AI, OpenAI, Cerebras, or OpenRouter. Free tiers available for most providers.
Get up and running in minutes with these simple steps.
Download and install Ollama from the official website to run LLMs locally.
# Download from https://ollama.ai
ollama pull deepseek-coder:6.7b
Install directly from PyPI with a single command. No cloning required!
pip install cognify-code
๐ก For Google Gemini support: pip install cognify-code[google]
๐ก For Groq support: pip install cognify-code[groq]
๐ก For all providers: pip install cognify-code[all-providers]
You're ready! Use either cognify or ai-assist command.
cognify status
# or
ai-assist review myfile.py
Powerful commands at your fingertips. Here's what you can do with Cognify AI.
# Review a single file
ai-assist review path/to/file.py
# Review with JSON output
ai-assist review src/ --format json
# Generate a function
ai-assist generate "binary search" --language python
# Generate a class
ai-assist generate "REST client" --mode class
# Index your codebase first
ai-assist index .
# Search with natural language
ai-assist search "error handling"
# Preview changes before applying
ai-assist edit config.py "add logging" --preview
# Edit with backup
ai-assist edit utils.py "add type hints" --backup
# Dry run to preview changes
ai-assist refactor "add docstrings" -p "**/*.py" --dry-run
# Apply with confirmation
ai-assist refactor "convert print to logging" --confirm
# Rename a function
ai-assist rename old_func new_func --type function
# Rename a class
ai-assist rename MyClass BetterClass --type class
# Start interactive agent
ai-assist agent
# Quick commands
ai-assist agent-review src/main.py
ai-assist agent-generate "email validator"
ai-assist agent-explain config.py
Bring AI-powered code assistance directly into your favorite IDE with our powerful sidebar chat.
โก Generator - Code creation
๐ฌ General - Questions & help
๐ Reviewer - Code analysis
๐ Documenter - Documentation
๐งช Tester - Unit tests
The system analyzes your message and automatically picks the best agent. Say "review this code" and it switches to Code Reviewer. Say "write tests" and it switches to Test Writer.
Agents collaborate! After Code Reviewer finds issues, it suggests switching to Generator for fixes. After Generator creates code, it suggests Tester for coverage.
See responses appear token-by-token with a blinking cursor. Context-aware conversations that remember your history. Retry button on errors.
The VSCode extension requires the CLI to be installed.
pip install cognify-code
Build from source or download the VSIX file.
# Build from source
cd vscode-extension && npm run package
code --install-extension cognify-code-1.2.0.vsix
Click the Cognify icon in the sidebar and start asking questions!
# Example messages
"Create a binary search function"
"Review this code for bugs"
"Write unit tests for this class"
Built with modern, reliable technologies for the best developer experience.