A terminal-based AI coding assistant and pair programmer built with Mastra, Ink, and React.
- 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
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
- Node.js >= 20.9.0
- npm or compatible package manager
npm install --global clementine
# 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
# Start Clementine
clementine
# Start with verbose logging
clementine --verbose
$ clementine --help
Usage
$ clementine
Options
--verbose, -v Show detailed output
--help Show help
Examples
$ clementine --verbose
- 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
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
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
MIT License - see LICENSE file for details.