mistral-code
v0.0.0
Published
A CLI agent powered by Mistral AI
Readme
A CLI agent powered by Mistral AI, similar to Claude Code. Interact with an AI assistant through a simple command-line interface that understands your codebase and helps with software engineering tasks.
🎥 Demo

How it works
📋 Plan mode
- Create step-by-step plans before making changes
- Read-only mode that explores your codebase without modifications
- Review and approve plans before implementation
- Use
/plan <message>to enter plan mode, then/approveto start implementation
🛠️ Tools
- Read files - Understand code and examine file contents
- List directories - Explore codebase structure
- Edit files - Make precise code changes with string replacement
- Run commands - Execute shell commands, run tests, install dependencies, and more
🚀 Getting started
Prerequisites
- Node.js (v20 or higher)
- A Mistral API key (get one here)
Installation
Install dependencies:
npm installSet up your API key:
Create a
.envfile in the root directory:echo "MISTRAL_API_KEY=your_api_key_here" > .envOr export it as an environment variable:
export MISTRAL_API_KEY=your_api_key_hereRun the CLI:
npm run dev
📖 Usage
Once running, you can interact with Mistral Code in several ways:
Basic interaction
- Type any message to chat with the agent
- Ask questions about your codebase
- Request code changes, bug fixes, or new features
Commands
help- Show available commands and usageclear- Clear conversation historyexitorquit- Exit the CLI
Plan mode
Plan mode lets you create a detailed plan before making any changes:
Enter plan mode:
/plan Create a new React component for user authenticationReview the plan: The agent will explore your codebase and create a step-by-step plan without making changes.
Approve and implement:
/approveThis exits plan mode and starts implementation.
Update the plan: While in plan mode, you can type additional messages to refine the plan before approval.
📝 License
MIT
