Skip to content
This repository was archived by the owner on Aug 16, 2025. It is now read-only.

anivar/dotfiles-context

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Dotfiles Context - Universal AI Memory System

Stop losing context! Keep your AI assistants informed across all providers and projects.

npm version License: MIT

What It Does

Problem: AI assistants forget your project context between conversations. You repeat yourself constantly.

Solution: A universal context system that works with ALL AI providers:

  • βœ… Claude (Desktop & Web)
  • βœ… Cursor IDE
  • βœ… GitHub Copilot
  • βœ… Gemini CLI
  • βœ… OpenAI ChatGPT
  • βœ… Any AI tool that can read markdown files

Quick Start

Install via npm (Recommended)

npm install -g dotfiles-context

Install via curl

curl -sSL https://raw.githubusercontent.com/anivar/dotfiles-context/main/install.sh | bash

Manual Install

git clone https://github.com/anivar/dotfiles-context.git
cd dotfiles-context
./install.sh

Usage

Store Project Context

# Store architecture decisions
context store architecture "Microservices with event sourcing"

# Store technical decisions  
context store decisions "PostgreSQL for ACID compliance"

# Store API documentation
context store api "REST endpoints with JWT authentication"

# Track documentation with timestamps
context doc API.md "REST endpoint documentation"

Retrieve Context

# Get all context
context retrieve

# Search for specific information
context retrieve "database"
context retrieve "API"

# Check project status
context status

Import Existing Files

# Import existing AI configuration files
context import

# This imports content from:
# - CLAUDE.md
# - .cursorrules  
# - .github/copilot-instructions.md

How It Works

Single Source of Truth

All context is stored in .ai-context/memory.md:

# Project Context

## [architecture] 2024-01-15T10:30:00Z
Microservices with event sourcing and CQRS pattern

## [decisions] 2024-01-15T11:00:00Z  
PostgreSQL for main database, Redis for caching

Provider Integration

The system creates provider-specific files that reference the central memory:

Claude (CLAUDE.md):

## Project Context
@.ai-context/memory.md

Cursor (.cursorrules):

# Always check .ai-context/memory.md for project context

GitHub Copilot (.github/copilot-instructions.md):

## Context Reference
../.ai-context/memory.md

Gemini (GEMINI.md β†’ symlink to memory.md)

Features

🧠 Universal Memory

  • Works with any AI provider
  • Persistent across conversations
  • Project-specific context

πŸ”„ Auto-Sync

  • Automatically creates provider files
  • Updates timestamps
  • Handles existing configurations

πŸ”’ Security First

  • Warns about storing secrets
  • Auto-adds to .gitignore
  • Validates all inputs
  • Treats secrets like dotfiles

πŸ“š Documentation Tracking

  • Track docs with timestamps
  • List recent changes
  • Reference-based (no content duplication)

πŸ›  Developer Friendly

  • XDG Base Directory compliant
  • Atomic file operations
  • Comprehensive logging
  • Professional architecture

Examples

For Web Development

context store architecture "Next.js with TypeScript and Tailwind"
context store database "Prisma with PostgreSQL"  
context store auth "NextAuth.js with Google OAuth"
context doc components/README.md "Component documentation"

For Mobile Apps

context store platform "React Native with Expo"
context store state "Redux Toolkit for state management"
context store api "REST API with React Query"

For Backend Services

context store architecture "Express.js microservices"
context store database "MongoDB with Mongoose ODM"
context store deployment "Docker containers on AWS ECS"

AI Provider Setup

Claude Desktop (MCP Integration)

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/your/projects"]
    }
  }
}

Cursor IDE

Works automatically! Cursor reads .cursorrules files.

GitHub Copilot

Works automatically! Copilot reads .github/copilot-instructions.md.

Gemini CLI

Install the wrapper:

# The symlink approach works automatically
ls -la GEMINI.md  # -> .ai-context/memory.md

OpenAI/ChatGPT

Simply reference the context:

"Check my project context in .ai-context/memory.md and help me implement..."

Categories

Use these standard categories for consistency:

  • architecture - System design decisions
  • requirements - Business/technical requirements
  • implementation - Code implementation details
  • infrastructure - Deployment and infrastructure
  • decisions - Technical decisions and rationale
  • issues - Known issues and resolutions
  • docs - Documentation references
  • api - API design and endpoints
  • database - Database schema and decisions
  • auth - Authentication and authorization
  • testing - Testing strategies and patterns

Security

βœ… What We Do

  • Input validation and sanitization
  • Automatic .gitignore management
  • Secret detection warnings
  • Path traversal protection
  • XDG directory compliance

⚠️ Best Practices

# Good - Store references
context store api "AWS credentials in 1Password: ProjectName-Prod"
context store database "Connection string in .env.local"

# Bad - Store actual secrets  
context store api "api_key=sk-abc123..."  # Will warn!

Commands

context store <category> <content>     # Store contextual information
context retrieve [filter]              # Retrieve stored context  
context status                         # Show system status
context import                         # Import existing AI files
context doc <file> [description]       # Track documentation
context recent-docs [days]             # List recent documentation
context sync                           # Force provider sync
context help                           # Show help

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

License

MIT License - see LICENSE file.

Support


Stop repeating yourself to AI assistants. Install dotfiles-context and keep them informed! πŸš€