CLI tool to generate code context files
npm install ai-context




A CLI tool that generates structured context from your codebase for AI tools. Scans your project, filters out noise, and creates formatted output ready for Claude, ChatGPT, or any AI assistant.

``bash`
npm install -g ai-context
cx
`bash`
cx # Generate from current directory
cx ./src # Generate from path
cx -m "feature" # Add filename message
cx -o # Output to screen
cx -t # Tree only
cx -s # Create snapshot
`bash`
cx -f text # Plain text (default)
cx -f md # Markdown
cx -f json # JSON
cx -f xml # XML
Only include changed files:
`bash`
cx --since 2h # Last 2 hours
cx --since 1d # Last day
cx --git-diff main # vs main branch
cx --changed # Since last run
`bashExclude patterns
cx ignore "*.log"
cx ignore show
Configuration
`bash
cx configure # Setup
cx show # View settings
`Full Documentation
COMMANDS.md - Complete CLI reference with all options, examples, and patterns.
Help
`bash
cx -h # Basic help
cx -h --more # Detailed help
``- Updates - Version history
- Issues - Report bugs
- Discussions - Questions
MIT