1.0.0 • Published 5 months ago
code2ai v1.0.0
c2ai - Code2.ai CLI
A command-line interface for Code2.ai that helps compress and optimize your codebase for AI assistants.
Installation
npm install -g c2ai
Or run directly with npx:
npx c2ai
Features
- 📁 Scans your project for relevant code files
- 🧩 Ignores unnecessary files like node_modules, .git, etc.
- 📝 Creates a structured context file that helps AI assistants understand your codebase
- 🚀 Makes it easier to get relevant AI assistance for your code
Usage
Authenticate
c2ai login
This will prompt you to enter your Code2.ai email and will send a magic link for verification.
Compress Project
Run in your project directory:
c2ai
Or with options:
c2ai compress --output my-context.txt --ignore "*.jpg,*.png,data/**"
Options
--output, -o
: Specify output file path (default: ./c2ai-context.txt)--ignore, -i
: Additional patterns to ignore (comma separated)
How It Works
- The CLI scans your project files, respecting .gitignore and other common ignore patterns
- It creates a zip archive of your codebase
- The archive is sent to Code2.ai's API for intelligent processing
- A structured context file is generated and saved to your specified location
- You can then upload this context file to Claude or other AI assistants
Requirements
- Node.js 14 or higher
- Active Code2.ai subscription
License
ISC
1.0.0
5 months ago