@pheem49/mint 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -173
- package/mint-cli-logic.js +2 -7
- package/mint-cli.js +210 -191
- package/package.json +1 -1
- package/src/AI_Brain/agent_orchestrator.js +6 -6
- package/src/Automation_Layer/file_operations.js +14 -3
- package/src/CLI/chat_router.js +18 -5
- package/src/CLI/chat_ui.js +163 -34
- package/src/CLI/code_agent.js +230 -86
- package/src/CLI/list_features.js +3 -1
- package/src/System/config_manager.js +1 -1
package/README.md
CHANGED
|
@@ -5,50 +5,48 @@
|
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
<strong>Desktop
|
|
8
|
+
<strong>The Unified AI Desktop Assistant & Agentic Coding CLI. Built for speed, power, and local control.</strong>
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
12
|
<img src="https://img.shields.io/badge/License-AGPL--3.0-blue?style=for-the-badge" alt="License">
|
|
13
13
|
<img src="https://img.shields.io/badge/Node.js-LTS-green?style=for-the-badge&logo=node.js" alt="Node.js">
|
|
14
14
|
<img src="https://img.shields.io/badge/Electron-40.x-47848F?style=for-the-badge&logo=electron" alt="Electron">
|
|
15
|
-
<img src="https://img.shields.io/badge/CLI-
|
|
15
|
+
<img src="https://img.shields.io/badge/CLI-Unified_Agent-orange?style=for-the-badge" alt="CLI Agentic">
|
|
16
16
|
</p>
|
|
17
17
|
|
|
18
|
-
Mint is an AI assistant
|
|
18
|
+
Mint is an advanced AI assistant designed to live in your workspace. It features a rich Electron desktop interface for day-to-day assistance and a powerful, unified CLI agent that seamlessly merges conversational chat with complex coding tasks.
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
- A terminal-first CLI with a workspace-aware coding agent
|
|
20
|
+
## 🌟 What's New in v1.4.1
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
- **Unified Agent Loop:** No more switching modes. Every interaction in the CLI is now handled by a sophisticated agent that can think, plan, and execute tools autonomously.
|
|
23
|
+
- **Agentic Web Search:** Mint can now search the internet in real-time to answer questions with the latest information using integrated web tools.
|
|
24
|
+
- **Upgraded TUI:** A redesigned terminal interface featuring a Braille spinner, thinking timer, and a cleaner "✓ ActionName" logging style.
|
|
25
|
+
- **Interactive "Ask User":** The agent can now pause and ask you for clarification or preferences during complex multi-step tasks.
|
|
26
|
+
- **Enhanced System Control:** Reliable multi-fallback support for opening files, folders, and applications on Linux (Pop!_OS/Ubuntu), macOS, and Windows.
|
|
24
27
|
|
|
25
|
-
##
|
|
28
|
+
## 🚀 Key Features
|
|
26
29
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
- Perform a second-pass reviewer step in Code Mode
|
|
34
|
-
- Execute structured actions such as opening apps, URLs, folders, and system tasks
|
|
35
|
-
- Support multiple providers: Gemini, Anthropic, OpenAI, local OpenAI-compatible endpoints, Ollama, and Hugging Face
|
|
30
|
+
### 💻 Unified CLI Agent
|
|
31
|
+
Mint CLI is not just a chat wrapper; it's a full agentic workflow.
|
|
32
|
+
- **Think & Plan:** Every response starts with a reasoning phase where Mint plans its next move.
|
|
33
|
+
- **Autonomous Tools:** `web_search`, `list_files`, `read_file`, `search_code`, `run_shell`, `apply_patch`, `write_file`, `open_folder`, and more.
|
|
34
|
+
- **User-in-the-Loop:** Safety first. Mint asks for your approval before running shell commands or making file edits.
|
|
35
|
+
- **Workspace Aware:** Automatically understands your project structure, git status, and testing framework.
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
### 🖥️ Desktop Assistant
|
|
38
|
+
- **Screen Vision:** Capture and analyze your screen for instant help with what you're looking at.
|
|
39
|
+
- **Real-time Translation:** Instantly translate text from your screen into Thai or English.
|
|
40
|
+
- **Proactive Engine:** Mint monitors your system events to provide helpful suggestions before you even ask.
|
|
41
|
+
- **System Tray & Floating Widgets:** Quick access to Mint from anywhere on your desktop.
|
|
38
42
|
|
|
39
|
-
|
|
43
|
+
### 🛠️ Multi-Provider Support
|
|
44
|
+
Mint supports the latest LLMs and local backends:
|
|
45
|
+
- **Cloud:** Gemini 1.5/2.0 Pro & Flash, Anthropic Claude 3.5, OpenAI GPT-4o.
|
|
46
|
+
- **Local:** Ollama, LM Studio, Hugging Face Inference API.
|
|
47
|
+
- **MCP:** Full support for Model Context Protocol to extend Mint's capabilities with external tools.
|
|
40
48
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- Decide on the next step from the current observation
|
|
44
|
-
- Use tools in a loop: `list_files`, `read_file`, `search_code`, `run_shell`, `apply_patch`, `write_file`
|
|
45
|
-
- Observe tool output and continue iterating
|
|
46
|
-
- Stop with a summary and verification result
|
|
47
|
-
- Ask for approval before shell commands and file changes
|
|
48
|
-
|
|
49
|
-
That makes Mint a practical CLI coding agent, while still keeping the user in control of risky actions.
|
|
50
|
-
|
|
51
|
-
## Screenshots
|
|
49
|
+
## 📸 Screenshots
|
|
52
50
|
|
|
53
51
|
<p align="center">
|
|
54
52
|
<img src="assets/Agent_Mint.png" alt="Mint Desktop UI" width="48%">
|
|
@@ -59,186 +57,97 @@ That makes Mint a practical CLI coding agent, while still keeping the user in co
|
|
|
59
57
|
<img src="assets/CLI_Screen.png" alt="Mint CLI" width="100%">
|
|
60
58
|
</p>
|
|
61
59
|
|
|
62
|
-
## Installation
|
|
63
|
-
|
|
64
|
-
### Global install
|
|
60
|
+
## 📦 Installation
|
|
65
61
|
|
|
62
|
+
### Global Install
|
|
66
63
|
```bash
|
|
67
64
|
npm install -g @pheem49/mint@latest
|
|
68
65
|
```
|
|
69
66
|
|
|
70
|
-
### Local
|
|
71
|
-
|
|
67
|
+
### Local Development
|
|
72
68
|
```bash
|
|
73
69
|
git clone https://github.com/Pheem49/Mint.git
|
|
74
70
|
cd Mint
|
|
75
71
|
npm install
|
|
76
72
|
```
|
|
77
73
|
|
|
78
|
-
## Quick Start
|
|
74
|
+
## ⚡ Quick Start
|
|
79
75
|
|
|
80
|
-
|
|
76
|
+
1. **Setup Mint:**
|
|
77
|
+
```bash
|
|
78
|
+
mint onboard
|
|
79
|
+
```
|
|
80
|
+
2. **Start Chatting:**
|
|
81
|
+
```bash
|
|
82
|
+
mint
|
|
83
|
+
```
|
|
84
|
+
3. **Run the Desktop App:**
|
|
85
|
+
```bash
|
|
86
|
+
npm start
|
|
87
|
+
```
|
|
81
88
|
|
|
82
|
-
|
|
83
|
-
npm start
|
|
84
|
-
```
|
|
89
|
+
## ⌨️ CLI Commands
|
|
85
90
|
|
|
86
|
-
|
|
91
|
+
- `mint` / `mint chat` : Start the unified interactive agent UI.
|
|
92
|
+
- `mint code "<task>"` : Run a specific coding task in the current workspace.
|
|
93
|
+
- `mint task "<task>"` : Queue a background task for the headless agent.
|
|
94
|
+
- `mint mcp` : Manage Model Context Protocol (MCP) servers.
|
|
95
|
+
- `mint list` : Display all available features and commands.
|
|
87
96
|
|
|
88
|
-
|
|
89
|
-
mint
|
|
90
|
-
```
|
|
97
|
+
## 🔌 MCP Management (Extensions)
|
|
91
98
|
|
|
92
|
-
|
|
99
|
+
Mint supports the **Model Context Protocol (MCP)**, allowing you to extend its capabilities via the CLI without manual config editing.
|
|
93
100
|
|
|
101
|
+
### Add a New Server
|
|
94
102
|
```bash
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
## CLI Commands
|
|
99
|
-
|
|
100
|
-
- `mint` or `mint chat`
|
|
101
|
-
Start the interactive chat UI.
|
|
102
|
-
|
|
103
|
-
- `mint code "<task>"`
|
|
104
|
-
Run the workspace-aware coding agent in the current directory.
|
|
105
|
-
|
|
106
|
-
- `mint task "<task>"`
|
|
107
|
-
Queue a background task for the headless agent.
|
|
103
|
+
# Template
|
|
104
|
+
mint mcp add <name> <command> --args <args...> --env <KEY=VALUE>
|
|
108
105
|
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
# Example: Google Search
|
|
107
|
+
mint mcp add google-search npx --args -y @modelcontextprotocol/server-google-search --env GOOGLE_API_KEY=your_key GOOGLE_SEARCH_ENGINE_ID=your_id
|
|
111
108
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
- `mint onboard`
|
|
116
|
-
Configure API keys and local settings.
|
|
117
|
-
|
|
118
|
-
## CLI Examples
|
|
119
|
-
|
|
120
|
-
### Interactive chat
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
mint
|
|
109
|
+
# Example: Filesystem Access
|
|
110
|
+
mint mcp add my-files npx --args -y @modelcontextprotocol/server-filesystem /path/to/folder
|
|
124
111
|
```
|
|
125
112
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
สำรวจโปรเจคนี้ให้หน่อย
|
|
130
|
-
แก้บัคใน CLI ตัวนี้และรันเทสต์
|
|
131
|
-
open github
|
|
113
|
+
### List Configured Servers
|
|
114
|
+
```bash
|
|
115
|
+
mint mcp list
|
|
132
116
|
```
|
|
133
117
|
|
|
134
|
-
###
|
|
135
|
-
|
|
118
|
+
### Remove a Server
|
|
136
119
|
```bash
|
|
137
|
-
mint
|
|
120
|
+
mint mcp remove google-search
|
|
138
121
|
```
|
|
139
122
|
|
|
140
|
-
###
|
|
141
|
-
|
|
123
|
+
### Clear All Servers
|
|
142
124
|
```bash
|
|
143
|
-
mint
|
|
125
|
+
mint mcp clear
|
|
144
126
|
```
|
|
145
127
|
|
|
146
|
-
##
|
|
147
|
-
|
|
148
|
-
Mint Code Mode is designed around an inspect -> act -> verify loop.
|
|
149
|
-
|
|
150
|
-
What it does well right now:
|
|
151
|
-
|
|
152
|
-
- Understand the current workspace path
|
|
153
|
-
- Read git status and diff summary
|
|
154
|
-
- Suggest verification commands from `package.json`
|
|
155
|
-
- Apply focused patches instead of blind rewrites
|
|
156
|
-
- Keep a workspace session summary for future tasks
|
|
157
|
-
|
|
158
|
-
What it deliberately does not do:
|
|
159
|
-
|
|
160
|
-
- Run destructive commands like `rm -rf` or `git reset --hard`
|
|
161
|
-
- Edit files outside the current workspace
|
|
162
|
-
- Execute shell edits without approval
|
|
163
|
-
|
|
164
|
-
## Desktop Features
|
|
165
|
-
|
|
166
|
-
- Chat window with custom UI
|
|
167
|
-
- Settings window for provider and behavior configuration
|
|
168
|
-
- System tray support
|
|
169
|
-
- Proactive suggestion loop
|
|
170
|
-
- Silent screen capture for analysis
|
|
171
|
-
- Screen translation support
|
|
172
|
-
- Floating widget / overlay UI elements
|
|
173
|
-
|
|
174
|
-
## AI Providers
|
|
175
|
-
|
|
176
|
-
Mint supports multiple providers and local backends.
|
|
177
|
-
|
|
178
|
-
- `gemini`
|
|
179
|
-
- `anthropic`
|
|
180
|
-
- `openai`
|
|
181
|
-
- `local_openai`
|
|
182
|
-
- `ollama`
|
|
183
|
-
- `huggingface`
|
|
184
|
-
|
|
185
|
-
For CLI Code Mode, Mint currently behaves best with:
|
|
186
|
-
|
|
187
|
-
- `gemini`
|
|
188
|
-
- `anthropic`
|
|
189
|
-
- `openai`
|
|
190
|
-
- `local_openai`
|
|
191
|
-
|
|
192
|
-
## Project Structure
|
|
128
|
+
## 🏗️ Project Structure
|
|
193
129
|
|
|
194
130
|
```text
|
|
195
131
|
Mint/
|
|
196
132
|
├── src/
|
|
197
|
-
│ ├── AI_Brain/ #
|
|
198
|
-
│ ├── Automation_Layer/ #
|
|
199
|
-
│ ├── CLI/ #
|
|
200
|
-
│ ├── Plugins/ #
|
|
201
|
-
│ ├── System/ # Config,
|
|
202
|
-
│ └── UI/ # Electron
|
|
203
|
-
├──
|
|
204
|
-
├── mint-cli.js # Main CLI entry
|
|
205
|
-
├── mint-cli-logic.js # CLI action executor
|
|
206
|
-
├── main.js # Electron main process
|
|
133
|
+
│ ├── AI_Brain/ # Gemini API, Unified Agent Client, Memory Store
|
|
134
|
+
│ ├── Automation_Layer/ # File Ops, Browser Automation, System Control
|
|
135
|
+
│ ├── CLI/ # TUI logic, Chat Router, Code Agent
|
|
136
|
+
│ ├── Plugins/ # MCP Manager, System Monitor, Third-party integrations
|
|
137
|
+
│ ├── System/ # Config, Notifications, Daemons
|
|
138
|
+
│ └── UI/ # Electron Renderer, Settings, Widgets
|
|
139
|
+
├── mint-cli.js # Main CLI entry point
|
|
207
140
|
└── package.json
|
|
208
141
|
```
|
|
209
142
|
|
|
210
|
-
##
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
```bash
|
|
215
|
-
npm test -- --runInBand
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### Watch tests
|
|
219
|
-
|
|
220
|
-
```bash
|
|
221
|
-
npm run test:watch
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
### Build Linux packages
|
|
225
|
-
|
|
226
|
-
```bash
|
|
227
|
-
npm run build:linux
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
See [BUILD_AND_RELEASE.md](/home/pheem49/vscode/Project/Mint/BUILD_AND_RELEASE.md) for Linux packaging and release notes workflow.
|
|
231
|
-
|
|
232
|
-
## Security Notes
|
|
233
|
-
|
|
234
|
-
- API keys are stored in local config, not in source files
|
|
235
|
-
- Code Mode asks for approval before shell commands and file edits
|
|
236
|
-
- Workspace path resolution blocks writes outside the active workspace
|
|
237
|
-
- Several shell-based execution paths have been hardened to use argument-based process execution
|
|
238
|
-
|
|
239
|
-
This is still an actively evolving project. Review permissions and local configuration before using Mint against sensitive files or production systems.
|
|
143
|
+
## 🛡️ Security & Privacy
|
|
144
|
+
- **Local Control:** Mint prioritizes local execution and user privacy.
|
|
145
|
+
- **Approval System:** No destructive command or file change happens without your explicit `y/n` confirmation.
|
|
146
|
+
- **Secure Config:** API keys are stored locally on your machine and never transmitted outside of the chosen AI provider.
|
|
240
147
|
|
|
241
|
-
## License
|
|
148
|
+
## 📜 License
|
|
149
|
+
Mint is licensed under the **GNU Affero General Public License v3.0**.
|
|
150
|
+
See the [LICENSE](LICENSE) file for more details.
|
|
242
151
|
|
|
243
|
-
|
|
244
|
-
|
|
152
|
+
---
|
|
153
|
+
<p align="center">Made with 💚 by <a href="https://github.com/Pheem49">Pheem49</a></p>
|
package/mint-cli-logic.js
CHANGED
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
const { openApp } = require('./src/Automation_Layer/open_app');
|
|
3
3
|
const { openWebsite, openSearch } = require('./src/Automation_Layer/open_website');
|
|
4
4
|
const { createFolder, openFile, deleteFile, findPath } = require('./src/Automation_Layer/file_operations');
|
|
5
|
-
const { indexFile } = require('./src/AI_Brain/knowledge_base');
|
|
6
|
-
const SystemAutomation = require('./src/System/system_automation');
|
|
7
|
-
const pluginManager = require('./src/Plugins/plugin_manager');
|
|
8
5
|
|
|
9
6
|
async function executeAction(action) {
|
|
10
7
|
if (!action || action.type === 'none') return null;
|
|
@@ -24,11 +21,9 @@ async function executeAction(action) {
|
|
|
24
21
|
createFolder(action.target);
|
|
25
22
|
return `Created folder: ${action.target}`;
|
|
26
23
|
case 'open_file':
|
|
27
|
-
await openFile(action.target);
|
|
28
|
-
return `Opening: ${action.target}`;
|
|
29
24
|
case 'open_folder':
|
|
30
|
-
await openFile(action.target);
|
|
31
|
-
return `Opening
|
|
25
|
+
const res = await openFile(action.target);
|
|
26
|
+
return res === true ? `Opening: ${action.target}` : res;
|
|
32
27
|
case 'delete_file':
|
|
33
28
|
await deleteFile(action.target);
|
|
34
29
|
return `Deleted: ${action.target}`;
|