@zahardev/aicontext
v1.2.0
Published
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.
Maintainers
Readme
AI Context Framework
Tired 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.
Supported AI Tools
| Tool | Entry Point | Format |
|------|-------------|--------|
| Claude Code | .claude/CLAUDE.md | Markdown |
| Cursor | .cursor/rules/*.mdc | MDC (Markdown + YAML) |
| GitHub Copilot | .github/copilot-instructions.md | Markdown |
Requirements
- Node.js 18.0.0 or higher (for npm install only — not needed for manual copy)
Installation
Option A: Global Install (Recommended)
npm install -g @zahardev/aicontext
cd /path/to/your-project
aicontext initOption B: npx (One-time use)
cd /path/to/your-project
npx @zahardev/aicontext initYou 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.
Option C: Manual Copy
If you prefer not to use npm, clone the GitHub repository and copy the needed files:
# Clone to a temporary location
git clone https://github.com/zahardev/aicontext.git /tmp/aicontext
# Copy needed files to your project
cd /path/to/your-project
cp -r /tmp/aicontext/.aicontext .
# Copy entry points for your AI tool(s) — pick what you use:
cp -r /tmp/aicontext/.claude . # Claude Code
cp -r /tmp/aicontext/.cursor . # Cursor
cp -r /tmp/aicontext/.github . # GitHub Copilot
# Clean up
rm -rf /tmp/aicontextWhat aicontext init Creates
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
- Open your AI assistant (Claude Code, Cursor, etc.)
- Start a conversation with
.aicontext/prompts/start.mdprompt - 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, environment
These 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 documentationExample configurations are available in the GitHub repository.
Workflow
Starting a Session
- Paste contents of
.aicontext/prompts/start.md - AI reads rules and confirms readiness
Working on a Task
- Paste contents of
.aicontext/prompts/check_task.md - AI analyzes the task and asks clarifying questions
- Implement with AI assistance
- Update
.aicontext/changelog.mdwhen complete
Code Review
- Paste contents of
.aicontext/prompts/review.md - AI reviews changes against task requirements
Updating the Framework
aicontext updateOr check your current version:
aicontext versionTo upgrade the aicontext CLI tool itself:
aicontext upgradeOr upgrade to a specific version:
aicontext upgrade 1.2.0What aicontext update Does
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
Adding Your Own Rules
- Team rules: Add to
.aicontext/project.md— works across all AI tools - Personal rules: Add to
.aicontext/local.md— gitignored, see.aicontext/readme.mdfor setup notes
For large or domain-specific rule sets, create separate files in .aicontext/rules and reference them from project.md or local.md files.
Removing Unused Tools
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 Code
Version History
See CHANGELOG.md for release notes.
License
MIT
