Package Exports
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 (@indiccoder/mentis-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Mentis-CLI π§
An Agentic, Multi-Model CLI Coding Assistant.
Mentis is a powerful terminal-based AI coding assistant that lives in your command line. It supports multiple LLM providers (Gemini, Ollama, OpenAI), agentic file operations, MCP (Model Context Protocol), and more.
β¨ Features
- π€ Multi-Model Support: Switch seamlessly between Gemini, Ollama (Local), and OpenAI.
- π οΈ Agentic Capabilities: Mentis can read, write, list files, and search your codebase to understand context.
- π Web Intelligence: Hybrid Google + DuckDuckGo search for documentation and error fixing (Zero-Config).
- πΊοΈ Smart Context: Automatically maps your repository structure for better spatial awareness.
- π° Cost Awareness: Real-time token usage and cost estimation displayed after every response.
- π§ Persistent Memory: Auto-saves sessions (
/resume) and supports manual checkpoints (/checkpoint). - π MCP Support: Full Model Context Protocol client. Connect external tools like databases or memory servers.
- π Codebase Search: Built-in
greptool to find code across your project. - π Shell Integration: Run shell commands (
/run) and commit changes (/commit) directly from the agent. - π¨ Premium UI: Beautiful terminal interface with modes (
PLANvsBUILD).
π Installation
From GitHub (Recommended)
You can install Mentis directly from the repository, ensuring you always get the latest version (bypassing NPM delays).
npm install -g git+https://github.com/CoderVLSI/Mentis-CLI.gitFrom Source (Dev)
git clone https://github.com/CoderVLSI/Mentis-CLI.git
cd Mentis-CLI
npm install
npm run build
npm linkβοΈ Configuration
Start Mentis by typing:
mentisSetting up Models
Type /model inside the CLI to launch the interactive configuration wizard:
- Select Provider: Gemini, Ollama, or OpenAI.
- Select Model: e.g.,
gemini-2.5-flash,llama3. - Enter Credentials: API Key (for cloud) or Base URL (for local).
Credentials are stored securely in ~/.mentisrc.
π Usage
Modes
- /plan: Switch to high-level planning mode (Architecture, requirements).
- /build: Switch to code generation mode (Implementation).
Commands
| Command | Description |
|---|---|
/help |
Show available commands |
/model |
Configure AI provider and model (Interactive) |
/resume |
Resume the last session |
/checkpoint |
Manage saved sessions (save, load, list) |
/search <query> |
Search for code in the current directory |
/mcp connect <cmd> |
Connect an MCP Server (e.g., npx -y @modelcontextprotocol/server-time) |
/run <cmd> |
Execute a shell command |
/commit [msg] |
Stage and commit changes to Git |
/add <file> |
Add a specific file to context |
/drop <file> |
Remove a file from context |
/clear |
Clear chat history |
/exit |
Save and exit |
Example Workflow
Mentis > /plan
[PLAN] > Analyze this project structure and suggest improvements.
Mentis > /build
[BUILD] > Implement the FolderManager class in src/utils.ts.π Safety
Mentis asks for explicit approval before writing or modifying any files, keeping you in control.
π€ Contributing
Pull requests are welcome!
π License
ISC