1.0.0 • Published 5 months ago

code2ai v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

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

  1. The CLI scans your project files, respecting .gitignore and other common ignore patterns
  2. It creates a zip archive of your codebase
  3. The archive is sent to Code2.ai's API for intelligent processing
  4. A structured context file is generated and saved to your specified location
  5. 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