Rich codebase context for IDE LLMs through automatic analysis and TTL knowledge generation.
AASWE transforms your codebase into structured semantic knowledge (RDF/TTL format) that enhances your IDE's AI capabilities. Get better code suggestions, more accurate refactoring, and deeper insights by providing your LLM with comprehensive project context through the Model Context Protocol (MCP).
# Install and use
npm install -g @aaswe/codebase-ai
cd your-project
codebase-ai full-start
# Clone and run from source
git clone https://github.com/AssahBismarkabah/AIDe.git
cd AIDe
npm install && npm run build
node dist/cli/index.js full-start --build
Live Knowledge Graph Visualization - AASWE automatically generates comprehensive Neo4j graph databases showing your codebase structure. The example above shows a java codebase:
- ** Module Nodes**: Each directory/module represented as connected nodes
- ** Dependency Relationships**: Clear visualization of how modules depend on each other
- ** Entity Metrics**: Real class, method, and function counts displayed on nodes
- ** Architecture Patterns**: Visual detection of architectural layers and patterns
- Interactive Exploration: Click and explore your codebase structure in real-time
- TTL Files: Structured semantic knowledge in RDF/TTL format for each module
- Real Entity Counts: Actual class, function, and dependency statistics
- Module-Level Context: Comprehensive analysis of code structure and relationships
- Business Context: Preserves developer annotations and domain knowledge
- 12 Languages: TypeScript, JavaScript, Python, Java, Go, Rust, C++, C#, PHP, Ruby, Kotlin, Scala, Swift
- Recursive Discovery: Finds and analyzes all source files throughout project tree
- Concrete Information: Real class names, method signatures, dependencies, imports
- Architectural Patterns: Detects common design patterns and code structures
- Model Context Protocol: Works with any MCP-compatible IDE
- Dual Transport: WebSocket and Stdio support for maximum compatibility
- RooCode/Cline: Stdio transport for CLI-based IDEs
- VS Code/Cursor: WebSocket transport for GUI IDEs
- Real-time Updates: File watching and automatic context refresh
- Context-Only Mode: TTL files only (recommended for most users)
- Full System Mode: Neo4j + MCP Server + Redis for advanced features
- Docker Compose: Complete containerized deployment
- Local Installation: NPM package for easy setup
- Node.js: 18.0.0+
- Memory: 512MB RAM
- Disk: 100MB free space
- Node.js: 20.0.0+
- Memory: 2GB RAM
- Disk: 1GB free space
- Docker: 20.0.0+ with Docker Compose V2 (for full system)
- Check with:
docker compose version
- Should show:
Docker Compose version v2.x.x
- Check with:
npm install -g @aaswe/codebase-ai
# Navigate to your project
cd your-project
# Initialize AASWE
codebase-ai init
# For full system mode
codebase-ai init --mode full
AASWE creates these files:
aaswe.config.js
- Main configuration.env.aaswe
- Environment variables.aaswe/
- Analysis cache and knowledge files
The --build
flag is only for developers working with source code:
# Source installation (cloned repository)
git clone https://github.com/AssahBismarkabah/AIDe.git
cd AIDe
node dist/cli/index.js full-start --build
Never use --build
with npm installations:
# This will fail with npm installations
npm install -g @aaswe/codebase-ai
codebase-ai full-start --build # β Will fail!
# Use without --build for npm installations
npm install -g @aaswe/codebase-ai
codebase-ai full-start # β Uses pre-built images
Before running codebase-ai full-start
, ensure you have:
# Check if you have Docker Compose V2
docker compose version
# Should show: Docker Compose version v2.x.x
# If you see "command not found" or v1.x.x, please upgrade
# Check Docker version (20.10+ recommended)
docker --version
β οΈ Important: Thefull-start --build
command requires Docker Compose V2 (command:docker compose
with space). Docker Compose V1 (docker-compose
with hyphen) cannot access the NPM package's docker-compose.yml file and will not work with the global installation.
# This should work without errors:
docker compose --help
# If you see "unknown command" or "command not found":
# You need to install Docker Compose V2 first!
Tip: The CLI will automatically check for Docker Compose availability and provide installation instructions if missing.
# Context-only mode (recommended)
codebase-ai start
# Full system mode
codebase-ai start --mode full --port 8000
# Complete system with all containers (Neo4j + MCP + Redis)
codebase-ai full-start
# With debug logging
codebase-ai start --debug
# Start MCP server with stdio transport (for RooCode/Cline)
codebase-ai mcp --transport stdio
# Start MCP server with WebSocket transport (for VS Code/Cursor)
codebase-ai mcp --transport websocket --port 3001
# Start both transports (maximum compatibility)
codebase-ai mcp --transport both --port 3001
# With Neo4j integration
codebase-ai mcp --transport both --neo4j-uri bolt://localhost:7687 --neo4j-username neo4j --neo4j-password aaswe-password
# With debug logging
codebase-ai mcp --transport stdio --debug
# Basic analysis
codebase-ai analyze
# Custom output directory
codebase-ai analyze --output ./knowledge
# Specific languages
codebase-ai analyze --languages typescript,python
# Check if server is running
codebase-ai status
# Check specific port
codebase-ai status --port 3001
# Start with Docker
codebase-ai docker up -d
# View logs
codebase-ai docker logs -f
# Stop services
codebase-ai docker down
AASWE provides dual-transport MCP support for maximum IDE compatibility:
- Start AASWE System (in your project directory):
# Option 1: Full system with containers (npm installation)
codebase-ai full-start --project-path ./your-project
# Option 1b: Full system with containers (source installation only)
node dist/cli/index.js full-start --project-path ./your-project --build
# Option 2: Standalone MCP server (TTL files only)
codebase-ai mcp --transport stdio --ttl-directories ./your-project
- Add to RooCode/Cline MCP Settings:
For NPM Installation (Recommended):
{
"mcpServers": {
"aaswe": {
"command": "codebase-ai",
"args": ["mcp", "--transport", "stdio", "--ttl-directories", "/path/to/your/project"]
}
}
}
For Source Installation (Developers):
{
"mcpServers": {
"aaswe": {
"command": "node",
"args": [
"/path/to/aaswe/dist/cli/index.js",
"mcp",
"--transport",
"stdio",
"--ttl-directories",
"/path/to/your/project"
]
}
}
}
- Install the Continue extension
- Start AASWE WebSocket Server:
node dist/cli/index.js mcp --transport websocket --port 3001
- Add to your Continue
config.json
:
{
"mcpServers": {
"aaswe": {
"command": "codebase-ai",
"args": ["mcp", "--transport", "websocket", "--port", "3001"],
"env": {}
}
}
}
- Start AASWE WebSocket Server:
node dist/cli/index.js mcp --transport websocket --port 3001
- Go to Settings β Features β Model Context Protocol
- Add server:
- Name: AASWE
- Command:
codebase-ai
- Args:
["mcp", "--transport", "websocket", "--port", "3001"]
# Start both WebSocket and Stdio transports
node dist/cli/index.js mcp --transport both --port 3001
- WebSocket: Connect to
ws://localhost:3001
- Stdio: Use command-line MCP client with stdio transport
your-project/
βββ aaswe.config.js # AASWE configuration
βββ .env.aaswe # Environment variables
βββ .aaswe/ # AASWE data directory
β βββ knowledge/ # Generated TTL files
β βββ cache/ # Analysis cache
β βββ backups/ # Business context backups
βββ knowledge/ # Custom output directory
βββ src.module-knowledge.ttl
βββ services.module-knowledge.ttl
βββ ...
module.exports = {
mode: 'context-only', // or 'full'
server: {
port: 3001,
host: 'localhost'
},
context: {
maxTokens: 8000,
maxFiles: 10,
relevanceThreshold: 0.3
},
ttl: {
watchEnabled: true,
watchDebounce: 1000
}
};
# API Keys (optional)
OPENAI_API_KEY=your_key_here
ANTHROPIC_API_KEY=your_key_here
# Neo4j (full mode only)
NEO4J_URI=bolt://localhost:7687
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=aaswe-password
# Analysis settings
ANALYSIS_DEPTH=comprehensive
PRESERVE_BUSINESS_CONTEXT=true
// aaswe.config.js
module.exports = {
analysis: {
includePatterns: ['**/*.ts', '**/*.js', '**/*.py'],
excludePatterns: ['**/test/**', '**/node_modules/**'],
languages: ['typescript', 'javascript', 'python'],
depth: 'comprehensive'
}
};
# Add business context to generated TTL files
@prefix biz: <http://aaswe.org/business#> .
aide:UserService a aide:Class ;
biz:businessDomain "User Management" ;
biz:businessRule "Users must have unique email addresses" ;
biz:businessProcess "User registration and authentication" .
# docker-compose.override.yml
version: '3.8'
services:
aaswe-server:
environment:
- CUSTOM_SETTING=value
volumes:
- ./custom-config:/app/config
curl http://localhost:3001/health
# Check all services
codebase-ai status
# Docker services
codebase-ai docker logs aaswe-server
- Web Interface: http://localhost:3000
- Neo4j Browser: http://localhost:7474
- Metrics Endpoint: http://localhost:9090/metrics
# Reinstall globally
npm uninstall -g @aaswe/codebase-ai
npm install -g @aaswe/codebase-ai
# Or use npx
npx @aaswe/codebase-ai --version
# Use different port
aaswe start --port 3002
# Or kill existing process
lsof -ti:3001 | xargs kill -9
# Re-analyze project
codebase-ai analyze --output ./knowledge
# Check permissions
ls -la ./knowledge/
# Check Neo4j status
docker-compose ps neo4j
# Restart Neo4j
docker-compose restart neo4j
# Start full system properly (npm installation)
codebase-ai full-start
# Or for source installation
node dist/cli/index.js full-start --build
If you see unknown shorthand flag: 'd' in -d
or similar Docker errors:
# Check if Docker Compose is installed
docker compose --help
# If command not found, install Docker Compose V2:
# Option 1: Install Docker Desktop (includes Compose V2)
# Download from: https://docs.docker.com/desktop/
# Option 2: Install Compose plugin (Linux)
sudo apt-get update
sudo apt-get install docker-compose-plugin
# Option 3: Manual installation
# Follow: https://docs.docker.com/compose/install/
# Verify installation
docker compose version
# Check your Docker Compose version
docker compose version # V2 (preferred)
docker-compose --version # V1 (legacy)
# If you have V1 only, you have two options:
# Option 1: Upgrade to Docker Compose V2 (RECOMMENDED)
# Follow: https://docs.docker.com/compose/install/
# Option 2: Clone the repository and use manual commands
git clone https://github.com/AssahBismarkabah/AIDe.git
cd AIDe
docker-compose up -d --build neo4j redis
# Then in another terminal (from your project directory):
codebase-ai start --mode full
# Test MCP stdio connection
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}' | codebase-ai mcp --transport stdio
# Check if MCP server is running
codebase-ai status --port 3001
# Restart with debug logging
codebase-ai mcp --transport both --debug
# For RooCode: Ensure correct path in MCP settings
ls -la /path/to/your/project/dist/cli/index.js
# This was a known bug - now resolved!
# Re-analyze to get real entity counts
codebase-ai analyze --output ./knowledge
# Check if TTL files contain real data
grep -E "(classCount|functionCount|methodCount)" ./knowledge/*.ttl
# Exclude unnecessary files
codebase-ai analyze --exclude "**/node_modules/**,**/dist/**"
# Use incremental analysis
codebase-ai analyze --incremental
# Limit analysis depth
codebase-ai analyze --depth basic
# Increase Node.js memory
export NODE_OPTIONS="--max-old-space-size=4096"
codebase-ai start
- Backend: Node.js, TypeScript
- Knowledge: RDF/TTL, SPARQL
- Database: Neo4j (optional)
- Protocol: Model Context Protocol (MCP)
- Deployment: Docker, Docker Compose
We welcome contributions! Please see our Contributing Guide for details.
# Clone repository
git clone https://github.com/AssahBismarkabah/AIDe.git
cd AIDe
# Install dependencies
npm install
# Build project
npm run build
# Run tests
npm test
# Start development server
npm run dev
# All tests
npm test
# With coverage
npm run test:coverage
# Watch mode
npm run test:watch
- Installation Guide - Detailed setup instructions
- API Documentation - MCP server API reference
- Architecture Guide - System design and components
- Development Guide - Contributing and development setup
- GitHub: https://github.com/AssahBismarkabah/AIDe
- NPM Package: https://www.npmjs.com/package/@aaswe/codebase-ai
- Issues: https://github.com/AssahBismarkabah/AIDe/issues
- Discussions: https://github.com/AssahBismarkabah/AIDe/discussions
MIT License - see LICENSE file for details.
- Model Context Protocol: For the universal IDE integration standard
- Neo4j: For the powerful graph database
- RDF/SPARQL: For semantic web standards
- TypeScript: For type-safe development
- Docker: For containerization and easy deployment
Transform your codebase into intelligent context for better AI-assisted development.