π v0.1.5 released!
Critical syntax error fix and improved startup reliability.
If you find Cognix useful, please give it a star β β it helps us reach more developers and build a stronger community.
βββ βββ βββ ββββ β βββ βββ βββ βββ ββββ β βββ
Cognix β Augmented AI Development Partner for CLI
Persistent Sessions, Long-Term Memory, Multi-Model Support, and Full-Pipeline Development.
Build smarter, faster, and without context loss.
Quick Start β’ Demo β’ Features β’ Commands
Cognix is the only AI coding Partner that:
- πΎ Session Restoration: Resume interrupted work completely
- β‘ Structured Workflow: Think β Plan β Write
- π¨ Practical Results: Generate beautiful GUI apps instantly
- π§ Persistent Memory: Remember entire projects across sessions
"Once you have an idea, it's already complete."
cognix_demo_12sec_20250818.mp4
12-second demo: Session restoration β /write β Beautiful neon green clock app
# 0-1 seconds: Start Cognix
cognix
# 1-3 seconds: Session restoration
Would you like to restore the previous session? [y/N]: y
β
Session restored successfully!
π Workflow state restored!
Goal: Brief: big bright green clock popup window bold digits
Progress: β
Think β β
Plan β β³ Write
# 3-8 seconds: Code generation
cognix> /write --file clock.py
β¨ Writing implementation for: Brief: big bright green clock popup window bold digits
Target file: clock.py
Target language: python (from .py)
# 8-10 seconds: Beautiful neon green clock appears
Save generated code to clock.py? [y/N] y
β
Code saved to: clock.pyWhat you just saw:
- πΎ Workflow Restoration: AI remembers your thinking process across sessions
- β‘ Instant Code Generation: From plan to working GUI in seconds
- π¨ Beautiful Results: Functional neon green digital clock with #00FF00 perfection
- π Complete Pipeline: Think β Plan β Write β Deploy in one session
# Step 1: Start your thinking
cognix> /think "Brief: bright green digital clock GUI"
# Step 2: Plan implementation
cognix> /plan
# Step 3: Generate code
cognix> /write --file my_clock.py
# Step 4: Exit and run
cognix> exit
python my_clock.py # β Beautiful clock appears!Recommended (isolated):
pipx install cognixAlternative:
pip install cognix# Option 1: Anthropic Claude (Recommended)
echo "ANTHROPIC_API_KEY=your_api_key_here" > .env
# Get your key at: https://console.anthropic.com/
# Option 2: OpenAI GPT
echo "OPENAI_API_KEY=your_api_key_here" > .env
# Get your key at: https://platform.openai.com/
# Option 3: OpenRouter (Multiple models with one key)
echo "OPENAI_API_KEY=sk-or-v1-your_openrouter_key" > .env
echo "OPENAI_BASE_URL=https://openrouter.ai/api/v1" >> .env
# Get your key at: https://openrouter.ai/keys
# Free models available: https://openrouter.ai/models/?q=free
# Start Cognix
cognixcognix> /think "Create a REST API for user authentication"
# π€ AI analyzes your requirements...
cognix> /plan
# π AI creates detailed implementation plan...
cognix> /write --file auth_api.py
# βοΈ AI generates production-ready code...That's it! Your API is ready to use.
| Command | Description | Example |
|---|---|---|
/think "<goal>" |
AI analyzes your problem | /think "API rate limiting" |
/plan |
Creates implementation strategy | /plan |
/write [--file path] |
Generates production code | /write --file api.py |
| Command | Description | Example |
|---|---|---|
/help |
Show all commands | /help |
/model |
Show current model & options | /model |
/workflow-status |
Check current progress | /workflow-status |
/status |
Show current config/model | /status |
/memory |
Inspect or export memory | /memory export |
| Command | Description | Example |
|---|---|---|
/model <name> |
Switch AI models instantly | /model gpt-4o |
| Command | Description | Example |
|---|---|---|
/edit <file> |
AI-assisted editing | /edit src/main.py |
/fix <file> |
Auto-fix bugs | /fix api.py --function auth |
/review [dir] |
Code analysis | /review src/ |
/diff |
Show changes before applying | /diff |
/apply |
Apply generated patch safely | /apply |
/backup |
Manage backups/restore | /backup restore |
| Command | Description | Example |
|---|---|---|
/save-session <name> |
Save your work | /save-session "auth-system" |
/resume <name> |
Resume previous work | /resume "auth-system" |
/list_sessions |
List saved sessions | /list_sessions |
/session_info |
Show current session meta | /session_info |
/save_session <name> |
Save current session | /save_session mywork |
/resume <name> |
Restore a saved session | /resume mywork |
| Command | Description | Example |
|---|---|---|
/clear-workflow |
Start fresh | /clear-workflow |
cognix> /think "Build a todo app"
# Using Claude-4: Detailed, enterprise-focused analysis
cognix> /model gpt-4o
β
Switched to: gpt-4o
cognix> /think "Build a todo app"
# Using GPT-4o: Creative, modern, action-oriented approachCompare results instantly. Choose the best AI for each task.
# Yesterday
cognix> /think "E-commerce platform architecture"
cognix> /plan
# Work interrupted...
# Today
cognix
π Workflow state restored!
Goal: E-commerce platform architecture
Progress: β
Think β β
Plan β β³ Write
cognix> /write --file platform.py
# Continue exactly where you left off!# Generate production-ready GUI apps in seconds
cognix> /think "Brief: neon green clock GUI"
cognix> /plan
cognix> /write --file clock.py
# β Beautiful tkinter app with #00FF00 fluorescent green digits!Perfect for rapid prototyping and instant visual results.
- π Auto-scans your project structure
- π§ Remembers all previous conversations
- π― Adapts suggestions to your codebase
- π Maintains context across sessions
- Enhanced reference notation resilience for partial file failures
- Improved error handling and user-friendly messages
- Cross-model compatibility improvements (Claude Sonnet 4 & GPT-4o tested)
- Optimized system prompt construction
cognix> /think "Add OAuth2 authentication to my Express.js API"
π Analysis Result:
**1) What needs to be built:** OAuth2 flow with JWT tokens, middleware for route protection,
and integration with popular providers (Google, GitHub, etc.)
**2) Key challenges:** Token validation, refresh logic, and secure session management
**3) Success approach:** Use passport.js ecosystem, implement proper error handling,
and add comprehensive testing for auth flows
cognix> /plan
π Implementation Plan:
- Setup & core logic: Install passport, passport-jwt, configure strategies for Google/GitHub OAuth2...
- Security implementation: JWT signing/validation, refresh token rotation, rate limiting...
- Testing & deployment: Unit tests for auth middleware, integration tests for OAuth flows...
cognix> /write --file auth/oauth.js
# Generates complete OAuth2 implementation# Claude-4 approach (detailed, enterprise-focused)
cognix> /think "Database caching strategy"
β Comprehensive analysis with Redis, Memcached comparison,
enterprise concerns, compliance considerations
# Switch to GPT-4o for creative alternatives
cognix> /model gpt-4o
cognix> /think "Database caching strategy"
β Modern approach with edge caching, CDN integration,
serverless caching solutions
# Choose the best elements from both!# After weekend break
cognix
π Previous session found!
Last updated: 2025-08-09T18:42:57
Entries: 15
Model: claude-sonnet-4-20250514
Would you like to restore the previous session? [y/N]: y
β
Session restored successfully!
π Workflow state restored!
Goal: Microservices architecture design
Progress: β
Think β β
Plan β β³ Write
# Continue immediately where you left off
cognix> /write --file services/user-service.py# 12-second workflow for visual applications
cognix> /think "Brief: desktop calculator with dark theme"
cognix> /plan
cognix> /write --file calculator.py
# Result: Complete GUI calculator ready to use
python calculator.py # β Professional calculator app launchesclaude-opus-4-20250514- Most capable, complex reasoningclaude-sonnet-4-20250514- Balanced performance & speed
gpt-4o- Latest model, highly creativegpt-4o-mini- Fast responses, cost-effective
google/gemini-2.0-flash-exp:free- Free Google Geminimicrosoft/phi-3-mini-128k-instruct:free- Free Microsoft Phi- Many more models available at https://openrouter.ai/models
claude-3-5-sonnet-20241022claude-3-7-sonnet-20250219
Switch between any model instantly: /model gpt-4o
Problem: Provider anthropic not available or No LLM providers available
Solution: Cognix automatically detects available API providers. Configure at least one:
# Option 1: Environment variables
export OPENAI_API_KEY=your_key_here
export ANTHROPIC_API_KEY=your_key_here
# Option 2: .env file
echo "OPENAI_API_KEY=your_key_here" > .env
echo "ANTHROPIC_API_KEY=your_key_here" >> .envUsing OpenRouter for multiple models:
OPENAI_API_KEY=sk-or-v1-your_openrouter_key
OPENAI_BASE_URL=https://openrouter.ai/api/v1Common OpenRouter Issues:
402 Insufficient creditsβ Add credits at https://openrouter.ai/settings/credits or use free models429 Rate limitedβ Wait a few minutes or try different free modelsModel not foundβ Check available models at https://openrouter.ai/models- Free models available at: https://openrouter.ai/models/?q=free
OpenAI Only:
OPENAI_API_KEY=sk-proj-your_key_hereβ Cognix automatically defaults to gpt-4o
Anthropic Only:
ANTHROPIC_API_KEY=sk-ant-your_key_hereβ Cognix automatically defaults to claude-sonnet-4-20250514
OpenRouter Only:
OPENAI_API_KEY=sk-or-v1-your_openrouter_key
OPENAI_BASE_URL=https://openrouter.ai/api/v1β Access to multiple models with single key
cognix> /model gpt-4o # Switch to OpenAI
cognix> /model claude-sonnet-4 # Switch to Claude
cognix> /model google/gemini-2.0-flash-exp:free # Switch to OpenRouter
cognix> /model # Show all available modelsCognix checks for API keys in this priority:
- Environment variables (OPENAI_API_KEY, ANTHROPIC_API_KEY)
- .env file in current directory
- .env file in ~/.cognix/ directory
- No LLM providers available β Set at least one API key
- Model switching fails β Use /model to see available options
- Session restore errors β Check ~/.cognix/sessions/ directory permissions
Cognix stores local data under your home directory:
~/.cognix/config.jsonβ user configuration~/.cognix/sessions/β saved sessions & autosave~/.cognix/memory/memory.jsonβ longβterm memory
All files are local to your machine. You can delete them anytime.
{
"model": "claude-sonnet-4-20250514",
"temperature": 0.7,
"max_tokens": 4000,
"auto_backup": true,
"stream_responses": true,
"typewriter_effect": false
}# API Keys (Required)
ANTHROPIC_API_KEY=your_anthropic_key
OPENAI_API_KEY=your_openai_key
# OpenRouter (Alternative)
OPENAI_API_KEY=sk-or-v1-your_openrouter_key
OPENAI_BASE_URL=https://openrouter.ai/api/v1
# Optional settings
COGNIX_DEBUG=true
DEFAULT_MODEL=gpt-4o
COGNIX_AUTO_SAVE=true- Python: 3.8 or higher
- OS: Windows 10+, macOS 10.15+, Linux
- Memory: 512MB minimum recommended
- Internet: Required for API connections
| Feature | Cognix | Copilot |
|---|---|---|
| Multi-AI Support | β GPT-4o + Claude-4 + OpenRouter | β OpenAI only |
| Session Persistence | β Full project memory | β No memory |
| Workflow Structure | β ThinkβPlanβWrite | β Code completion only |
| CLI Integration | β Native terminal | β Editor-dependent |
| Feature | Cognix | Web Interfaces |
|---|---|---|
| Development Integration | β Direct file operations | β Copy-paste workflow |
| Project Context | β Full codebase awareness | β Limited context |
| AI Model Switching | β Instant switching | β Separate applications |
| Session Management | β Auto-save everything | β Manual management |
- π§ Memory Persistence: Only Cognix remembers everything across sessions
- π Multi-AI: Compare approaches from different models instantly
- β‘ Structured Workflow: ThinkβPlanβWrite methodology
- π― State Restoration: Resume work exactly where you left off
cognix> /think "Full-stack blog platform with Next.js"
cognix> /plan
cognix> /write --file blog-platform.jscognix> /think "Analyze customer churn with machine learning"
cognix> /plan
cognix> /write --file churn_analysis.pycognix> /think "Docker containerization for my Python app"
cognix> /plan
cognix> /write --file Dockerfilecognix> /think "React Native app with offline sync"
cognix> /plan
cognix> /write --file OfflineSync.jscognix> /think "Todo app - brief"
π― Detected constraints: brief format
π Analysis Result:
**1) What needs to be built:** Basic CRUD operations...
**2) Key challenges:** Data persistence and user experience...
**3) Success approach:** Start with MVP featuring essential functions...# Edit with AI assistance
cognix> /edit src/api.py
π Editing: src/api.py
What changes would you like to make? Add rate limiting
π€ Generating suggestions...
π‘ Suggestion: I'll add Express rate limiting middleware...
# Auto-fix specific functions
cognix> /fix utils.py --function calculate_total
π§ Analyzing function: calculate_total
β
Fixed: Added null checking and proper error handlingcognix> How can I improve the performance of my React components?
# AI automatically analyzes your React project structure
π§ Analyzing your React project...
π Found: 15 components, 3 hooks, 2 contexts
π‘ Specific recommendations for your codebase:
1. UserProfile.jsx: Consider React.memo for expensive renders
2. DataTable.jsx: Implement virtualization for large datasets
3. Global state: Your Redux store could benefit from RTK QueryWe welcome contributions! Here's how to get started:
git clone https://github.com/cognix-dev/cognix.git
cd cognix
pip install -e ".[dev]"pytest tests/black cognix/
flake8 cognix/- π Bug Reports: GitHub Issues
- π‘ Feature Proposals: GitHub Discussions
- π Pull Requests: Contributing Guide
- No LLM providers available β Set
ANTHROPIC_API_KEYorOPENAI_API_KEYin your.env, then restart Cognix. - Patch apply failed β Restore the last backup with
/backup restore.
MIT License - see LICENSE file for details.
- π Individual memory entry deletion
- ποΈ Automatic memory archiving
- π Memory size management and cleanup
- π¨ AI code enhancement (/refactor, /lint)
- β‘ Improved streaming output
- π― Target file/function specification (@filename, #function)
- π File execution capabilities (/run)
- π± Browser-based GUI (beta)
- π Advanced code analysis features
- π₯ Shared sessions between team members
- π Code review workflows
- π Basic GitHub/GitLab integration
- π’ Self-hosted deployment options
- π Advanced security features
- π Usage analytics and metrics
- π Bug Reports: GitHub Issues
- π‘ Feature Requests: GitHub Discussions
- π¦ X: @Cognix_dev
π§ Cognix - Where AI meets intelligent development workflows
Made with β€οΈ by Individual Developer
β Star on GitHub β’ π Get Started
