Code Cognition โ Your Local AI-Powered Code Assistant
A powerful CLI tool that brings AI-powered code cognition to your terminal.
Review code, generate functions, search semantically, refactor projects, and interact with an AI code agentโall running locally with Ollama.
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.
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
Built with modern, reliable technologies for the best developer experience.