npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@within-7/minto

v0.3.10

Published

AI-powered strategic research and planning assistant

Readme

Minto - AI 战略研究规划助手

私有仓库 - within-7


目录


概述

Minto 是一个强大的 AI 战略研究规划助手。它通过智能对话和专业代理,促进战略思维、协调研究计划、编排规划工作流。

⚠️ 安全提示: Minto 默认运行在 YOLO 模式(跳过权限检查以获得最高生产力)。对于敏感的战略项目,请使用 minto --safe 启用所有操作的手动批准。


特性

🤖 多模型 AI 支持

  • 20+ AI 模型: Claude (Sonnet, Opus, Haiku)、GPT-4、GPT-3.5、Gemini、DeepSeek 等
  • 模型切换: 对话中随时切换模型而不丢失上下文
  • 模型配置: 针对不同任务优化的配置(编码、推理、快速响应)

🎯 智能代理系统

  • 动态代理: 针对不同任务的专业 AI 代理(战略分析、研究协调、规划等)
  • 代理编排: 代理可以调用其他代理解决复杂战略挑战
  • 自定义代理: 使用简单的 Markdown 文件创建自己的代理
  • 5 层优先级: 内置 → 用户全局 → 项目本地 → 插件捆绑

🔌 可扩展插件系统

  • 插件市场: 一条命令安装社区插件
  • 插件组件: 代理、命令、技能、Hooks 和 MCP 服务器
  • Claude Code 兼容: 与 Claude Code 插件生态系统兼容
  • 简易开发: 使用简单的配置文件创建插件

📦 MCP(模型上下文协议)集成

  • 4 种传输类型: stdio、SSE、WebSocket、HTTP
  • 内置服务器: 文件系统、Git、数据库、搜索等
  • 自定义服务器: 连接任何 MCP 兼容服务
  • 工具自动发现: 自动向 AI 模型暴露 MCP 工具

💼 双模式压缩

  • 业务模式: 9 节压缩,适用于战略咨询和分析
  • 研究模式: 8 节压缩,针对研究规划优化
  • 智能自动压缩: 智能管理上下文窗口

🎨 精美终端界面

  • 交互式界面: 使用 React Ink 构建
  • 实时流式输出: 实时查看 AI 响应
  • 语法高亮: 支持语言特定的代码高亮
  • 丰富格式: 表格、列表和格式化输出

安装

前置要求

  • Node.js >= 20.18.1
  • Bun(推荐)或 npm/yarn
  • 所选 AI 模型的 API 密钥

从源码安装

# 克隆仓库
git clone <repository-url>
cd minto

# 安装依赖
bun install

# 构建 CLI
bun run build

# 全局链接
bun link

# 验证安装
minto --version

快速安装(团队成员)

# 解压包
tar -xzf minto-team-*.tar.gz
cd minto-team-*

# 运行安装脚本
./install.sh

# 开始使用
minto

快速开始

1. 配置 API 密钥

创建 ~/.minto.json:

{
  "mainModel": "claude-sonnet-4",
  "models": {
    "claude-sonnet-4": {
      "provider": "anthropic",
      "model": "claude-sonnet-4-20250514",
      "apiKey": "your-anthropic-api-key"
    }
  }
}

或者设置环境变量:

export ANTHROPIC_API_KEY="your-key-here"
export OPENAI_API_KEY="your-key-here"

2. 启动 Minto

# 在当前目录启动
minto

# 或使用安全模式
minto --safe

# 指定模型
minto --model gpt-4-turbo

3. 尝试基础命令

# 在 Minto 会话中:
> "分析这个项目的结构"
> "创建一个名为 UserProfile 的新 React 组件"
> "为 src/utils/helper.ts 编写单元测试"
> "解释这个函数的作用" (在代码文件中)

核心概念

代理(Subagents)

代理是专业的 AI 助手,擅长特定任务。每个代理具有:

  • 专注的专业知识
  • 自定义系统提示
  • 受限的工具访问(安全性)
  • 可选的首选 AI 模型

代理目录结构

Minto 使用基于优先级的目录系统,其中 .minto 目录具有更高优先级:

# 目录优先级(从低到高):
~/.claude/agents/          # Claude Code 兼容性(兼容)
~/.minto/agents/           # 用户级代理(主要)
./.claude/agents/          # 项目级(兼容)
./.minto/agents/           # 项目级代理(最高优先级)
plugins/*/agents/          # 插件捆绑代理

要点

  • ✅ 新代理默认创建在 .minto/agents/
  • .minto/ 中的代理会覆盖 .claude/ 中的同名代理
  • ✅ 完全兼容 Claude Code 的 .claude/ 目录

创建代理

创建 ~/.minto/agents/code-reviewer.md:

---
name: code-reviewer
description: 专注于最佳实践、安全性和性能的专家级代码审查
tools: ["FileRead", "Grep", "Glob"]
model: claude-sonnet-4
---

你是一位专家级代码审查员。分析代码时:

1. 检查安全漏洞
2. 识别性能问题
3. 建议可读性改进
4. 验证最佳实践
5. 寻找潜在 bug

始终提供具体、可操作的反馈和代码示例。

使用代理

# 方法 1: 直接调用
/task code-reviewer "审查 src/auth.ts"

# 方法 2: 自然语言
"使用 code-reviewer 代理分析我的认证代码"

# 方法 3: 列出可用代理
/agents

代理配置

.minto.json 中:

{
  "// Agent Directories": "优先级:后者覆盖前者(.minto > .claude)",
  "agentDirectories": [
    "~/.claude/agents",    // 兼容:Claude Code 用户目录
    "~/.minto/agents",     // 主要:Minto 用户目录(更高优先级)
    "./.claude/agents",    // 兼容:Claude Code 项目目录
    "./.minto/agents"      // 主要:Minto 项目目录(最高优先级)
  ],
  "agentOverrides": {
    "code-reviewer": {
      "model": "claude-sonnet-4",
      "temperature": 0.3,
      "tools": ["FileRead", "Grep", "Glob", "WebSearch"]
    }
  }
}

插件系统

插件扩展 Minto 的能力,提供可重用组件。

插件组件

  1. 代理(Agents): 专业 AI 助手
  2. 命令(Commands): 斜杠命令 (/review/test)
  3. 技能(Skills): 可重用知识模块
  4. 钩子(Hooks): 生命周期事件处理器
  5. MCP 服务器: 扩展工具和能力

插件目录结构

Minto 使用基于优先级的目录系统,其中 .minto 目录具有更高优先级:

# 目录优先级(从低到高):
~/.claude/plugins/         # Claude Code 兼容性(兼容)
~/.minto/plugins/          # 用户级插件(主要)
./.claude/plugins/         # 项目级(兼容)
./.minto/plugins/          # 项目级插件(最高优先级)

要点

  • ✅ 新插件默认安装在 .minto/plugins/
  • .minto/ 中的插件会覆盖 .claude/ 中的同名插件
  • ✅ 完全兼容 Claude Code 的 .claude/ 目录

安装插件

从市场安装
# 添加市场
minto marketplace add wshobson/agents

# 搜索插件
minto marketplace search "python"

# 安装插件
minto plugin install python-development@wshobson

# 列出已安装插件
minto plugin list
从 Git 仓库安装
minto plugin install https://github.com/user/minto-plugin.git
从本地目录安装
minto plugin install ./my-plugin --link

创建插件

1. 创建插件结构
mkdir my-plugin
cd my-plugin
2. 创建 plugin.json
{
  "name": "my-plugin",
  "version": "1.0.0",
  "description": "我的自定义 Minto 插件",
  "author": "Your Name",
  "agents": ["agents/my-agent.md"],
  "commands": ["commands/my-command.md"],
  "skills": ["skills/my-skill.md"]
}
3. 添加组件

代理 (agents/my-agent.md):

---
name: my-agent
description: 用于特定任务的自定义代理
tools: ["*"]
---

代理系统提示内容...

命令 (commands/my-command.md):

---
name: my-command
description: 执行自定义命令
argNames: ["input"]
---

处理 {input} 并执行自定义操作。

技能 (skills/my-skill.md):

---
name: my-skill
description: 关于 X 的可重用知识
---

# 我的技能知识

详细说明和示例...
4. 安装插件
# 从插件目录
minto plugin install . --link

# 或从父目录
minto plugin install ./my-plugin

插件配置

.minto.json 中:

{
  "// Plugin Directories": "优先级:后者覆盖前者(.minto > .claude)",
  "pluginDirectories": [
    "~/.claude/plugins",   // 兼容:Claude Code 用户目录
    "~/.minto/plugins",    // 主要:Minto 用户目录(更高优先级)
    "./.claude/plugins",   // 兼容:Claude Code 项目目录
    "./.minto/plugins"     // 主要:Minto 项目目录(最高优先级)
  ],
  "enabledPlugins": [
    "python-development",
    "code-reviewer",
    "my-plugin"
  ],
  "pluginConfig": {
    "my-plugin": {
      "customSetting": "value"
    }
  }
}

MCP 集成

**MCP(模型上下文协议)**允许 AI 模型访问外部工具和数据源。

MCP 服务器类型

  1. stdio: 本地命令行工具
  2. SSE: 服务器发送事件(流式)
  3. WebSocket: 双向实时通信
  4. HTTP: 请求-响应模式

配置 MCP 服务器

.minto.json 中:

{
  "mcpServers": {
    "filesystem": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/files"],
      "enabled": true
    },

    "brave-search": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-brave-search"],
      "enabled": true,
      "env": {
        "BRAVE_API_KEY": "${BRAVE_API_KEY}"
      }
    },

    "github": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "enabled": true,
      "env": {
        "GITHUB_TOKEN": "${GITHUB_TOKEN}"
      }
    },

    "postgres": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "enabled": false,
      "env": {
        "DATABASE_URL": "${DATABASE_URL}"
      }
    },

    "custom-websocket": {
      "type": "websocket",
      "url": "wss://mcp.example.com",
      "enabled": false,
      "headers": {
        "Authorization": "Bearer ${TOKEN}"
      }
    }
  }
}

可用的 MCP 服务器

| 服务器 | 类型 | 用途 | 包名 | |--------|------|------|------| | Filesystem | stdio | 文件操作 | @modelcontextprotocol/server-filesystem | | Git | stdio | Git 操作 | @modelcontextprotocol/server-git | | GitHub | stdio | GitHub API | @modelcontextprotocol/server-github | | GitLab | stdio | GitLab API | @modelcontextprotocol/server-gitlab | | Google Drive | stdio | Google Drive | @modelcontextprotocol/server-google-drive | | Slack | stdio | Slack API | @modelcontextprotocol/server-slack | | PostgreSQL | stdio | 数据库 | @modelcontextprotocol/server-postgres | | Puppeteer | stdio | 浏览器自动化 | @modelcontextprotocol/server-puppeteer | | Brave Search | stdio | 网页搜索 | @modelcontextprotocol/server-brave-search |

使用 MCP 工具

MCP 工具自动对 AI 模型可用:

# MCP 工具自动使用
> "搜索关于 AI 的最新新闻"  # 使用 brave-search MCP
> "读取 /home/user/data.json 的内容"  # 使用 filesystem MCP
> "获取我最新的 GitHub issues"  # 使用 github MCP

创建自定义 MCP 服务器

查看 MCP 实现指南 了解创建自定义 MCP 服务器的详细说明。


配置

配置文件位置

Minto 使用层级配置:

  1. 全局: ~/.minto.json(用户级设置)
  2. 项目: ./.minto.json(项目特定设置)
  3. 环境: .env 文件和环境变量
  4. CLI 参数: 命令行覆盖

优先级: CLI 参数 > 项目 > 全局 > 默认值

环境变量

Minto 支持以下环境变量:

主要配置

  • MINTO_CONFIG_DIR - 自定义配置目录(最高优先级)
  • CLAUDE_CONFIG_DIR - Claude Code 兼容目录(用于兼容性)

API 密钥

  • ANTHROPIC_API_KEY - Anthropic API 密钥(Claude 模型)
  • OPENAI_API_KEY - OpenAI API 密钥
  • 其他提供商特定的 API 密钥

高级选项

  • MINTO_SESSION_ID - 自定义会话标识符
  • MINTO_BASH - 自定义 bash 可执行文件路径(Windows)
  • MINTO_DEBUG_AGENTS - 启用代理调试输出

注意.minto 目录始终比 .claude 目录具有更高的优先级(用于配置、代理和插件)。

完整配置示例

查看 .minto.json.example 获取包含所有可用选项的完整文档化配置文件。

主要配置部分

模型

{
  "mainModel": "claude-sonnet-4",
  "taskModel": "claude-sonnet-3-7",
  "models": {
    "claude-sonnet-4": {
      "provider": "anthropic",
      "model": "claude-sonnet-4-20250514",
      "apiKey": "${ANTHROPIC_API_KEY}",
      "maxTokens": 8192,
      "temperature": 0.7
    },
    "gpt-4-turbo": {
      "provider": "openai",
      "model": "gpt-4-turbo-preview",
      "apiKey": "${OPENAI_API_KEY}"
    }
  }
}

压缩与上下文

{
  "compressionMode": "code",
  "autoCompact": {
    "enabled": true,
    "threshold": 0.8
  },
  "contextWindow": {
    "maxTokens": 200000,
    "reserveTokens": 4000
  }
}

权限

{
  "permissionMode": "safe",
  "permissions": {
    "fileWrite": {
      "enabled": true,
      "requireConfirmation": true,
      "allowedPaths": ["./**", "!node_modules/**"]
    },
    "bashExecution": {
      "enabled": true,
      "requireConfirmation": true,
      "blockedCommands": ["rm -rf", "sudo"]
    }
  }
}

使用指南

基础命令

启动 Minto

# 基础启动
minto

# 安全模式(需要权限)
minto --safe

# 指定模型
minto --model gpt-4-turbo

# 详细输出
minto --verbose

# 在特定目录
minto --cwd /path/to/project

会话内命令

# 模型管理
/model                    # 显示当前模型
/model gpt-4-turbo       # 切换模型

# 代理管理
/agents                  # 列出可用代理
/task <agent> <prompt>   # 使用特定代理

# 插件管理
/plugins                 # 列出已安装插件
/plugin install <name>   # 安装插件

# 上下文管理
/compact                 # 手动压缩上下文
/compression             # 切换压缩模式
/clear                   # 清除对话

# 帮助和信息
/help                    # 显示帮助
/commands                # 列出所有命令
/quit                    # 退出并显示摘要

使用代理

列出代理

# 在 Minto 会话中
/agents

# 输出:
# 可用代理:
# - code-reviewer: 专家代码审查
# - python-pro: Python 开发专家
# - researcher: 网络研究专家

显式使用代理

# 方法 1: /task 命令
/task code-reviewer "审查 src/auth.ts 的安全问题"

# 方法 2: 自然语言
"使用 code-reviewer 代理分析我的代码"

# 方法 3: 多代理工作流
"让 researcher 代理查找最佳实践,然后 code-reviewer 代理应用它们"

创建自定义代理

  1. 创建代理文件: ~/.minto/agents/my-agent.md
---
name: my-agent
description: 专门用于 X 任务的代理
tools: ["FileRead", "FileWrite", "Bash"]
model: claude-sonnet-4
temperature: 0.5
---

# 我的自定义代理

你是 X 方面的专家。当被要求执行 Y 时:

1. 首先,分析需求
2. 然后,创建详细计划
3. 最后,逐步执行计划

始终为你的决策提供解释。
  1. 测试代理:
minto
> /agents
> /task my-agent "执行任务 X"

代理最佳实践

应该:

  • 提供清晰、具体的描述
  • 限制工具访问到必需的范围
  • 在提示中包含示例
  • 分享前测试代理

不应该:

  • 给代理无限工具访问权限 ("*") 除非必要
  • 使用过于宽泛的描述
  • 忘记指定特定任务的模型

使用插件

从市场安装

# 添加市场
minto marketplace add wshobson/agents

# 列出市场
minto marketplace list

# 搜索插件
minto marketplace search "python"

# 安装插件
minto plugin install python-development@wshobson

# 安装特定版本
minto plugin install python-development@wshobson --version 2.1.0

管理已安装插件

# 列出已安装插件
minto plugin list

# 显示插件详情
minto plugin info python-development

# 启用/禁用插件
minto plugin enable python-development
minto plugin disable python-development

# 更新插件
minto plugin update python-development

# 卸载插件
minto plugin uninstall python-development

开发插件

查看综合指南:

基本结构:

my-plugin/
├── plugin.json          # 插件清单
├── agents/              # AI 代理
│   └── my-agent.md
├── commands/            # 斜杠命令
│   └── my-cmd.md
├── skills/              # 可重用知识
│   └── my-skill.md
└── README.md            # 文档

MCP 服务器

开始使用 MCP 服务器

  1. 安装 MCP 服务器包:
npm install -g @modelcontextprotocol/server-filesystem
npm install -g @modelcontextprotocol/server-brave-search
  1. .minto.json 中配置:
{
  "mcpServers": {
    "filesystem": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/allowed/path"],
      "enabled": true
    },
    "brave-search": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-brave-search"],
      "enabled": true,
      "env": {
        "BRAVE_API_KEY": "your-api-key"
      }
    }
  }
}
  1. 在 Minto 中使用:
minto

# MCP 工具自动可用
> "搜索最新的 TypeScript 特性"
> "读取 package.json 文件"

MCP 服务器配置选项

{
  "server-name": {
    "type": "stdio|sse|websocket|http",
    "command": "executable",           // 用于 stdio
    "args": ["arg1", "arg2"],          // 用于 stdio
    "url": "ws://...",                 // 用于 websocket/http
    "baseUrl": "http://...",           // 用于 http
    "enabled": true|false,
    "env": {                           // 环境变量
      "VAR_NAME": "${ENV_VAR}"
    },
    "headers": {                       // 用于 websocket/http
      "Authorization": "Bearer ${TOKEN}"
    },
    "reconnect": true,                 // 用于 websocket
    "timeout": 30000                   // 用于 http(毫秒)
  }
}

高级主题

多模型工作流

# 为不同任务使用不同模型
minto --model claude-sonnet-4

> "使用 GPT-4 生成创意想法"  # 自动切换
> /model gpt-4-turbo
> "现在分析这些想法"
> /model claude-sonnet-4
> "实现最佳想法"

自定义压缩模式

# 切换压缩模式
/compression

# 选择: business | code

# 业务模式: 9 节(背景、目标、发现等)
# 代码模式: 8 节(项目结构、关键文件、更改等)

Hooks 和自动化

.minto.json 中:

{
  "hooks": {
    "beforeCommand": "echo '开始执行命令...'",
    "afterCommand": "echo '命令完成!'",
    "beforeFileWrite": "./scripts/pre-write-check.sh",
    "afterFileWrite": "git add ."
  }
}

内存系统

# 保存信息到内存
> "记住我们的 API 端点是 https://api.company.com"

# 回忆信息
> "我们的 API 端点是什么?"

# 内存在会话间持久化

CI/CD 集成

# .github/workflows/ai-code-review.yml
name: AI 代码审查

on: [pull_request]

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: 安装 Minto
        run: npm install -g @within-7/minto
      - name: 运行 AI 审查
        env:
          ANTHROPIC_API_KEY: \${{ secrets.ANTHROPIC_API_KEY }}
        run: |
          minto --non-interactive \\
            "/task code-reviewer '审查这个 PR'" \\
            > review.md
      - name: 评论 PR
        uses: actions/github-script@v6
        with:
          script: |
            const fs = require('fs');
            const review = fs.readFileSync('review.md', 'utf8');
            github.rest.issues.createComment({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              body: review
            });

文档

📚 完整文档中心

快速开始指南

完整指南

参考文档

架构


开发

从源码构建

# 安装依赖
bun install

# 开发模式运行
bun run dev

# 生产构建
bun run build

# 运行测试
bun test

# 类型检查
bun run typecheck

# 格式化代码
bun run format

项目结构

minto/
├── src/
│   ├── entrypoints/       # CLI 入口点
│   ├── screens/           # UI 界面 (REPL 等)
│   ├── tools/             # 工具实现
│   ├── services/          # AI 服务集成
│   ├── utils/             # 工具函数(配置、代理等)
│   ├── commands/          # 内置命令
│   └── types/             # TypeScript 定义
├── docs/                  # 文档
├── scripts/               # 构建和工具脚本
└── cli.js                 # CLI 包装器

贡献

查看 CONTRIBUTING.md 了解指南。


归属与许可

归属

Minto 是基于 Kode-cli 的衍生作品,后者采用 Apache License, Version 2.0 许可。

原始项目: Kode-cli 原始版权: Copyright 2024 ShareAI Lab 原始许可: Apache License, Version 2.0

此衍生作品包含 within-7 所做的重大修改和增强。

详细归属信息请参见 ATTRIBUTION.md

许可

本软件采用 Apache License, Version 2.0 许可(继承自 Kode-cli)。

仅供 within-7 组织内部私有使用。

完整许可文本请参见 LICENSE,归属和修改详情请参见 NOTICE

免责声明

本软件按"原样"提供,不提供任何明示或暗示的担保,包括但不限于适销性、特定用途适用性和非侵权性的担保。在任何情况下,作者或版权持有人均不对任何索赔、损害或其他责任负责,无论是在合同诉讼、侵权行为还是其他方面,由软件或软件的使用或其他交易引起、产生或与之相关。


支持

  • 文档: ./docs
  • 问题: 内部问题跟踪器
  • 联系: within-7 团队

作者: Lib - within-7 版本: 1.0.0

© 2025 within-7. 保留所有权利。 基于 Kode-cli © 2024 ShareAI Lab。