AI-powered CLI development assistant
Project description
Cognix
๐ v0.1.1 released!
Provider auto-detection and model fallback fixes included. Now works seamlessly with OpenAI-only or Anthropic-only setups.
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
๐ฏ 12-Second Magic
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."
๐ฌ See It In Action
https://github.com/cognix-dev/cognix/assets/226239127/478856788-94577806-5a80-4deb-ae58-c699c43efd3c
12-second demo: Session restoration โ /write โ Beautiful neon green clock app
Quick Demo (12 seconds)
# 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.py
What 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
Try It Yourself
# 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!
๐ Quick Start
Installation
Recommended (isolated):
pipx install cognix
Alternative:
pip install cognix
Setup (2 minutes)
# 1. Get your API key from Anthropic or OpenAI
# https://console.anthropic.com/ or https://platform.openai.com/
# 2. Create .env file
echo "ANTHROPIC_API_KEY=your_api_key_here" > .env
echo "OPENAI_API_KEY=your_api_key_here" >> .env
# 3. Start Cognix
cognix
Your First Workflow (30 seconds)
cognix> /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.
๐ Commands
Core Workflow
| 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 |
Help & Information
| 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 |
AI Model Management
| Command | Description | Example |
|---|---|---|
/model <name> |
Switch AI models instantly | /model gpt-4o |
File Operations
| 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 |
Session Management
| 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 |
Workflow Control
| Command | Description | Example |
|---|---|---|
/clear-workflow |
Start fresh | /clear-workflow |
๐ Key Features
๐ Multi-AI Powerhouse
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 approach
Compare results instantly. Choose the best AI for each task.
๐ง True Session Persistence
# 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!
โก Lightning-Fast Development
# 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.
โก Intelligent Context Awareness
- ๐ Auto-scans your project structure
- ๐ง Remembers all previous conversations
- ๐ฏ Adapts suggestions to your codebase
- ๐ Maintains context across sessions
๐ก Real Usage Examples
Scenario 1: Feature Development
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
Scenario 2: AI Model Comparison
# 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!
Scenario 3: Session Restoration
# 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
Scenario 4: Rapid GUI Prototyping
# 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 launches
๐ฏ Supported AI Models
Claude 4 Series (Anthropic)
claude-opus-4-20250514- Most capable, complex reasoningclaude-sonnet-4-20250514- Balanced performance & speed
GPT-4o Series (OpenAI)
gpt-4o- Latest model, highly creativegpt-4o-mini- Fast responses, cost-effective
Legacy Support
claude-3-5-sonnet-20241022claude-3-7-sonnet-20250219
Switch between any model instantly: /model gpt-4o
โ๏ธ Configuration & Customization
Troubleshooting
API Key Configuration Issues
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" >> .env
Provider-Specific Setup
OpenAI Only:
bashOPENAI_API_KEY=sk-proj-your_key_here
โ Cognix automatically defaults to gpt-4o
Anthropic Only:
bashANTHROPIC_API_KEY=sk-ant-your_key_here
โ Cognix automatically defaults to claude-sonnet-4-20250514
Manual Model Switching
bashcognix> /model gpt-4o # Switch to OpenAI
cognix> /model claude-sonnet-4 # Switch to Claude
cognix> /model # Show all available models
Environment Detection Order
Cognix 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
Common Issues
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
## ๐ Data Storage & Privacy
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.
### Default Config (`~/.cognix/config.json`)
```json
{
"model": "claude-sonnet-4-20250514",
"temperature": 0.7,
"max_tokens": 4000,
"auto_backup": true,
"stream_responses": true,
"typewriter_effect": false
}
Environment Variables
# API Keys (Required)
ANTHROPIC_API_KEY=your_anthropic_key
OPENAI_API_KEY=your_openai_key
# Optional settings
COGNIX_DEBUG=true
DEFAULT_MODEL=gpt-4o
COGNIX_AUTO_SAVE=true
System Requirements
- Python: 3.8 or higher
- OS: Windows 10+, macOS 10.15+, Linux
- Memory: 512MB minimum recommended
- Internet: Required for API connections
๐ Why Choose Cognix?
vs. GitHub Copilot
| Feature | Cognix | Copilot |
|---|---|---|
| Multi-AI Support | โ GPT-4o + Claude-4 | โ OpenAI only |
| Session Persistence | โ Full project memory | โ No memory |
| Workflow Structure | โ ThinkโPlanโWrite | โ Code completion only |
| CLI Integration | โ Native terminal | โ Editor-dependent |
vs. ChatGPT/Claude Web
| 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 |
vs. Other AI Coding Tools
- ๐ง 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
๐ Project-Specific Examples
Web Development
cognix> /think "Full-stack blog platform with Next.js"
cognix> /plan
cognix> /write --file blog-platform.js
Data Science
cognix> /think "Analyze customer churn with machine learning"
cognix> /plan
cognix> /write --file churn_analysis.py
DevOps
cognix> /think "Docker containerization for my Python app"
cognix> /plan
cognix> /write --file Dockerfile
Mobile Development
cognix> /think "React Native app with offline sync"
cognix> /plan
cognix> /write --file OfflineSync.js
๐ ๏ธ Advanced Features
Constraint Detection
cognix> /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...
Intelligent File Operations
# 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 handling
Project-Aware Conversations
cognix> 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 Query
๐ค Contributing
We welcome contributions! Here's how to get started:
Development Setup
git clone https://github.com/cognix-dev/cognix.git
cd cognix
pip install -e ".[dev]"
Running Tests
pytest tests/
Code Style
black cognix/
flake8 cognix/
Contribution Guidelines
- ๐ Bug Reports: GitHub Issues
- ๐ก Feature Proposals: GitHub Discussions
- ๐ Pull Requests: Contributing Guide
๐งฐ Troubleshooting
- 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.
๐ License
MIT License - see LICENSE file for details.
๐ Roadmap
v0.2.0 - Memory Management & Code Enhancement
- ๐ Individual memory entry deletion
- ๐๏ธ Automatic memory archiving
- ๐ Memory size management and cleanup
- ๐จ AI code enhancement (/refactor, /lint)
- โก Improved streaming output
v0.3.0 - Advanced Development Features
- ๐ฏ Target file/function specification (@filename, #function)
- ๐ File execution capabilities (/run)
- ๐ฑ Browser-based GUI (beta)
- ๐ Advanced code analysis features
v0.4.0 - Team Collaboration
- ๐ฅ Shared sessions between team members
- ๐ Code review workflows
- ๐ Basic GitHub/GitLab integration
v0.5.0 - Enterprise
- ๐ข Self-hosted deployment options
- ๐ Advanced security features
- ๐ Usage analytics and metrics
๐ฌ Support
Need Help?
- ๐ Bug Reports: GitHub Issues
- ๐ก Feature Requests: GitHub Discussions
Stay Updated
- ๐ฆ X: @Cognix_dev
๐ง Cognix - Where AI meets intelligent development workflows
Made with โค๏ธ by Individual Developer
โญ Star on GitHub โข ๐ Get Started
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 cognix-0.1.1.tar.gz.
File metadata
- Download URL: cognix-0.1.1.tar.gz
- Upload date:
- Size: 78.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec35869cadf12b2500ddb59b2260f0ecb112fb2720979cad93e848f7f3a066d2
|
|
| MD5 |
ca231a1a42b20a4f839da1a81ec2d151
|
|
| BLAKE2b-256 |
fdb7dc5f4874ad02b2a4dbf4143ca624560db09780442d07937939b1e1f21b5f
|
File details
Details for the file cognix-0.1.1-py3-none-any.whl.
File metadata
- Download URL: cognix-0.1.1-py3-none-any.whl
- Upload date:
- Size: 76.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
378a4b6fa99da6417a60c09b0986096998ef889ce124221e2005eaaa977446a7
|
|
| MD5 |
0d80f5a0e11a92b29166c53b024877a6
|
|
| BLAKE2b-256 |
0913d73aedf3bf0149e0330450ac7bea43fd5f6158089e94071627e96591e170
|