Skip to content

Commit 744af5b

Browse files
committed
Revamped README.md: updated project description, enhanced capabilities section, and improved installation and usage instructions
1 parent 5726e05 commit 744af5b

1 file changed

Lines changed: 50 additions & 67 deletions

File tree

README.md

Lines changed: 50 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,86 @@
1-
# CodeShield 🛡️
1+
# CodeShield
22

3-
> **The Complete AI Coding Safety Net**
4-
> *AI code that works, matches your style, and remembers where you left off*
3+
An intelligent security layer for AI-generated code. CodeShield validates, formats, and secures code before it enters your production environment, acting as a firewall for your development workflow.
54

6-
[![Hackathon](https://img.shields.io/badge/AI%20Vibe-Hackathon%202026-purple)](https://devpost.com)
7-
[![Python](https://img.shields.io/badge/Python-3.10+-blue)](https://python.org)
8-
[![MCP](https://img.shields.io/badge/MCP-Compatible-green)](https://modelcontextprotocol.io)
5+
[View Demo](https://codeshield-five.vercel.app/)
96

10-
## The Problem
7+
## Capabilities
118

12-
AI coding assistants give you **90% correct code** that wastes your time:
9+
### TrustGate
10+
Validates generated code in an isolated sandbox environment. It detects potential security vulnerabilities, resource exhaustion, and malicious patterns through static analysis and runtime execution.
1311

14-
- ❌ Missing imports (`requests`, `json` not imported)
15-
- ❌ Wrong variable names (`userName` instead of `user_name`)
16-
- ❌ Forgets your codebase conventions
17-
- ❌ Syntax errors that look right
18-
- ❌ You lose context when switching tasks
12+
### StyleForge
13+
Analyzes your existing codebase to detect and enforce naming conventions. It automatically adapts new code to match your project's snake_case, camelCase, or PascalCase patterns.
1914

20-
## The Solution: 3 Pillars
15+
### ContextVault
16+
Persists your development state including open files, cursor positions, and notes. Allows for instant context restoration when switching between tasks.
2117

22-
| Pillar | What It Does |
23-
|--------|--------------|
24-
| 🔒 **TrustGate** | Verifies code before you see it |
25-
| 🎨 **StyleForge** | Enforces YOUR naming conventions |
26-
| 🧠 **ContextVault** | Saves/restores your coding context |
27-
28-
## Quick Start
18+
## Installation
2919

3020
```bash
31-
# Install
3221
pip install -e .
33-
34-
# Verify some code
35-
python -c "
36-
from codeshield.trustgate.checker import verify_code
37-
result = verify_code('''
38-
def fetch():
39-
return requests.get(url)
40-
''')
41-
print(f'Valid: {result.is_valid}')
42-
print(f'Issues: {[i.message for i in result.issues]}')
43-
print(f'Fixed: {result.fixed_code}')
44-
"
4522
```
4623

47-
## Features
48-
49-
### 🔒 TrustGate
24+
## Python API Usage
5025

26+
### Security Verification
5127
```python
5228
from codeshield.trustgate.checker import verify_code
53-
from codeshield.trustgate.sandbox import full_verification
5429

55-
# Quick check (static analysis)
56-
result = verify_code(code, auto_fix=True)
30+
code = """
31+
def fetch_data(url):
32+
return requests.get(url)
33+
"""
5734

58-
# Full check (static + sandbox execution)
59-
report = full_verification(code)
60-
print(f"Confidence: {report['confidence_score']:.0%}")
35+
# Detects missing imports and potential errors
36+
result = verify_code(code, auto_fix=True)
37+
print(result.fixed_code)
6138
```
6239

63-
**What it catches:**
64-
- Missing imports → Auto-adds them
65-
- Syntax errors → Reports exact line
66-
- Runtime errors → Catches in sandbox
67-
68-
### 🎨 StyleForge
69-
40+
### Style Enforcement
7041
```python
7142
from codeshield.styleforge.corrector import check_style
7243

73-
# Check code against your codebase conventions
74-
result = check_style(code, codebase_path="./src")
75-
76-
# Fixes: userName → user_name
77-
# Fixes: getUserData → get_user_data
44+
# Enforces project-specific conventions
45+
result = check_style(
46+
code="def GetUserData(): pass",
47+
codebase_path="./src"
48+
)
49+
# Output: def get_user_data(): pass
7850
```
7951

80-
### 🧠 ContextVault
81-
52+
### Context Management
8253
```python
8354
from codeshield.contextvault.capture import save_context
84-
from codeshield.contextvault.restore import restore_context
8555

86-
# Save where you are
8756
save_context(
88-
name="debugging-auth",
89-
files=["src/auth.py", "src/users.py"],
90-
notes="Working on login flow"
57+
name="auth-refactor",
58+
files=["src/auth.py", "tests/test_auth.py"],
59+
notes="fixing token expiration logic"
9160
)
61+
```
9262

93-
# Later, restore with AI briefing
94-
result = restore_context("debugging-auth")
95-
print(result["briefing"]) # "You were working on login flow..."
63+
## Model Context Protocol (MCP)
64+
65+
CodeShield exposes its functionality to AI assistants via MCP. Add the following configuration to your MCP settings file:
66+
67+
```json
68+
{
69+
"mcpServers": {
70+
"codeshield": {
71+
"command": "python",
72+
"args": ["-m", "codeshield.mcp.server"]
73+
}
74+
}
75+
}
9676
```
9777

98-
## MCP Integration
78+
## Development
9979

100-
CodeShield works as an MCP server with Claude, Cursor, etc:
80+
1. Clone the repository
81+
2. Install dependencies: `pip install -e .`
82+
3. Run tests: `pytest`
83+
4. Start frontend: `cd frontend && npm run dev`
10184

10285
```json
10386
{

0 commit comments

Comments
 (0)