Give your AI coding assistants persistent memory about your project. Works with any language (PHP, Python, JS, Rust, Go) and framework (Laravel, Django, Next.js, WordPress). Supports Claude Code, Cursor, and GitHub Copilot.
npm install @zahardev/aicontextTired of explaining your project to AI assistants over and over again?
AIContext gives your AI coding assistants persistent memory about your project — your tech stack, coding standards, folder structure, and workflows. Set it up once, and every AI session starts with full context.
Works with any language or framework — PHP, Python, JavaScript, TypeScript, Rust, Go, and more. Includes detection prompts for Laravel, WordPress, Django, Next.js, NestJS, Flutter, and other popular frameworks.
Supports multiple AI tools — Claude Code, Cursor, and GitHub Copilot.
| Tool | Entry Point | Format |
|------|-------------|--------|
| Claude Code | .claude/CLAUDE.md | Markdown |
| Cursor | .cursor/rules/*.mdc | MDC (Markdown + YAML) |
| GitHub Copilot | .github/copilot-instructions.md | Markdown |
- Node.js 18.0.0 or higher (for npm install only — not needed for manual copy)
``bash`
npm install -g @zahardev/aicontext
cd /path/to/your-project
aicontext init
`bash`
cd /path/to/your-project
npx @zahardev/aicontext init
You can also specify the project path explicitly: aicontext init /path/to/your-project
Note: If .claude/, .cursor/, or .aicontext/ already exist, you'll be prompted before overwriting. If you use git, uncommitted changes can be reverted with git checkout.
If you prefer not to use npm, clone the GitHub repository and copy the needed files:
`bashClone to a temporary location
git clone https://github.com/zahardev/aicontext.git /tmp/aicontext
$3
The command creates the following in your project:
| Path | Purpose |
|------|---------|
|
.aicontext/ | Framework files (rules, prompts, templates) |
| .claude/CLAUDE.md | Entry point for Claude Code |
| .cursor/rules/ | Entry point for Cursor |
| .github/copilot-instructions.md | Entry point for GitHub Copilot |Generate Project Context
1. Open your AI assistant (Claude Code, Cursor, etc.)
2. Start a conversation with
.aicontext/prompts/start.md prompt
3. On first run, the AI will analyze your codebase and generate:
- .aicontext/project.md - Project overview, tech stack, architecture
- .aicontext/structure.md - Commands, folder structure, environmentThese files give your AI assistant "memory" about your project. Once generated, future sessions start with full context automatically.
Structure
`
.aicontext/
├── rules/
│ ├── process.md # Task management, TDD workflow
│ └── standards.md # Coding standards, safety rules
├── prompts/
│ ├── generate.md # Generate project context (auto-runs if project.md missing)
│ ├── start.md # Start a session
│ ├── check_task.md # Before starting a task
│ ├── check_plan.md # Review implementation plan
│ └── review.md # Code review
├── templates/
│ ├── project.template.md
│ ├── structure.template.md
│ └── task.template.md
├── examples/ # Example configs (GitHub repo only)
│ ├── laravel-api/
│ ├── wordpress-plugin/
│ ├── web-api/
│ └── cli-tool/
├── tasks/ # Task tracking files
├── data/ # Screenshots, specs, reference files
├── project.md # [Generated] Project-specific
├── structure.md # [Generated] Project-specific
├── changelog.md # Task completion history
├── local.md # Personal settings (gitignored)
└── readme.md # Framework documentation
`Example configurations are available in the GitHub repository.
Workflow
$3
1. Paste contents of
.aicontext/prompts/start.md
2. AI reads rules and confirms readiness$3
1. Paste contents of
.aicontext/prompts/check_task.md
2. AI analyzes the task and asks clarifying questions
3. Implement with AI assistance
4. Update .aicontext/changelog.md when complete$3
1. Paste contents of
.aicontext/prompts/review.md
2. AI reviews changes against task requirementsUpdating the Framework
`bash
aicontext update
`Or check your current version:
`bash
aicontext version
`To upgrade the aicontext CLI tool itself:
`bash
aicontext upgrade
`Or upgrade to a specific version:
`bash
aicontext upgrade 1.2.0
`$3
Updates framework files (rules, prompts, templates, tool entry points) while preserving your project-specific files:
| Updated | Preserved |
|---------|-----------|
|
.aicontext/rules/ | .aicontext/project.md |
| .aicontext/prompts/ | .aicontext/structure.md |
| .aicontext/templates/ | .aicontext/changelog.md |
| .claude/, .cursor/, .github/ | .aicontext/local.md |Customization
$3
- Team rules: Add to
.aicontext/project.md — works across all AI tools
- Personal rules: Add to .aicontext/local.md — gitignored, see .aicontext/readme.md for setup notesFor large or domain-specific rule sets, create separate files in
.aicontext/rules and reference them from project.md or local.md files.$3
Not using all AI tools? You can safely delete:
-
.cursor/ — if not using Cursor
- .github/copilot-instructions.md — if not using GitHub Copilot
- .claude/` — if not using Claude CodeSee CHANGELOG.md for release notes.
MIT