AI-Assisted Software Engineering (AASWE) - Rich codebase context for IDE LLMs
npm install @aaswe/codebase-ai
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).
bash
Install and use
npm install -g @aaswe/codebase-ai
cd your-project
codebase-ai full-start
`$3
`bash
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
` Visual Overview
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
Features
$3
- 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$3
- 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$3
- 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$3
- 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 System Requirements
$3
- Node.js: 18.0.0+
- Memory: 512MB RAM
- Disk: 100MB free space$3
- 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 Installation & Setup
$3
`bash
npm install -g @aaswe/codebase-ai
`$3
`bash
Navigate to your project
cd your-projectInitialize AASWE
codebase-ai initFor full system mode
codebase-ai init --mode full
`$3
AASWE creates these files:
- aaswe.config.js - Main configuration
- .env.aaswe - Environment variables
- .aaswe/ - Analysis cache and knowledge files⚠️ Important: --build Flag Usage
$3
The --build flag is only for developers working with source code:`bash
Source installation (cloned repository)
git clone https://github.com/AssahBismarkabah/AIDe.git
cd AIDe
node dist/cli/index.js full-start --build
`$3
Never use --build with npm installations:`bash
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
`Prerequisites for Full System Mode
Before running
codebase-ai full-start, ensure you have:$3
`bash
Check if you have Docker Compose V2
docker compose versionShould show: Docker Compose version v2.x.x
If you see "command not found" or v1.x.x, please upgrade
`$3
`bash
Check Docker version (20.10+ recommended)
docker --version
`> ⚠️ Important: The
full-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.$3
`bash
This should work without errors:
docker compose --helpIf 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.
Usage
$3
#### Start the System
`bash
Context-only mode (recommended)
codebase-ai startFull system mode
codebase-ai start --mode full --port 8000Complete system with all containers (Neo4j + MCP + Redis)
codebase-ai full-start
With debug logging
codebase-ai start --debug
`#### MCP Server Commands
`bash
Start MCP server with stdio transport (for RooCode/Cline)
codebase-ai mcp --transport stdioStart MCP server with WebSocket transport (for VS Code/Cursor)
codebase-ai mcp --transport websocket --port 3001Start both transports (maximum compatibility)
codebase-ai mcp --transport both --port 3001With Neo4j integration
codebase-ai mcp --transport both --neo4j-uri bolt://localhost:7687 --neo4j-username neo4j --neo4j-password aaswe-passwordWith debug logging
codebase-ai mcp --transport stdio --debug
`#### Analyze Your Project
`bash
Basic analysis
codebase-ai analyzeCustom output directory
codebase-ai analyze --output ./knowledgeSpecific languages
codebase-ai analyze --languages typescript,python
`#### Check Status
`bash
Check if server is running
codebase-ai statusCheck specific port
codebase-ai status --port 3001
`#### Docker Commands
`bash
Start with Docker
codebase-ai docker up -dView logs
codebase-ai docker logs -fStop services
codebase-ai docker down
`$3
AASWE provides dual-transport MCP support for maximum IDE compatibility:
#### RooCode / Cline (Stdio Transport)
1. Start AASWE System (in your project directory):
`bash
Option 1: Full system with containers (npm installation)
codebase-ai full-start --project-path ./your-projectOption 1b: Full system with containers (source installation only)
node dist/cli/index.js full-start --project-path ./your-project --buildOption 2: Standalone MCP server (TTL files only)
codebase-ai mcp --transport stdio --ttl-directories ./your-project
`2. Add to RooCode/Cline MCP Settings:
For NPM Installation (Recommended):
`json
{
"mcpServers": {
"aaswe": {
"command": "codebase-ai",
"args": ["mcp", "--transport", "stdio", "--ttl-directories", "/path/to/your/project"]
}
}
}
`For Source Installation (Developers):
`json
{
"mcpServers": {
"aaswe": {
"command": "node",
"args": [
"/path/to/aaswe/dist/cli/index.js",
"mcp",
"--transport",
"stdio",
"--ttl-directories",
"/path/to/your/project"
]
}
}
}
`#### VS Code with Continue (WebSocket)
1. Install the Continue extension
2. Start AASWE WebSocket Server:
`bash
node dist/cli/index.js mcp --transport websocket --port 3001
`
3. Add to your Continue config.json:
`json
{
"mcpServers": {
"aaswe": {
"command": "codebase-ai",
"args": ["mcp", "--transport", "websocket", "--port", "3001"],
"env": {}
}
}
}
`#### Cursor (WebSocket)
1. Start AASWE WebSocket Server:
`bash
node dist/cli/index.js mcp --transport websocket --port 3001
`
2. Go to Settings → Features → Model Context Protocol
3. Add server:
- Name: AASWE
- Command: codebase-ai
- Args: ["mcp", "--transport", "websocket", "--port", "3001"]#### Both Transports (Maximum Compatibility)
`bash
Start both WebSocket and Stdio transports
node dist/cli/index.js mcp --transport both --port 3001
`#### Other IDEs
- WebSocket: Connect to
ws://localhost:3001
- Stdio: Use command-line MCP client with stdio transport Project Structure
`
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
└── ...
` Configuration
$3
`javascript
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
}
};
`$3
`bash
API Keys (optional)
OPENAI_API_KEY=your_key_here
ANTHROPIC_API_KEY=your_key_hereNeo4j (full mode only)
NEO4J_URI=bolt://localhost:7687
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=aaswe-passwordAnalysis settings
ANALYSIS_DEPTH=comprehensive
PRESERVE_BUSINESS_CONTEXT=true
`🔧 Advanced Usage
$3
`javascript
// aaswe.config.js
module.exports = {
analysis: {
includePatterns: ['/.ts', '/.js', '*/.py'],
excludePatterns: ['/test/', '/node_modules/'],
languages: ['typescript', 'javascript', 'python'],
depth: 'comprehensive'
}
};
`$3
`turtle
Add business context to generated TTL files
@prefix biz: .aide:UserService a aide:Class ;
biz:businessDomain "User Management" ;
biz:businessRule "Users must have unique email addresses" ;
biz:businessProcess "User registration and authentication" .
`$3
`yaml
docker-compose.override.yml
version: '3.8'
services:
aaswe-server:
environment:
- CUSTOM_SETTING=value
volumes:
- ./custom-config:/app/config
` Monitoring & Health Checks
$3
`bash
curl http://localhost:3001/health
`$3
`bash
Check all services
codebase-ai statusDocker services
codebase-ai docker logs aaswe-server
`$3
- Web Interface: http://localhost:3000
- Neo4j Browser: http://localhost:7474
- Metrics Endpoint: http://localhost:9090/metrics Troubleshooting
$3
#### "Command not found: aaswe"
`bash
Reinstall globally
npm uninstall -g @aaswe/codebase-ai
npm install -g @aaswe/codebase-aiOr use npx
npx @aaswe/codebase-ai --version
`#### "Port already in use"
`bash
Use different port
aaswe start --port 3002Or kill existing process
lsof -ti:3001 | xargs kill -9
`#### "TTL files not found"
`bash
Re-analyze project
codebase-ai analyze --output ./knowledgeCheck permissions
ls -la ./knowledge/
`#### "Neo4j connection failed"
`bash
Check Neo4j status
docker-compose ps neo4jRestart Neo4j
docker-compose restart neo4jStart full system properly (npm installation)
codebase-ai full-startOr for source installation
node dist/cli/index.js full-start --build
`
#### "Docker Compose Not Available"
If you see unknown shorthand flag: 'd' in -d or similar Docker errors:`bash
Check if Docker Compose is installed
docker compose --helpIf 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-pluginOption 3: Manual installation
Follow: https://docs.docker.com/compose/install/
Verify installation
docker compose version
`#### "Docker Compose V1 Compatibility"
`bash
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
`
#### "MCP Server Connection Issues"
`bash
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 stdioCheck if MCP server is running
codebase-ai status --port 3001Restart with debug logging
codebase-ai mcp --transport both --debugFor RooCode: Ensure correct path in MCP settings
ls -la /path/to/your/project/dist/cli/index.js
`#### "TTL files showing zero counts"
`bash
This was a known bug - now resolved!
Re-analyze to get real entity counts
codebase-ai analyze --output ./knowledgeCheck if TTL files contain real data
grep -E "(classCount|functionCount|methodCount)" ./knowledge/*.ttl
`$3
#### Large Projects
`bash
Exclude unnecessary files
codebase-ai analyze --exclude "/node_modules/,/dist/"Use incremental analysis
codebase-ai analyze --incrementalLimit analysis depth
codebase-ai analyze --depth basic
`#### Memory Issues
`bash
Increase Node.js memory
export NODE_OPTIONS="--max-old-space-size=4096"
codebase-ai start
` Architecture
$3
#### Context-Only Mode
``#### Full System Mode
``$3
- Backend: Node.js, TypeScript
- Knowledge: RDF/TTL, SPARQL
- Database: Neo4j (optional)
- Protocol: Model Context Protocol (MCP)
- Deployment: Docker, Docker Compose Contributing
We welcome contributions! Please see our Contributing Guide for details.
$3
`bash
Clone repository
git clone https://github.com/AssahBismarkabah/AIDe.git
cd AIDeInstall dependencies
npm installBuild project
npm run buildRun tests
npm testStart development server
npm run dev
`$3
`bash
All tests
npm testWith coverage
npm run test:coverageWatch 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.