Skip to content

dchae/clementine

Repository files navigation

Clementine

A terminal-based AI coding assistant and pair programmer built with Mastra, Ink, and React.

Features

  • Interactive terminal-based AI assistant
  • File system operations (read, edit, create files)
  • Shell command execution with approval system
  • Memory persistence using LibSQL
  • TypeScript/React-based CLI interface using Ink
  • Tool approval system for safe operations

Architecture

Clementine is built as a monorepo with two main packages:

  • @clementine/cli - Terminal interface built with React and Ink
  • @clementine/mastra - Core AI agent and tools powered by Mastra framework

Installation

Prerequisites

  • Node.js >= 20.9.0
  • npm or compatible package manager

Global Installation

npm install --global clementine

Development Setup

# Clone the repository
git clone <repository-url>
cd clementine

# Install dependencies
npm install

# Build the project
npm run build

# Link for local development
npm link --force

Usage

Basic Usage

# Start Clementine
clementine

# Start with verbose logging
clementine --verbose

Available Options

$ clementine --help

Usage
  $ clementine

Options
  --verbose, -v  Show detailed output
  --help         Show help

Examples
  $ clementine --verbose

Development

Key Dependencies

  • Mastra Framework: Core AI agent functionality
  • React + Ink: Terminal UI rendering
  • OpenAI: LLM integration (GPT-4)
  • LibSQL: Persistent memory storage
  • TypeScript: Type safety and development experience

Configuration

Clementine uses environment variables for configuration. Create a .env file in the project root:

# Add your OpenAI API key and other configuration
OPENAI_API_KEY=your_api_key_here

Contributing

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

License

MIT License - see LICENSE file for details.

About

A terminal-based AI coding assistant and pair programmer built with Mastra, Ink, and React.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published