JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 46
  • Score
    100M100P100Q69426F
  • License MIT

Enterprise-grade AI coding assistant CLI

Package Exports

  • codemate-ai
  • codemate-ai/dist/cli.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (codemate-ai) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

CodeMate AI - Enterprise AI Coding Assistant ๐Ÿค–

Your AI pair programmer in the terminal

npm version License: MIT Node.js Version

CodeMate AI is an enterprise-grade AI coding assistant that brings the power of large language models directly to your terminal. Built with TypeScript and powered by OpenAI, Anthropic, and DeepSeek, it transforms natural language into working code.

โœจ Features

  • ๐Ÿš€ Natural Language to Code - Describe what you want, get working code
  • ๐Ÿ”ง Intelligent Code Editing - AST-based code modifications with context awareness
  • ๐Ÿงช AI-Powered Testing - Automatic test generation and validation
  • ๐Ÿ“Š Performance Optimization - Prompt caching, context compression, intelligent pruning
  • ๐ŸŒ HTTP Server Mode - Browser-based UI with WebSocket support
  • ๐Ÿ”Œ MCP Protocol Support - Extensible tool system via Model Context Protocol
  • ๐ŸŒ Multiple AI Providers - OpenAI, Anthropic, DeepSeek, OpenRouter, and custom APIs
  • ๐ŸŽจ Multiple Output Styles - Customizable output formatting and themes
  • ๐Ÿ’พ Session Management - Resume conversations and track file changes
  • ๐Ÿ”„ Multi-Agent System - Specialized agents for different tasks
  • ๐ŸŽฏ Slash Commands - Quick actions with /help, /clear, /sessions, etc.

๐Ÿ“ฆ Installation

npm install -g codemate-ai

Requirements:

  • Node.js 18.0.0 or higher
  • OpenAI, Anthropic, or DeepSeek API key

๐Ÿš€ Quick Start

First Run

On first run, CodeMate AI will guide you through interactive setup:

$ codemate

ๆฌข่ฟŽไฝฟ็”จ CodeMate AI! ๐ŸŽ‰

ๆฃ€ๆต‹ๅˆฐ่ฟ™ๆ˜ฏ้ฆ–ๆฌก่ฟ่กŒ๏ผŒ้œ€่ฆ่ฟ›่กŒๅˆๅง‹้…็ฝฎใ€‚

่ฏท้€‰ๆ‹ฉ AI ๆไพ›ๅ•†:
  1. OpenAI (GPT-4, GPT-3.5)
  2. Anthropic (Claude)
  3. DeepSeek (ๅ›ฝๅ†…ๅฏ็”จ๏ผŒๆ€งไปทๆฏ”้ซ˜)
  4. OpenRouter (ๅคšๆจกๅž‹่šๅˆ)
  5. ่‡ชๅฎšไน‰ (OpenAI ๅ…ผๅฎน API)

่ฏท่พ“ๅ…ฅ้€‰้กน (1-5): 3

่ฏท่พ“ๅ…ฅ API Key: sk-...

่ฏท่พ“ๅ…ฅๆจกๅž‹ๅ็งฐ (็›ดๆŽฅๅ›ž่ฝฆไฝฟ็”จ้ป˜่ฎค: deepseek-chat): 

โœ… ้…็ฝฎๅทฒไฟๅญ˜ๅˆฐ: ~/.aiclirc.json

ๆไพ›ๅ•†: DeepSeek
ๆจกๅž‹: deepseek-chat
Base URL: https://api.deepseek.com

้…็ฝฎๅฎŒๆˆ๏ผ็Žฐๅœจๅฏไปฅๅผ€ๅง‹ไฝฟ็”จไบ†ใ€‚

่ฏ•่ฏ•๏ผšcodemate "ๅˆ›ๅปบไธ€ไธช Hello World ็จ‹ๅบ"

Basic Usage

# One-shot command
codemate "create a REST API with Express and TypeScript"

# Interactive mode
codemate

# Server mode (browser UI)
codemate --server --port 3000

๐Ÿ“– Usage Examples

Create a New Project

codemate "create a React app with TypeScript and Tailwind CSS"

Refactor Code

codemate "refactor the UserService class to use dependency injection"

Generate Tests

codemate "write unit tests for the authentication module"

Debug Issues

codemate "fix the memory leak in the WebSocket server"

โš™๏ธ Configuration

Configuration file: ~/.aiclirc.json

Supported AI Providers

Provider Features Best For
OpenAI GPT-4, GPT-3.5 International users, best ecosystem
Anthropic Claude series Long context, high safety
DeepSeek ๅ›ฝๅ†…ๅฏ็”จ China users, cost-effective
OpenRouter Multi-model Access multiple models
Custom OpenAI-compatible Self-hosted, special needs

Configuration Examples

OpenAI:

{
  "provider": "openai",
  "apiKey": "sk-...",
  "model": "gpt-4",
  "performance": {
    "enableCaching": true,
    "enableCompression": true
  }
}

DeepSeek:

{
  "provider": "deepseek",
  "apiKey": "sk-...",
  "model": "deepseek-chat",
  "baseURL": "https://api.deepseek.com",
  "performance": {
    "enableCaching": true,
    "enableCompression": true
  }
}

Custom API:

{
  "provider": "custom",
  "apiKey": "your-key",
  "model": "your-model",
  "baseURL": "https://api.example.com/v1",
  "performance": {
    "enableCaching": true,
    "enableCompression": true
  }
}

Supported Models

OpenAI:

  • gpt-4
  • gpt-4-turbo
  • gpt-3.5-turbo

Anthropic:

  • claude-3-5-sonnet-20241022
  • claude-3-opus-20240229
  • claude-3-sonnet-20240229

DeepSeek:

  • deepseek-chat
  • deepseek-coder

OpenRouter:

  • anthropic/claude-3.5-sonnet
  • openai/gpt-4
  • And many more...

๐ŸŽฎ Commands

Slash Commands

  • /help - Show available commands
  • /clear - Clear current session
  • /sessions - List all sessions
  • /model - Change AI model
  • /style - Change output style
  • /snapshots - View file history
  • /rewind - Revert file changes
  • /exit - Exit AICLI

CLI Options

codemate [options] [prompt]

Options:
  -v, --version              Output version number
  -h, --help                 Display help
  -s, --server               Start HTTP server mode
  -p, --port <port>          Server port (default: 3000)
  -m, --model <model>        AI model to use
  --no-cache                 Disable prompt caching
  --no-compression           Disable context compression

๐Ÿ—๏ธ Architecture

CodeMate AI is built with a modular architecture:

  • Application Layer - Dependency injection and lifecycle management
  • Service Layer - Core services (Model, Config, Session, EventBus)
  • Manager Layer - Tool, Plugin, Agent, Command managers
  • Tool System - File operations, search, bash execution, code editing
  • Agent System - General, Plan, and Explore agents
  • UI Layer - Ink-based terminal UI with React components
  • Server Layer - HTTP server with WebSocket for browser UI

๐Ÿ”Œ Extensibility

Custom Plugins

Create custom plugins in ~/.codemate/plugins/:

import { Plugin } from 'codemate-ai';

export class MyPlugin extends Plugin {
  name = 'my-plugin';
  
  async onInit() {
    console.log('Plugin initialized');
  }
  
  async onToolCall(tool: string, args: any) {
    // Custom logic
  }
}

MCP Integration

CodeMate AI supports the Model Context Protocol for extending tool capabilities. Configure MCP servers in your config file.

๐Ÿ“š Documentation

๐Ÿงช Development

# Clone repository
git clone https://github.com/your-org/codemate-ai.git
cd codemate-ai

# Install dependencies
npm install

# Run in development mode
npm run dev

# Run tests
npm test

# Type checking
npm run typecheck

# Format code
npm run format

# Run full CI
npm run ci

# Build for production
npm run build

# Test local installation
npm run test:install

๐Ÿค Contributing

Contributions are welcome! Please read our Contributing Guide for details.

๐Ÿ“ License

MIT ยฉ Your Name

๐Ÿ™ Acknowledgments

๐Ÿ“ฎ Support


Made with โค๏ธ by developers, for developers