Skip to main content

Mtrini IDE 2.0 - Sovereign Local AI Coding Agent by Oryvia Labs

Project description

Mtrini Studio

Python Version Local AI PyPI

Sovereign, local-first AI coding agent by Oryvia Labs. 100% local. Zero cloud. Zero subscriptions.


Free Tier

Mtrini Studio is free forever with 2 powerful AI models:

Model Size Best For
Mtrini Coder 2.0 ~2.2 GB Fast code completion, refactoring, debugging
Mtrini Life 2.0 ~1.8 GB General assistant, writing, explanations

No API key needed. No account required. No telemetry.


Quickstart

Install

pip install mtrinicli

Launch

mtrini              # Launch TUI (default)
mtrini --cli        # Launch CLI mode
mtrini --web        # Launch web server
mtrini --setup      # First-time setup wizard

Or run directly

python mtrini_ide.py
python mtrini_ide.py --cli
python mtrini_ide.py --setup

What You Get

  • Local AI Agent - Reads, writes, and edits your code using local LLMs
  • Plan & Build Modes - Read-only analysis or full file system access
  • 8 Built-in Tools - Bash, read, write, edit, grep, glob, web search, web fetch
  • BYOK Support - Use OpenAI, Anthropic, Google, Ollama, or any OpenAI-compatible API
  • Desktop App - Native Electron window with dark glassmorphism UI
  • MCP Integration - Connect external tool servers
  • Cascade Fallback - Auto-downgrades models if your hardware can't handle the big ones

BYOK (Bring Your Own Key)

Use any LLM provider via the OpenAI-compatible API format:

Local Providers (Free, No API Key)

Provider URL
Mtrini (Default) localhost:8080
Ollama localhost:11434
LM Studio localhost:1234
llama.cpp localhost:8080

Cloud Providers (API Key Required)

Provider Models
OpenAI GPT-4o, GPT-4o-mini, o1, o3-mini
Anthropic Claude Sonnet 4, Claude Opus 4
Google Gemini Gemini 2.5 Flash, Gemini 2.5 Pro
Groq Llama 3.3 70B, Mixtral 8x7B
Together AI Llama 3.3 70B, Qwen 2.5 Coder 32B
DeepSeek DeepSeek Chat, DeepSeek Coder
OpenRouter 100+ models gateway

Architecture

mtrini-ide/
├── providers/          # BYOK provider system
│   ├── base.py         # BaseProvider abstract class
│   ├── openai_compat.py # Universal OpenAI-compatible adapter
│   ├── registry.py     # Provider registry + health checks
│   └── vault.py        # Encrypted API key storage
├── tools/              # Agent tool system
│   ├── base.py         # BaseTool with permission system
│   ├── registry.py     # Tool registry + execution
│   ├── bash.py         # Shell command execution
│   ├── read_file.py    # File reading with line numbers
│   ├── write_file.py   # File writing with auto-mkdir
│   ├── edit_file.py    # String replacement with diff preview
│   ├── grep.py         # Regex search (ripgrep + fallback)
│   ├── glob.py         # File pattern matching
│   ├── websearch.py    # DuckDuckGo web search
│   └── webfetch.py     # URL content fetching
├── engine/             # Agent loop engine
│   ├── agent.py        # Core agent loop (plan/build modes)
│   └── context.py      # Context window management
├── desktop/            # Electron desktop app
│   ├── main.js         # Electron main process
│   ├── preload.js      # Secure bridge
│   └── renderer/       # Frontend HTML/CSS/JS
├── app/                # FastAPI backend
│   ├── main.py         # OpenAI-compatible API server
│   ├── model.py        # llama-server process manager
│   └── mcp_manager.py  # MCP tool integration
├── models/             # Local GGUF model files
├── mtrini_ide.py       # Main entry point
└── config.yaml         # Configuration

Agent Modes

Plan Mode (Read-Only)

/plan    # Switch to plan mode
  • Analyzes code without making changes
  • Proposes implementation plans
  • Identifies risks and edge cases

Build Mode (Full Access)

/build   # Switch to build mode (default)
  • Reads, writes, and edits files
  • Runs shell commands
  • Full tool access with permission controls

Tool System

Tool Permission Description
bash ask Execute shell commands
read allow Read file contents
write ask Create/overwrite files
edit ask String replacement with diff
grep allow Regex content search
glob allow File pattern matching
websearch allow Web search via DuckDuckGo
webfetch allow Fetch URL content

Slash Commands

Command Description
/help Show all commands
/clear Clear chat history
/plan Switch to plan mode
/build Switch to build mode
/provider NAME Set active provider
/model NAME Set active model
/stats Show session statistics
/undo Undo last response
/support Support the project
/exit Exit the IDE

Desktop App

cd desktop
npm install
npm start

Features:

  • Native window with hidden title bar
  • File tree sidebar
  • Dark glassmorphism UI
  • Settings panel for provider configuration
  • System integration (menus, keyboard shortcuts)

Privacy & Security

  • 100% Local: All inference runs on your hardware
  • Encrypted Keys: API keys stored with XOR encryption in ~/.mtrini/vault.enc
  • No Telemetry: Zero data sent to external servers
  • Permission Controls: Granular tool permissions per session

Support the Project

If you enjoy Mtrini Studio, consider supporting its development:

Your support helps keep Mtrini free and maintained.


About Oryvia Labs

Built by Oryvia Labs, founded by Ayham Habbad based in Salé, Morocco.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mtrinicli-2.0.0.tar.gz (39.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mtrinicli-2.0.0-py3-none-any.whl (40.3 MB view details)

Uploaded Python 3

File details

Details for the file mtrinicli-2.0.0.tar.gz.

File metadata

  • Download URL: mtrinicli-2.0.0.tar.gz
  • Upload date:
  • Size: 39.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for mtrinicli-2.0.0.tar.gz
Algorithm Hash digest
SHA256 acd433f08ced26a1d9ea6f3e861e04fa006460e89331a5d77f5147c42831da58
MD5 eb5cd831b6e82183697d05623a0fd47f
BLAKE2b-256 e81af80528752d885e30fc1f4f8780dd7822d3c7e2aab964d3009912eb73844e

See more details on using hashes here.

File details

Details for the file mtrinicli-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: mtrinicli-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 40.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for mtrinicli-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 938d14bf773b863ff39e53c8a57ad1c2f18acb25526e163a0836b1c433e9dba1
MD5 578fb7fc09ffb675c88810f0f7e85db8
BLAKE2b-256 519ad3d0419a68d454482fb72229f8590b5446abf00138e7efc038f16b9e737e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page