min-agent 2.0.0 → 3.2.2609221209

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 CHANGED
@@ -39,11 +39,14 @@ min-agent # start chatting (built-in OpenRouter model, preset)
39
39
  min-agent models # list models (always openrouter/free)
40
40
  ```
41
41
 
42
+ `min` is available as a shorter alias with identical functionality (`min "..."`, `min serve`, ...).
43
+
42
44
  ## Usage
43
45
 
44
46
  ```bash
45
47
  min-agent "your message" # start a session and send a message
46
48
  min-agent exec "your message" # one-shot question, then exit
49
+ min-agent push # shortcut: git commit and push your changes
47
50
  min-agent --resume <id> # resume a previous session
48
51
  min-agent history # list saved sessions
49
52
  min-agent -i photo.png "..." # attach an image
@@ -105,7 +108,7 @@ min-agent setup # add your own provider (interactive)
105
108
 
106
109
  The preset itself can't be edited or switched away from, but you can always **add** your own provider — once you add one it takes over automatically. `min-agent provider <name>` switches the active provider (add/edit/remove go through `min-agent setup`). Set `MIN_AGENT_NO_BUILTIN_PROVIDER=1` to disable the preset entirely.
107
110
 
108
- Settings live in `~/.min-agent/config.json` (global). For per-project settings, run `min-agent init` to create `.min-agent/config.json`.
111
+ Settings live in `~/.min-agent/config.json` (global). Per-project settings go to `~/.min-agent/sessions/<project-key>/config.json` (auto-created; nothing is written inside the project directory).
109
112
 
110
113
  ## Extending It
111
114
 
@@ -143,11 +146,14 @@ min-agent # 开始对话(内置 OpenRouter 模型,已预设)
143
146
  min-agent models # 查看模型(始终为 openrouter/free)
144
147
  ```
145
148
 
149
+ `min` 是等价的短命令,功能完全相同(`min "..."`、`min serve` 等)。
150
+
146
151
  ## 基本用法
147
152
 
148
153
  ```bash
149
154
  min-agent "你的消息" # 进入交互会话并立即发送消息
150
155
  min-agent exec "你的消息" # 单次提问后自动退出
156
+ min-agent push # 快捷指令:git 提交并推送代码
151
157
  min-agent --resume <id> # 恢复之前的会话
152
158
  min-agent history # 查看已保存的会话
153
159
  min-agent -i photo.png "..." # 为一条消息附带图片
@@ -211,7 +217,7 @@ min-agent setup # 添加自己的服务商(交互式)
211
217
 
212
218
  预设本身不可编辑,也不能切换或删除,但你随时可以**添加**自己的服务商——添加后它会自动接管。`min-agent provider <name>` 切换当前服务商(增、删、改走 `min-agent setup`)。设置 `MIN_AGENT_NO_BUILTIN_PROVIDER=1` 可彻底关闭预设。
213
219
 
214
- 配置保存在 `~/.min-agent/config.json`(全局生效)。项目级配置用 `min-agent init` 创建 `.min-agent/config.json`,仅对该项目生效。
220
+ 配置保存在 `~/.min-agent/config.json`(全局生效)。项目级配置保存在 `~/.min-agent/sessions/<project-key>/config.json`(自动创建,不会在项目目录里生成任何文件),仅对该项目生效。
215
221
 
216
222
  ## 扩展能力
217
223
 
@@ -223,6 +229,36 @@ min-agent setup # 添加自己的服务商(交互式)
223
229
 
224
230
  `min-agent serve` 可启动本地 HTTP API 服务,供其他应用调用。完整说明见 [docs/API.md](docs/API.md)
225
231
 
232
+ ## 网页版
233
+
234
+ ```bash
235
+ min-agent web
236
+ ```
237
+
238
+ 启动 HTTP API 并附带网页版对话助手(默认 <http://127.0.0.1:8787>),浏览器打开即用,无需 CORS 或令牌配置。网页版支持:
239
+
240
+ - 流式对话、思考过程与工具调用展示、图片粘贴/上传
241
+ - 会话管理:历史列表、重命名、删除、撤销最后一轮、压缩历史
242
+ - 设置页(完整覆盖 CLI 配置,无需命令行即可修改):
243
+ - 服务商:添加/编辑/删除/切换,含 API Key、类型与上下文窗口
244
+ - 模型:默认模型(全局/项目作用域)、本次会话模型、Ollama 上下文档位
245
+ - Skills:启用/禁用(全局/项目)、查看详情、新建、重新扫描、孤儿引用清理
246
+ - MCP:添加/编辑/删除、启用/禁用、连接状态与工具列表
247
+ - 记忆:开关、条目增删与搜索、全局/项目作用域
248
+ - 规则:全局与项目规则文件在线编辑,保存即刻生效
249
+ - 行为与隔离:思考强度、确认模式、沙箱级别/联网/目录白名单
250
+ - 危险操作确认与代理提问的交互回复(开启输入框的「确认」模式)
251
+ - 明暗主题、移动端适配
252
+
253
+ `--host` / `--port` 与 `serve` 相同。产物缺失时先在仓库内执行 `bun run build:web`(npm 发布包已内置),或用 `MIN_AGENT_WEB_DIST` 指定产物目录。
254
+
255
+ 后台运行与停止:
256
+
257
+ ```bash
258
+ min-agent web -d # 后台运行(日志: ~/.min-agent/serve.log)
259
+ min-agent web --stop # 停止后台服务
260
+ ```
261
+
226
262
  ## License
227
263
 
228
264
  MIT