Unified Configuration for AI Coding Assistants
Stop managing multiple AI configuration files. One source of truth for Claude Code, Cursor, GitHub Copilot, and more.
Are you tired of maintaining separate configuration files for every AI coding assistant?
your-project/
βββ CLAUDE.md # For Claude Code
βββ .cursorrules # For Cursor
βββ .github/copilot-instructions.md # For GitHub Copilot
βββ .codeium/instructions.md # For Codeium
βββ .continue/context.md # For Continue
βββ .aider.conf.yml # For Aider
This is maintenance hell. When you update your coding standards or project context, you need to update 6+ files. They drift out of sync, contain duplicate information, and create confusion.
ContextHub provides a unified configuration system that maintains a single source of truth (.ai-context.md
) and automatically syncs it to all your AI tools.
Tool | Status | Config File | Strategy |
---|---|---|---|
π€ Claude Code | β Full | CLAUDE.md |
Symlink/Copy |
π― Cursor | β Full | .cursorrules |
Symlink/Copy |
π¨βπ» GitHub Copilot | β Full | .github/copilot-instructions.md |
Symlink/Copy |
π Codeium | β Full | .codeium/instructions.md |
Symlink/Copy |
π Continue | β Full | .continue/context.md |
Symlink/Copy |
π¨ Aider | .aider.conf.yml |
Template Generation |
# Via npm (recommended)
npm install -g contexthub
contexthub setup
# Via curl (Unix/macOS)
curl -sSL https://raw.githubusercontent.com/seshanpillay25/contexthub/main/setup-ai-tools.sh | bash
# Via PowerShell (Windows)
iwr -useb https://raw.githubusercontent.com/seshanpillay25/contexthub/main/setup-ai-tools.ps1 | iex
# Via Python (cross-platform)
curl -sSL https://raw.githubusercontent.com/seshanpillay25/contexthub/main/setup-ai-tools.py | python3
Choose only the AI tools you use:
# List available tools
contexthub build --list-tools
# Generate configs for specific tools only
contexthub build --tools claude,cursor
contexthub build --tools claude,copilot,codeium
contexthub build --tools cursor # Just Cursor
# All available tools: claude, cursor, copilot, codeium, continue, aider
# Clone and run
git clone https://github.com/seshanpillay25/contexthub.git
cd contexthub
chmod +x setup-ai-tools.sh
./setup-ai-tools.sh
# Set up ContextHub in your project
contexthub
# Verify your setup
contexthub --verify
# Validate your configuration
npm run validate
# Build tool-specific configs for all tools
npm run build
# Build for specific tools only
npm run build -- --tools claude,cursor,copilot
# Force rebuild (overwrites existing files)
npm run build -- --force
# Sync configurations (for file copy strategy)
npm run sync
# Migrate existing tool configs to unified format
npm run migrate
# List all available tools
npm run build -- --list-tools
Choose only the AI tools you actually use:
# Just Claude Code
npm run build -- --tools claude
# Claude + Cursor
npm run build -- --tools claude,cursor
# Claude + GitHub Copilot + Codeium
npm run build -- --tools claude,copilot,codeium
# Cursor only
npm run build -- --tools cursor
# All tools (default behavior)
npm run build
Available tools:
claude
βCLAUDE.md
(Claude Code)cursor
β.cursorrules
(Cursor IDE)copilot
β.github/copilot-instructions.md
(GitHub Copilot)codeium
β.codeium/instructions.md
(Codeium)continue
β.continue/context.md
(Continue)aider
β.aider.conf.yml
(Aider)
ContextHub supports multiple implementation strategies to fit your workflow:
Creates symbolic links from tool-specific files to your master .ai-context.md
.
.ai-context.md (master file)
βββ CLAUDE.md β .ai-context.md
βββ .cursorrules β .ai-context.md
βββ .github/copilot-instructions.md β .ai-context.md
Pros: Real-time sync, no build step, works with any editor
Cons: Requires symlink support (not available on some Windows setups)
Generates tool-specific files during your build process.
# Add to your package.json scripts
"prebuild": "contexthub build",
"precommit": "contexthub sync"
Pros: Works everywhere, integrates with CI/CD
Cons: Requires build step, potential for drift
Uses a YAML-based configuration that generates all tool-specific formats.
# .ai-context.yml
project:
name: "My Awesome App"
type: "fullstack"
tools:
claude:
custom_instructions: "Focus on TypeScript best practices"
cursor:
rules: ["prefer-const", "no-any"]
Pros: Structured data, validation, tool-specific customization
Cons: Learning curve, YAML syntax
Automatically syncs files on git operations.
# Syncs on commit, push, pull
contexthub install-hooks
Pros: Automatic, no manual intervention
Cons: Git-dependent, hooks can be bypassed
graph TD
A[Developer] --> B[Update CLAUDE.md]
A --> C[Update .cursorrules]
A --> D[Update copilot-instructions.md]
A --> E[Update .codeium/instructions.md]
B --> F[Claude Code]
C --> G[Cursor]
D --> H[GitHub Copilot]
E --> I[Codeium]
style A fill:#ff6b6b
style B fill:#feca57
style C fill:#feca57
style D fill:#feca57
style E fill:#feca57
graph TD
A[Developer] --> B[Update .ai-context.md]
B --> C[ContextHub Sync]
C --> D[CLAUDE.md]
C --> E[.cursorrules]
C --> F[copilot-instructions.md]
C --> G[.codeium/instructions.md]
D --> H[Claude Code]
E --> I[Cursor]
F --> J[GitHub Copilot]
G --> K[Codeium]
style A fill:#48dbfb
style B fill:#0be881
style C fill:#0be881
- Single source of truth - Update once, sync everywhere
- Zero maintenance - Set it up once, forget about it
- No vendor lock-in - Works with any combination of AI tools
- Migration friendly - Migrates existing configurations automatically
- Consistency - Everyone uses the same AI context
- Onboarding - New team members get instant context
- Standards enforcement - Coding standards applied universally
- Version control - Track context changes like any other code
- Setup time: < 30 seconds
- File size impact: ~50% reduction in config files
- Maintenance time: 90% reduction
- Team sync: 100% consistency
# .ai-context.md
# Project: E-commerce Platform
## Overview
Modern e-commerce platform built with Next.js, TypeScript, and Prisma.
## Architecture
- **Frontend:** Next.js 14 with App Router
- **Backend:** Next.js API routes + tRPC
- **Database:** PostgreSQL with Prisma ORM
- **Auth:** NextAuth.js with multiple providers
- **Payments:** Stripe integration
- **Deployment:** Vercel with edge functions
## Coding Standards
### TypeScript
- Use strict mode
- Prefer interfaces over types for object shapes
- Use proper return types for all functions
```typescript
// β
Good
interface User {
id: string;
email: string;
createdAt: Date;
}
const getUser = async (id: string): Promise<User | null> => {
return await prisma.user.findUnique({ where: { id } });
};
// β Bad
const getUser = async (id) => {
return await prisma.user.findUnique({ where: { id } });
};
- Use functional components with hooks
- Implement proper error boundaries
- Use React.memo for expensive computations
Focus on performance optimization and accessibility. Use semantic HTML and proper ARIA labels.
Prefer inline styles using Tailwind classes. Use shadcn/ui components when available.
- Unit tests: Vitest + Testing Library
- E2E tests: Playwright
- API tests: Supertest
- Coverage target: 80%+
- Core Web Vitals: All green
- First Contentful Paint: < 1.5s
- Largest Contentful Paint: < 2.5s
- Time to Interactive: < 3.5s
- Sanitize all user inputs
- Use HTTPS everywhere
- Implement rate limiting
- Follow OWASP top 10
## β FAQ
<details>
<summary><strong>Does this work with my existing configurations?</strong></summary>
Yes! ContextHub automatically backs up your existing configuration files and can migrate their content to the unified format.
</details>
<details>
<summary><strong>What if I need tool-specific instructions?</strong></summary>
Use HTML comments to create tool-specific sections:
```markdown
<!-- AI:CLAUDE -->
These instructions are only for Claude Code
<!-- /AI:CLAUDE -->
<!-- AI:CURSOR -->
These instructions are only for Cursor
<!-- /AI:CURSOR -->
Can I use YAML instead of Markdown?
Yes! ContextHub supports both .ai-context.md
and .ai-context.yml
formats. YAML provides more structure and validation.
Does this work in monorepos?
Absolutely! ContextHub can create workspace-specific configurations and inherit from root-level configs.
What about Windows compatibility?
ContextHub includes a PowerShell script and automatically falls back to file copying if symlinks aren't available.
Is this secure?
Yes. ContextHub only creates local symlinks/copies and never sends data anywhere. It's a local development tool.
How do I add new AI tools to an existing setup?
You can easily add new tools without affecting your existing configurations:
# Add Claude to existing Cursor/Copilot setup
npm run build -- --tools claude
# Add multiple tools at once
npm run build -- --tools claude,aider,continue
# See all available tools
npm run build -- --list-tools
This will only generate configuration files for the specified tools, leaving your existing setup untouched.
Automatically detects installed AI coding assistants and provides intelligent setup recommendations.
# Detect all AI tools on your system
npm run detect
# Setup with automatic detection and interactive selection
contexthub
# Detect-only mode (no setup)
contexthub --detect-only
Detection Capabilities:
- π VS Code Extensions: Scans installed VS Code extensions
- π» System Executables: Checks for AI tool executables in PATH
- π Project Configs: Finds existing configuration files
- π¦ Package Dependencies: Analyzes package.json for AI-related dependencies
- π§ Git Configurations: Detects GitHub Copilot integration
Smart setup process with multiple modes for different user preferences.
π§ Smart Mode (Default)
- Uses AI tool detection to pre-select recommended tools
- Shows confidence levels for each detected tool
- Allows customization of recommendations
- Best for most users
π€ Manual Mode
- Complete manual control over tool selection
- No detection influence on recommendations
- Clean interface with tool descriptions
- Perfect for specific requirements
π Detection-Only Mode
- Shows what tools are detected without setup
- Great for understanding your current environment
- Can run setup later with informed decisions
# Default interactive setup
contexthub
# Force manual mode (skip detection influence)
contexthub --manual
# Force smart mode (always use detection)
contexthub --smart
# Detection only (no setup)
contexthub --detect-only
Automatically syncs changes from .ai-context.md
to all tool-specific configs.
# Start file watcher (runs continuously)
npm run watch
# One-time sync without watching
npm run sync-once
# Manual sync (for file copy strategy)
npm run sync
Watcher Features:
- β‘ Real-time sync with debounced updates (500ms)
- π Smart symlink detection (skips syncing symlinked files)
- π οΈ Tool-specific filtering (processes AI:TOOL sections)
- π Session statistics and error reporting
- π― Selective syncing (only syncs configured tools)
Comprehensive validation system that ensures your AI configurations follow best practices.
# Validate configuration
npm run lint
# Validate and auto-fix issues
npm run lint-fix
# Strict validation mode
npm run lint -- --strict
# JSON output for CI/CD
npm run lint -- --json
Validation Rules:
- π Structure validation: Required sections, proper headings
- π Content quality: Empty sections, placeholder detection
- π§ Tool sections: Malformed AI:TOOL tags, consistency
- π Sync consistency: File sync status, symlink validation
- π Best practices: Framework-specific guidelines
- π Security checks: Sensitive data detection, security guidelines
# Default Interactive Setup
contexthub
# Offers choice between Smart/Manual/Detection-Only modes
# Force Specific Mode
contexthub --manual # Skip detection influence
contexthub --smart # Always use detection
contexthub --detect-only # Detection only, no setup
When you choose smart mode, you get:
- β High confidence tools (pre-selected, recommended)
- π Suggested tools (pre-selected, some evidence)
- π‘ Optional tools (not pre-selected, minimal evidence)
- Undetected tools (not pre-selected, available to add)
When you choose manual mode, you get:
- Clean tool list with descriptions
- No detection bias or pre-selection
- Confirmation summary before proceeding
- Option to cancel and restart
# Setup specific tools without interaction
contexthub --no-interactive --tools claude,cursor,copilot
# Quick setups
contexthub --no-interactive --tools claude
contexthub --no-interactive --tools claude,cursor,copilot
# Mode + Non-Interactive
contexthub --manual --no-interactive
contexthub --smart --no-interactive --tools claude,cursor
# See all available tools with descriptions
contexthub --list-tools
# Standalone detection without setup
contexthub --detect-only
npm run detect
# Check existing setup
contexthub --verify
# Validate configuration file
npm run lint
# Get usage examples
contexthub --examples
# Use file copying instead of symlinks
contexthub --no-symlinks
# Work in specific directory
contexthub --working-dir /path/to/project
# Force overwrite existing files
contexthub --force
# Verbose output for debugging
contexthub --verbose
# Combining options
contexthub --manual --force --verbose
contexthub --smart --tools claude,cursor --no-symlinks
Start with a few tools and add more as needed:
# Initial setup with smart recommendations
contexthub
# Choose only the tools you want during interactive setup
# Add Claude without affecting existing tools
npm run build -- --tools claude
# Add multiple tools at once
npm run build -- --tools aider,continue,codeium
# Or add all remaining tools
npm run build -- --force # Generates all supported tools
# List all available tools
contexthub --list-tools
npm run build -- --list-tools
# Preview what would be generated (dry run)
npm run build -- --tools claude --dry-run
# Force regenerate existing files
npm run build -- --tools claude --force
# Generate with verbose output
npm run build -- --tools claude --verbose
# Use specific platform scripts
./setup-ai-tools.sh # Unix/macOS
./setup-ai-tools.ps1 # Windows PowerShell
python3 setup-ai-tools.py # Universal Python
# Guided interactive setup
contexthub
# Choose "Smart Setup" β Customize selections β Confirm
# Quick manual setup
contexthub --manual --tools claude,cursor --force
# Detect what's available, then standardize
contexthub --detect-only
contexthub --no-interactive --tools claude,copilot
# Automated setup with validation
contexthub --no-interactive --tools claude --no-symlinks
npm run lint --json
Solution | Multi-tool | Symlinks | Validation | Migration | Cross-Platform |
---|---|---|---|---|---|
ContextHub | β | β | β | β | β |
Manual copies | β | β | β | β | |
Custom scripts | β | β | β | ||
Tool-specific | β | β | β |
ContextHub is designed with security as a fundamental principle:
β
Local-only operation - No network access or data transmission
β
No sensitive data storage - Only processes your project configurations
β
Minimal permissions - Only accesses files within your project directory
β
Input validation - All user inputs are validated and sanitized
β
Secure file operations - Protection against path traversal and malicious symlinks
β
No code execution - Only static file generation, no arbitrary code execution
β
Open source - Fully auditable codebase
- Path Traversal Protection: Prevents access to files outside project directory
- Symlink Validation: Ensures symlinks are safe and don't escape project bounds
- Input Sanitization: All configuration content is validated and sanitized
- Backup Creation: Original files are safely backed up before modification
- No Network Access: Completely offline operation, no data transmission
For full security details, see our Security Policy.
git clone https://github.com/seshanpillay25/contexthub.git
cd contexthub
npm install
npm test
MIT License - see LICENSE for details.