cognix 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cognix-0.1.0/LICENSE +21 -0
- cognix-0.1.0/PKG-INFO +581 -0
- cognix-0.1.0/README.md +561 -0
- cognix-0.1.0/cognix/__init__.py +39 -0
- cognix-0.1.0/cognix/cli.py +2772 -0
- cognix-0.1.0/cognix/config.py +643 -0
- cognix-0.1.0/cognix/context.py +477 -0
- cognix-0.1.0/cognix/diff_engine.py +601 -0
- cognix-0.1.0/cognix/error_handling.py +304 -0
- cognix-0.1.0/cognix/llm.py +640 -0
- cognix-0.1.0/cognix/main.py +128 -0
- cognix-0.1.0/cognix/memory.py +269 -0
- cognix-0.1.0/cognix/prompt_templates.py +366 -0
- cognix-0.1.0/cognix/session.py +434 -0
- cognix-0.1.0/cognix/utils.py +611 -0
- cognix-0.1.0/cognix.egg-info/PKG-INFO +581 -0
- cognix-0.1.0/cognix.egg-info/SOURCES.txt +21 -0
- cognix-0.1.0/cognix.egg-info/dependency_links.txt +1 -0
- cognix-0.1.0/cognix.egg-info/entry_points.txt +3 -0
- cognix-0.1.0/cognix.egg-info/requires.txt +8 -0
- cognix-0.1.0/cognix.egg-info/top_level.txt +1 -0
- cognix-0.1.0/pyproject.toml +39 -0
- cognix-0.1.0/setup.cfg +4 -0
cognix-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Cognix
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
cognix-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,581 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cognix
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: AI-powered CLI development assistant
|
|
5
|
+
Author: Cognix
|
|
6
|
+
Maintainer: Cognix
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Requires-Python: >=3.9
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: openai>=1.0.0
|
|
12
|
+
Requires-Dist: anthropic>=0.5.0
|
|
13
|
+
Requires-Dist: pydantic>=1.10.0
|
|
14
|
+
Requires-Dist: rich>=13.0.0
|
|
15
|
+
Requires-Dist: colorama>=0.4.6
|
|
16
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
17
|
+
Requires-Dist: toml>=0.10.2
|
|
18
|
+
Requires-Dist: typing-extensions>=4.7.0
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+
# Cognix
|
|
22
|
+
|
|
23
|
+
<div align="center">
|
|
24
|
+
<div style="background-color: #1e1e1e; padding: 20px; border-radius: 8px; margin: 20px 0; border: 2px solid #333;">
|
|
25
|
+
<pre style="color: #00d962; font-family: 'Courier New', monospace; font-weight: bold; margin: 0; font-size: 16px; background-color: #1e1e1e;">
|
|
26
|
+
█▀▀ █▀█ █▀▀ █▄░█ █ ▀▄▀
|
|
27
|
+
█▄▄ █▄█ █▄█ █░▀█ █ █░█
|
|
28
|
+
</pre>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
**Cognix — Augmented AI Development Partner for CLI**
|
|
32
|
+
Persistent Sessions, Long-Term Memory, Multi-Model Support, and Full-Pipeline Development.
|
|
33
|
+
Build smarter, faster, and without context loss.
|
|
34
|
+
|
|
35
|
+
[](https://github.com/cognix-dev/cognix)
|
|
36
|
+
[](LICENSE)
|
|
37
|
+
[](https://python.org)
|
|
38
|
+
[](https://github.com/cognix-dev/cognix#-see-it-in-action)
|
|
39
|
+
|
|
40
|
+
[Quick Start](#-quick-start) • [Demo](#-see-it-in-action) • [Features](#-key-features) • [Commands](#-commands)
|
|
41
|
+
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 🎯 **12-Second Magic**
|
|
47
|
+
|
|
48
|
+
Cognix is the **only AI coding Partner** that:
|
|
49
|
+
- 💾 **Session Restoration**: Resume interrupted work completely
|
|
50
|
+
- ⚡ **Structured Workflow**: Think → Plan → Write
|
|
51
|
+
- 🎨 **Practical Results**: Generate beautiful GUI apps instantly
|
|
52
|
+
- 🧠 **Persistent Memory**: Remember entire projects across sessions
|
|
53
|
+
|
|
54
|
+
**"Once you have an idea, it's already complete."**
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 🎬 See It In Action
|
|
59
|
+
|
|
60
|
+
https://github.com/cognix-dev/cognix/assets/226239127/478856788-94577806-5a80-4deb-ae58-c699c43efd3c
|
|
61
|
+
|
|
62
|
+
*12-second demo: Session restoration → /write → Beautiful neon green clock app*
|
|
63
|
+
|
|
64
|
+
### Quick Demo (12 seconds)
|
|
65
|
+
```bash
|
|
66
|
+
# 0-1 seconds: Start Cognix
|
|
67
|
+
cognix
|
|
68
|
+
|
|
69
|
+
# 1-3 seconds: Session restoration
|
|
70
|
+
Would you like to restore the previous session? [y/N]: y
|
|
71
|
+
✅ Session restored successfully!
|
|
72
|
+
🔄 Workflow state restored!
|
|
73
|
+
Goal: Brief: big bright green clock popup window bold digits
|
|
74
|
+
Progress: ✅ Think → ✅ Plan → ⏳ Write
|
|
75
|
+
|
|
76
|
+
# 3-8 seconds: Code generation
|
|
77
|
+
cognix> /write --file clock.py
|
|
78
|
+
✨ Writing implementation for: Brief: big bright green clock popup window bold digits
|
|
79
|
+
Target file: clock.py
|
|
80
|
+
Target language: python (from .py)
|
|
81
|
+
|
|
82
|
+
# 8-10 seconds: Beautiful neon green clock appears
|
|
83
|
+
Save generated code to clock.py? [y/N] y
|
|
84
|
+
✅ Code saved to: clock.py
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**What you just saw:**
|
|
88
|
+
1. 💾 **Workflow Restoration**: AI remembers your thinking process across sessions
|
|
89
|
+
2. ⚡ **Instant Code Generation**: From plan to working GUI in seconds
|
|
90
|
+
3. 🎨 **Beautiful Results**: Functional neon green digital clock with #00FF00 perfection
|
|
91
|
+
4. 🚀 **Complete Pipeline**: Think → Plan → Write → Deploy in one session
|
|
92
|
+
|
|
93
|
+
### Try It Yourself
|
|
94
|
+
```bash
|
|
95
|
+
# Step 1: Start your thinking
|
|
96
|
+
cognix> /think "Brief: bright green digital clock GUI"
|
|
97
|
+
|
|
98
|
+
# Step 2: Plan implementation
|
|
99
|
+
cognix> /plan
|
|
100
|
+
|
|
101
|
+
# Step 3: Generate code
|
|
102
|
+
cognix> /write --file my_clock.py
|
|
103
|
+
|
|
104
|
+
# Step 4: Exit and run
|
|
105
|
+
cognix> exit
|
|
106
|
+
python my_clock.py # → Beautiful clock appears!
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## 🚀 Quick Start
|
|
112
|
+
|
|
113
|
+
### Installation
|
|
114
|
+
**Recommended (isolated):**
|
|
115
|
+
```bash
|
|
116
|
+
pipx install cognix
|
|
117
|
+
```
|
|
118
|
+
**Alternative:**
|
|
119
|
+
```bash
|
|
120
|
+
pip install cognix
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Setup (2 minutes)
|
|
124
|
+
```bash
|
|
125
|
+
# 1. Get your API key from Anthropic or OpenAI
|
|
126
|
+
# https://console.anthropic.com/ or https://platform.openai.com/
|
|
127
|
+
|
|
128
|
+
# 2. Create .env file
|
|
129
|
+
echo "ANTHROPIC_API_KEY=your_api_key_here" > .env
|
|
130
|
+
echo "OPENAI_API_KEY=your_api_key_here" >> .env
|
|
131
|
+
|
|
132
|
+
# 3. Start Cognix
|
|
133
|
+
cognix
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Your First Workflow (30 seconds)
|
|
137
|
+
```bash
|
|
138
|
+
cognix> /think "Create a REST API for user authentication"
|
|
139
|
+
# 🤔 AI analyzes your requirements...
|
|
140
|
+
|
|
141
|
+
cognix> /plan
|
|
142
|
+
# 📋 AI creates detailed implementation plan...
|
|
143
|
+
|
|
144
|
+
cognix> /write --file auth_api.py
|
|
145
|
+
# ✍️ AI generates production-ready code...
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**That's it!** Your API is ready to use.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## 📋 Commands
|
|
153
|
+
|
|
154
|
+
### Core Workflow
|
|
155
|
+
| Command | Description | Example |
|
|
156
|
+
|---------|-------------|---------|
|
|
157
|
+
| `/think "<goal>"` | AI analyzes your problem | `/think "API rate limiting"` |
|
|
158
|
+
| `/plan` | Creates implementation strategy | `/plan` |
|
|
159
|
+
| `/write [--file path]` | Generates production code | `/write --file api.py` |
|
|
160
|
+
|
|
161
|
+
### Help & Information
|
|
162
|
+
| Command | Description | Example |
|
|
163
|
+
|---------|-------------|---------|
|
|
164
|
+
| `/help` | Show all commands | `/help` |
|
|
165
|
+
| `/model` | Show current model & options | `/model` |
|
|
166
|
+
| `/workflow-status` | Check current progress | `/workflow-status` |
|
|
167
|
+
| `/status` | Show current config/model | `/status` |
|
|
168
|
+
| `/memory` | Inspect or export memory | `/memory export` |
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
### AI Model Management
|
|
173
|
+
| Command | Description | Example |
|
|
174
|
+
|---------|-------------|---------|
|
|
175
|
+
| `/model <name>` | Switch AI models instantly | `/model gpt-4o` |
|
|
176
|
+
|
|
177
|
+
### File Operations
|
|
178
|
+
| Command | Description | Example |
|
|
179
|
+
|---------|-------------|---------|
|
|
180
|
+
| `/edit <file>` | AI-assisted editing | `/edit src/main.py` |
|
|
181
|
+
| `/fix <file>` | Auto-fix bugs | `/fix api.py --function auth` |
|
|
182
|
+
| `/review [dir]` | Code analysis | `/review src/` |
|
|
183
|
+
| `/diff` | Show changes before applying | `/diff` |
|
|
184
|
+
| `/apply` | Apply generated patch safely | `/apply` |
|
|
185
|
+
| `/backup` | Manage backups/restore | `/backup restore` |
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
### Session Management
|
|
189
|
+
| Command | Description | Example |
|
|
190
|
+
|---------|-------------|---------|
|
|
191
|
+
| `/save-session <name>` | Save your work | `/save-session "auth-system"` |
|
|
192
|
+
| `/resume <name>` | Resume previous work | `/resume "auth-system"` |
|
|
193
|
+
| `/list_sessions` | List saved sessions | `/list_sessions` |
|
|
194
|
+
| `/session_info` | Show current session meta | `/session_info` |
|
|
195
|
+
| `/save_session <name>` | Save current session | `/save_session mywork` |
|
|
196
|
+
| `/resume <name>` | Restore a saved session | `/resume mywork` |
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
### Workflow Control
|
|
201
|
+
| Command | Description | Example |
|
|
202
|
+
|---------|-------------|---------|
|
|
203
|
+
| `/clear-workflow` | Start fresh | `/clear-workflow` |
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## 🌟 Key Features
|
|
208
|
+
|
|
209
|
+
### 🔄 **Multi-AI Powerhouse**
|
|
210
|
+
```bash
|
|
211
|
+
cognix> /think "Build a todo app"
|
|
212
|
+
# Using Claude-4: Detailed, enterprise-focused analysis
|
|
213
|
+
|
|
214
|
+
cognix> /model gpt-4o
|
|
215
|
+
✅ Switched to: gpt-4o
|
|
216
|
+
|
|
217
|
+
cognix> /think "Build a todo app"
|
|
218
|
+
# Using GPT-4o: Creative, modern, action-oriented approach
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Compare results instantly. Choose the best AI for each task.**
|
|
222
|
+
|
|
223
|
+
### 🧠 **True Session Persistence**
|
|
224
|
+
```bash
|
|
225
|
+
# Yesterday
|
|
226
|
+
cognix> /think "E-commerce platform architecture"
|
|
227
|
+
cognix> /plan
|
|
228
|
+
# Work interrupted...
|
|
229
|
+
|
|
230
|
+
# Today
|
|
231
|
+
cognix
|
|
232
|
+
🔄 Workflow state restored!
|
|
233
|
+
Goal: E-commerce platform architecture
|
|
234
|
+
Progress: ✅ Think → ✅ Plan → ⏳ Write
|
|
235
|
+
|
|
236
|
+
cognix> /write --file platform.py
|
|
237
|
+
# Continue exactly where you left off!
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### ⚡ **Lightning-Fast Development**
|
|
241
|
+
```bash
|
|
242
|
+
# Generate production-ready GUI apps in seconds
|
|
243
|
+
cognix> /think "Brief: neon green clock GUI"
|
|
244
|
+
cognix> /plan
|
|
245
|
+
cognix> /write --file clock.py
|
|
246
|
+
# → Beautiful tkinter app with #00FF00 fluorescent green digits!
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
**Perfect for rapid prototyping and instant visual results.**
|
|
250
|
+
|
|
251
|
+
### ⚡ **Intelligent Context Awareness**
|
|
252
|
+
- 📁 **Auto-scans** your project structure
|
|
253
|
+
- 🧠 **Remembers** all previous conversations
|
|
254
|
+
- 🎯 **Adapts** suggestions to your codebase
|
|
255
|
+
- 🔄 **Maintains** context across sessions
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## 💡 Real Usage Examples
|
|
260
|
+
|
|
261
|
+
### **Scenario 1: Feature Development**
|
|
262
|
+
```bash
|
|
263
|
+
cognix> /think "Add OAuth2 authentication to my Express.js API"
|
|
264
|
+
|
|
265
|
+
💭 Analysis Result:
|
|
266
|
+
**1) What needs to be built:** OAuth2 flow with JWT tokens, middleware for route protection,
|
|
267
|
+
and integration with popular providers (Google, GitHub, etc.)
|
|
268
|
+
**2) Key challenges:** Token validation, refresh logic, and secure session management
|
|
269
|
+
**3) Success approach:** Use passport.js ecosystem, implement proper error handling,
|
|
270
|
+
and add comprehensive testing for auth flows
|
|
271
|
+
|
|
272
|
+
cognix> /plan
|
|
273
|
+
|
|
274
|
+
📋 Implementation Plan:
|
|
275
|
+
- Setup & core logic: Install passport, passport-jwt, configure strategies for Google/GitHub OAuth2...
|
|
276
|
+
- Security implementation: JWT signing/validation, refresh token rotation, rate limiting...
|
|
277
|
+
- Testing & deployment: Unit tests for auth middleware, integration tests for OAuth flows...
|
|
278
|
+
|
|
279
|
+
cognix> /write --file auth/oauth.js
|
|
280
|
+
# Generates complete OAuth2 implementation
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### **Scenario 2: AI Model Comparison**
|
|
284
|
+
```bash
|
|
285
|
+
# Claude-4 approach (detailed, enterprise-focused)
|
|
286
|
+
cognix> /think "Database caching strategy"
|
|
287
|
+
→ Comprehensive analysis with Redis, Memcached comparison,
|
|
288
|
+
enterprise concerns, compliance considerations
|
|
289
|
+
|
|
290
|
+
# Switch to GPT-4o for creative alternatives
|
|
291
|
+
cognix> /model gpt-4o
|
|
292
|
+
cognix> /think "Database caching strategy"
|
|
293
|
+
→ Modern approach with edge caching, CDN integration,
|
|
294
|
+
serverless caching solutions
|
|
295
|
+
|
|
296
|
+
# Choose the best elements from both!
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### **Scenario 3: Session Restoration**
|
|
300
|
+
```bash
|
|
301
|
+
# After weekend break
|
|
302
|
+
cognix
|
|
303
|
+
📋 Previous session found!
|
|
304
|
+
Last updated: 2025-08-09T18:42:57
|
|
305
|
+
Entries: 15
|
|
306
|
+
Model: claude-sonnet-4-20250514
|
|
307
|
+
|
|
308
|
+
Would you like to restore the previous session? [y/N]: y
|
|
309
|
+
✅ Session restored successfully!
|
|
310
|
+
🔄 Workflow state restored!
|
|
311
|
+
Goal: Microservices architecture design
|
|
312
|
+
Progress: ✅ Think → ✅ Plan → ⏳ Write
|
|
313
|
+
|
|
314
|
+
# Continue immediately where you left off
|
|
315
|
+
cognix> /write --file services/user-service.py
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### **Scenario 4: Rapid GUI Prototyping**
|
|
319
|
+
```bash
|
|
320
|
+
# 12-second workflow for visual applications
|
|
321
|
+
cognix> /think "Brief: desktop calculator with dark theme"
|
|
322
|
+
cognix> /plan
|
|
323
|
+
cognix> /write --file calculator.py
|
|
324
|
+
|
|
325
|
+
# Result: Complete GUI calculator ready to use
|
|
326
|
+
python calculator.py # → Professional calculator app launches
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## 🎯 Supported AI Models
|
|
332
|
+
|
|
333
|
+
### **Claude 4 Series** (Anthropic)
|
|
334
|
+
- `claude-opus-4-20250514` - Most capable, complex reasoning
|
|
335
|
+
- `claude-sonnet-4-20250514` - Balanced performance & speed
|
|
336
|
+
|
|
337
|
+
### **GPT-4o Series** (OpenAI)
|
|
338
|
+
- `gpt-4o` - Latest model, highly creative
|
|
339
|
+
- `gpt-4o-mini` - Fast responses, cost-effective
|
|
340
|
+
|
|
341
|
+
### **Legacy Support**
|
|
342
|
+
- `claude-3-5-sonnet-20241022`
|
|
343
|
+
- `claude-3-7-sonnet-20250219`
|
|
344
|
+
|
|
345
|
+
**Switch between any model instantly:** `/model gpt-4o`
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
## ⚙️ Configuration & Customization
|
|
350
|
+
|
|
351
|
+
## 📁 Data Storage & Privacy
|
|
352
|
+
|
|
353
|
+
Cognix stores local data under your home directory:
|
|
354
|
+
|
|
355
|
+
- `~/.cognix/config.json` — user configuration
|
|
356
|
+
- `~/.cognix/sessions/` — saved sessions & autosave
|
|
357
|
+
- `~/.cognix/memory/memory.json` — long‑term memory
|
|
358
|
+
|
|
359
|
+
> All files are local to your machine. You can delete them anytime.
|
|
360
|
+
|
|
361
|
+
### Default Config (`~/.cognix/config.json`)
|
|
362
|
+
```json
|
|
363
|
+
{
|
|
364
|
+
"model": "claude-sonnet-4-20250514",
|
|
365
|
+
"temperature": 0.7,
|
|
366
|
+
"max_tokens": 4000,
|
|
367
|
+
"auto_backup": true,
|
|
368
|
+
"stream_responses": true,
|
|
369
|
+
"typewriter_effect": false
|
|
370
|
+
}
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
### Environment Variables
|
|
374
|
+
```bash
|
|
375
|
+
# API Keys (Required)
|
|
376
|
+
ANTHROPIC_API_KEY=your_anthropic_key
|
|
377
|
+
OPENAI_API_KEY=your_openai_key
|
|
378
|
+
|
|
379
|
+
# Optional settings
|
|
380
|
+
COGNIX_DEBUG=true
|
|
381
|
+
DEFAULT_MODEL=gpt-4o
|
|
382
|
+
COGNIX_AUTO_SAVE=true
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### System Requirements
|
|
386
|
+
- **Python**: 3.8 or higher
|
|
387
|
+
- **OS**: Windows 10+, macOS 10.15+, Linux
|
|
388
|
+
- **Memory**: 512MB minimum recommended
|
|
389
|
+
- **Internet**: Required for API connections
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
## 🏆 Why Choose Cognix?
|
|
394
|
+
|
|
395
|
+
### **vs. GitHub Copilot**
|
|
396
|
+
| Feature | Cognix | Copilot |
|
|
397
|
+
|---------|--------|---------|
|
|
398
|
+
| Multi-AI Support | ✅ GPT-4o + Claude-4 | ❌ OpenAI only |
|
|
399
|
+
| Session Persistence | ✅ Full project memory | ❌ No memory |
|
|
400
|
+
| Workflow Structure | ✅ Think→Plan→Write | ❌ Code completion only |
|
|
401
|
+
| CLI Integration | ✅ Native terminal | ❌ Editor-dependent |
|
|
402
|
+
|
|
403
|
+
### **vs. ChatGPT/Claude Web**
|
|
404
|
+
| Feature | Cognix | Web Interfaces |
|
|
405
|
+
|---------|--------|----------------|
|
|
406
|
+
| Development Integration | ✅ Direct file operations | ❌ Copy-paste workflow |
|
|
407
|
+
| Project Context | ✅ Full codebase awareness | ❌ Limited context |
|
|
408
|
+
| AI Model Switching | ✅ Instant switching | ❌ Separate applications |
|
|
409
|
+
| Session Management | ✅ Auto-save everything | ❌ Manual management |
|
|
410
|
+
|
|
411
|
+
### **vs. Other AI Coding Tools**
|
|
412
|
+
- 🧠 **Memory Persistence**: Only Cognix remembers everything across sessions
|
|
413
|
+
- 🔄 **Multi-AI**: Compare approaches from different models instantly
|
|
414
|
+
- ⚡ **Structured Workflow**: Think→Plan→Write methodology
|
|
415
|
+
- 🎯 **State Restoration**: Resume work exactly where you left off
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
## 🚀 Project-Specific Examples
|
|
420
|
+
|
|
421
|
+
### **Web Development**
|
|
422
|
+
```bash
|
|
423
|
+
cognix> /think "Full-stack blog platform with Next.js"
|
|
424
|
+
cognix> /plan
|
|
425
|
+
cognix> /write --file blog-platform.js
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
### **Data Science**
|
|
429
|
+
```bash
|
|
430
|
+
cognix> /think "Analyze customer churn with machine learning"
|
|
431
|
+
cognix> /plan
|
|
432
|
+
cognix> /write --file churn_analysis.py
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
### **DevOps**
|
|
436
|
+
```bash
|
|
437
|
+
cognix> /think "Docker containerization for my Python app"
|
|
438
|
+
cognix> /plan
|
|
439
|
+
cognix> /write --file Dockerfile
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
### **Mobile Development**
|
|
443
|
+
```bash
|
|
444
|
+
cognix> /think "React Native app with offline sync"
|
|
445
|
+
cognix> /plan
|
|
446
|
+
cognix> /write --file OfflineSync.js
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
---
|
|
450
|
+
|
|
451
|
+
## 🛠️ Advanced Features
|
|
452
|
+
|
|
453
|
+
### **Constraint Detection**
|
|
454
|
+
```bash
|
|
455
|
+
cognix> /think "Todo app - brief"
|
|
456
|
+
🎯 Detected constraints: brief format
|
|
457
|
+
💭 Analysis Result:
|
|
458
|
+
**1) What needs to be built:** Basic CRUD operations...
|
|
459
|
+
**2) Key challenges:** Data persistence and user experience...
|
|
460
|
+
**3) Success approach:** Start with MVP featuring essential functions...
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
### **Intelligent File Operations**
|
|
464
|
+
```bash
|
|
465
|
+
# Edit with AI assistance
|
|
466
|
+
cognix> /edit src/api.py
|
|
467
|
+
📝 Editing: src/api.py
|
|
468
|
+
What changes would you like to make? Add rate limiting
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
🤖 Generating suggestions...
|
|
472
|
+
💡 Suggestion: I'll add Express rate limiting middleware...
|
|
473
|
+
|
|
474
|
+
# Auto-fix specific functions
|
|
475
|
+
cognix> /fix utils.py --function calculate_total
|
|
476
|
+
🔧 Analyzing function: calculate_total
|
|
477
|
+
✅ Fixed: Added null checking and proper error handling
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
### **Project-Aware Conversations**
|
|
481
|
+
```bash
|
|
482
|
+
cognix> How can I improve the performance of my React components?
|
|
483
|
+
|
|
484
|
+
# AI automatically analyzes your React project structure
|
|
485
|
+
🧠 Analyzing your React project...
|
|
486
|
+
📁 Found: 15 components, 3 hooks, 2 contexts
|
|
487
|
+
|
|
488
|
+
💡 Specific recommendations for your codebase:
|
|
489
|
+
1. UserProfile.jsx: Consider React.memo for expensive renders
|
|
490
|
+
2. DataTable.jsx: Implement virtualization for large datasets
|
|
491
|
+
3. Global state: Your Redux store could benefit from RTK Query
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
---
|
|
495
|
+
|
|
496
|
+
## 🤝 Contributing
|
|
497
|
+
|
|
498
|
+
We welcome contributions! Here's how to get started:
|
|
499
|
+
|
|
500
|
+
### **Development Setup**
|
|
501
|
+
```bash
|
|
502
|
+
git clone https://github.com/cognix-dev/cognix.git
|
|
503
|
+
cd cognix
|
|
504
|
+
pip install -e ".[dev]"
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
### **Running Tests**
|
|
508
|
+
```bash
|
|
509
|
+
pytest tests/
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
### **Code Style**
|
|
513
|
+
```bash
|
|
514
|
+
black cognix/
|
|
515
|
+
flake8 cognix/
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
### **Contribution Guidelines**
|
|
519
|
+
- 🐛 **Bug Reports**: [GitHub Issues](https://github.com/cognix-dev/cognix/issues)
|
|
520
|
+
- 💡 **Feature Proposals**: [GitHub Discussions](https://github.com/cognix-dev/cognix/discussions)
|
|
521
|
+
- 🔀 **Pull Requests**: [Contributing Guide](CONTRIBUTING.md)
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
## 🧰 Troubleshooting
|
|
526
|
+
|
|
527
|
+
- **No LLM providers available** → Set `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` in your `.env`, then restart Cognix.
|
|
528
|
+
- **Patch apply failed** → Restore the last backup with `/backup restore`.
|
|
529
|
+
|
|
530
|
+
## 📄 License
|
|
531
|
+
|
|
532
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
533
|
+
|
|
534
|
+
---
|
|
535
|
+
|
|
536
|
+
## 🌟 Roadmap
|
|
537
|
+
|
|
538
|
+
### **v0.2.0** - Memory Management & Code Enhancement
|
|
539
|
+
- [ ] 📝 Individual memory entry deletion
|
|
540
|
+
- [ ] 🗂️ Automatic memory archiving
|
|
541
|
+
- [ ] 📊 Memory size management and cleanup
|
|
542
|
+
- [ ] 🎨 AI code enhancement (/refactor, /lint)
|
|
543
|
+
- [ ] ⚡ Improved streaming output
|
|
544
|
+
|
|
545
|
+
### **v0.3.0** - Advanced Development Features
|
|
546
|
+
- [ ] 🎯 Target file/function specification (@filename, #function)
|
|
547
|
+
- [ ] 🏃 File execution capabilities (/run)
|
|
548
|
+
- [ ] 📱 Browser-based GUI (beta)
|
|
549
|
+
- [ ] 🔍 Advanced code analysis features
|
|
550
|
+
|
|
551
|
+
### **v0.4.0** - Team Collaboration
|
|
552
|
+
- [ ] 👥 Shared sessions between team members
|
|
553
|
+
- [ ] 📋 Code review workflows
|
|
554
|
+
- [ ] 🔗 Basic GitHub/GitLab integration
|
|
555
|
+
|
|
556
|
+
### **v0.5.0** - Enterprise
|
|
557
|
+
- [ ] 🏢 Self-hosted deployment options
|
|
558
|
+
- [ ] 🔒 Advanced security features
|
|
559
|
+
- [ ] 📊 Usage analytics and metrics
|
|
560
|
+
|
|
561
|
+
---
|
|
562
|
+
|
|
563
|
+
## 💬 Support
|
|
564
|
+
|
|
565
|
+
### **Need Help?**
|
|
566
|
+
- 🐛 **Bug Reports**: [GitHub Issues](https://github.com/cognix-dev/cognix/issues)
|
|
567
|
+
- 💡 **Feature Requests**: [GitHub Discussions](https://github.com/cognix-dev/cognix/discussions)
|
|
568
|
+
|
|
569
|
+
### **Stay Updated**
|
|
570
|
+
- 🐦 **X**: [@Cognix_dev](https://x.com/cognix_dev)
|
|
571
|
+
---
|
|
572
|
+
|
|
573
|
+
<div align="center">
|
|
574
|
+
|
|
575
|
+
**🧠 Cognix - Where AI meets intelligent development workflows**
|
|
576
|
+
|
|
577
|
+
Made with ❤️ by [Individual Developer](https://github.com/cognix-dev)
|
|
578
|
+
|
|
579
|
+
[⭐ Star on GitHub](https://github.com/cognix-dev/cognix) • [🚀 Get Started](#-quick-start)
|
|
580
|
+
|
|
581
|
+
---
|