Skip to content

Commit b8b2e05

Browse files
committed
Merge origin/main into issue-244
2 parents 4ed3108 + 5a1755c commit b8b2e05

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+9164
-1384
lines changed

AGENTS.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Cortex Linux - AI Agent Guidelines
2+
3+
## Project Overview
4+
5+
Cortex Linux is an AI-native package manager for Debian/Ubuntu that understands natural language commands. It wraps `apt` with LLM intelligence to parse requests, detect hardware, resolve dependencies, and execute installations safely.
6+
7+
**Repository**: https://github.com/cortexlinux/cortex
8+
**License**: Apache 2.0
9+
**Primary Language**: Python 3.10+
10+
11+
## Quick Start
12+
13+
```bash
14+
# Clone and setup
15+
git clone https://github.com/cortexlinux/cortex.git
16+
cd cortex
17+
python3 -m venv venv
18+
source venv/bin/activate
19+
pip install -e .
20+
21+
# Configure API key
22+
echo 'ANTHROPIC_API_KEY=your-key-here' > .env
23+
24+
# Verify installation
25+
cortex install nginx --dry-run
26+
```
27+
28+
## Development Environment
29+
30+
### Prerequisites
31+
- Python 3.10 or higher
32+
- Ubuntu 22.04+ or Debian 12+
33+
- Virtual environment (required)
34+
- Anthropic API key or OpenAI API key
35+
36+
### Setup Commands
37+
```bash
38+
python3 -m venv venv
39+
source venv/bin/activate
40+
pip install -e .
41+
pip install -r requirements-dev.txt
42+
pytest tests/ -v
43+
```
44+
45+
## Testing Instructions
46+
47+
```bash
48+
# Run all tests
49+
pytest tests/ -v
50+
51+
# Test dry-run (safe)
52+
cortex install nginx --dry-run
53+
54+
# Test hardware detection
55+
cortex-detect-hardware
56+
```
57+
58+
## Code Standards
59+
60+
- Follow PEP 8
61+
- Type hints required
62+
- Docstrings for public APIs
63+
- >80% test coverage for PRs
64+
65+
## Safety Requirements
66+
67+
1. Dry-run by default for all installations
68+
2. No silent sudo
69+
3. Firejail sandboxing required
70+
4. Audit logging to ~/.cortex/history.db
71+
72+
## PR Guidelines
73+
74+
- Title format: [component] Description
75+
- All tests must pass
76+
- Documentation required for new features
77+
78+
## Contact
79+
80+
- Discord: https://discord.gg/uCqHvxjU83
81+

README_MCP.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Cortex Linux MCP Server
2+
3+
Connect any MCP-compatible AI (Claude, ChatGPT, Cursor, VS Code) to Cortex Linux.
4+
5+
## Install
6+
7+
```bash
8+
pip install cortex-mcp-server
9+
```
10+
11+
## Configure Claude Desktop
12+
13+
Add to `~/.config/claude/claude_desktop_config.json`:
14+
15+
```json
16+
{
17+
"mcpServers": {
18+
"cortex-linux": {
19+
"command": "cortex-mcp-server"
20+
}
21+
}
22+
}
23+
```
24+
25+
## Available Tools
26+
27+
| Tool | Description |
28+
|------|-------------|
29+
| install_package | Install packages via natural language |
30+
| search_packages | Search package database |
31+
| get_history | View installation history |
32+
| rollback | Rollback previous installation |
33+
| detect_hardware | Detect GPU/CPU |
34+
| system_status | Get system status |
35+
36+
## Safety
37+
38+
- Dry-run by default
39+
- Explicit confirmation required for changes
40+
- Firejail sandboxing
41+
- Full audit logging
42+
43+
## Links
44+
45+
- [MCP Specification](https://modelcontextprotocol.io)
46+
- [AAIF](https://aaif.io)
47+
- [Discord](https://discord.gg/uCqHvxjU83)

0 commit comments

Comments
 (0)