能力标签
Flemma Neovim AI助手
🛠
AI工具

Flemma Neovim AI助手

基于 Lua · 开源免费,本地部署,数据完全自主可控
英文名:flemma-nvim
⭐ 54 Stars 🍴 3 Forks 💻 Lua 📄 AGPL-3.0 🏷 AI 7.0分
7.0AI 综合评分
Neovim插件ChatGPTClaude开发工具AI工作区
✦ AI Skill Hub 推荐

Flemma Neovim AI助手 是 AI Skill Hub 本期精选AI工具之一。综合评分 7.0 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。

📚 深度解析

Flemma Neovim AI助手 是一款基于 Lua 的开源工具,在 GitHub 上收获 0k+ Star,是Neovim插件、ChatGPT、Claude、开发工具领域中的优质开源项目。开源工具的最大优势在于代码完全透明,你可以审计每一行代码的安全性,也可以根据自身需求进行二次开发和定制。

**为什么要使用开源工具而非商业 SaaS?**
对于个人开发者和有隐私需求的用户,本地部署的开源工具意味着数据不离本机,不受第三方服务商的数据政策约束。同时,开源工具通常没有使用次数限制和月度费用,一次安装即可长期使用,对于高频使用场景的总拥有成本(TCO)远低于订阅制商业工具。

**安装与环境准备**
Flemma Neovim AI助手 依赖 Lua 运行环境。建议通过 pyenv(Python)或 nvm(Node.js)管理 Lua 版本,避免全局环境污染。对于新手用户,推荐先创建虚拟环境(python -m venv venv && source venv/bin/activate),再安装依赖,这样即使出现问题也可以随时删除虚拟环境重新开始,不影响系统稳定性。

**社区与维护**
GitHub Issue 和 Discussion 是获取帮助的最快渠道。在提问前建议先检查 Closed Issues(已关闭的问题),大多数常见问题都已有解答。遇到 Bug 时,提供 pip list 的输出、完整错误堆栈和最小可复现示例,能显著提高开发者响应速度。AI Skill Hub 将持续追踪 Flemma Neovim AI助手 的版本更新,及时通知重要功能变化。

📋 工具概览

Neovim内置的AI工作区插件,集成ChatGPT和Claude等大模型能力。每个对话都是用户拥有的独立文档,支持代码编辑、文档生成等开发场景,适合需要在编辑器中快速调用AI的开发者。

Flemma Neovim AI助手 是一款基于 Lua 开发的开源工具,专注于 Neovim插件、ChatGPT、Claude 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

GitHub Stars
⭐ 54
开发语言
Lua
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
AGPL-3.0
AI 综合评分
7.0 分
工具类型
AI工具
Forks
3

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

Neovim内置的AI工作区插件,集成ChatGPT和Claude等大模型能力。每个对话都是用户拥有的独立文档,支持代码编辑、文档生成等开发场景,适合需要在编辑器中快速调用AI的开发者。

Flemma Neovim AI助手 是一款基于 Lua 开发的开源工具,专注于 Neovim插件、ChatGPT、Claude 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

📌 核心特色
  • 开源免费,支持本地部署,数据完全自主可控
  • 活跃的 GitHub 开源社区,持续迭代更新
  • 提供详细文档和使用示例,新手友好
  • 支持自定义配置,灵活适配不同使用环境
  • 可作为基础组件集成进现有技术栈或进行二次开发
🎯 主要使用场景
  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 克隆仓库
git clone https://github.com/Flemma-Dev/flemma.nvim
cd flemma.nvim

# 查看安装说明
cat README.md

# 按 README 完成环境依赖安装后即可使用
📋 安装步骤说明
  1. 访问 GitHub 仓库页面
  2. 按照 README 文档完成依赖安装
  3. 根据系统环境完成初始化配置
  4. 参考官方示例或文档开始使用
  5. 遇到问题可在 GitHub Issues 中查找解答
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 查看帮助
flemma.nvim --help

# 基本运行
flemma.nvim [options] <input>

# 详细使用说明请查阅文档
# https://github.com/Flemma-Dev/flemma.nvim
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
# flemma.nvim 配置说明
# 查看配置选项
flemma.nvim --config-example > config.yml

# 常见配置项
# output_dir: ./output
# log_level: info
# workers: 4

# 环境变量(覆盖配置文件)
export FLEMMA.NVIM_CONFIG="/path/to/config.yml"
📑 README 深度解析 真实文档 完整度 40/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

简介

Flemma's logo Flemma

An AI workspace inside Neovim where every conversation is a document you own.

https://github.com/user-attachments/assets/db3bad82-9fcc-4cb7-989b-a63c6ee149d3

[!IMPORTANT] Actively Evolving. See the roadmap for what's coming next. Pin a tag if you need a stable target.

---

Quick Start

-- lazy.nvim (any plugin manager works):
{ "Flemma-Dev/flemma.nvim", opts = {} }

-- If your plugin manager doesn't auto-call setup(), add this to your config:
require("flemma").setup({})
export ANTHROPIC_API_KEY="sk-ant-..."   # or OPENAI_API_KEY, MOONSHOT_API_KEY

Create a file ending in .chat. Type your message after @You:. Press <kbd>Ctrl-]</kbd>.

Requirements: Neovim 0.11+, curl, Markdown Tree-sitter grammar. Optional: bwrap for sandboxing (Linux), file for MIME detection.

<details> <summary><strong>Setting up credentials</strong></summary>

Flemma never accepts API keys in your Lua config -- credentials stay in environment variables or your platform's secure keyring.

Environment variables (simplest approach):

ProviderVariable
AnthropicANTHROPIC_API_KEY
OpenAIOPENAI_API_KEY
MoonshotMOONSHOT_API_KEY
Vertex AIVERTEX_AI_ACCESS_TOKEN (or service-account flow below)

Linux keyring (Secret Service) -- store once, reuse across all Neovim sessions:

secret-tool store --label="Anthropic API Key" service anthropic key api
secret-tool store --label="OpenAI API Key" service openai key api
secret-tool store --label="Moonshot API Key" service moonshot key api

macOS Keychain is also supported.

Vertex AI requires a Google Cloud service account:

  1. Create a service account with the Vertex AI User role.
  2. Export its JSON credentials via VERTEX_SERVICE_ACCOUNT='{"type": "..."}', or store them in the Linux keyring with secret-tool store --label="Vertex AI Service Account" service vertex key api project_id your-project.
  3. Ensure gcloud is on your $PATH -- Flemma uses gcloud auth print-access-token to refresh tokens.
  4. Set project_id in your config or via :Flemma switch vertex gemini-3.1-pro-preview project_id=my-project.

Flemma tries each source in order and uses the first one that returns a credential. When everything fails, the notification tells you exactly which sources were tried and why each one couldn't help. You can also add custom sources for tools like Bitwarden or 1Password -- read more in extending.md.

</details>

---

Keymaps (buffer-local to `.chat` files, all configurable)

ModeKeyAction
Normal<br />Insert<kbd>Ctrl-]</kbd>Send to provider (or advance the tool approval cycle)
Normal<kbd>Ctrl-C</kbd>Cancel (double-tap to cancel all)
Normal<kbd>Alt-Enter</kbd>Execute the tool under cursor
Normal<kbd>Alt-B</kbd>Move executing tool to background
Normal]m / [mNext / previous message
Normal<kbd>Space</kbd>Toggle message fold
Normalzy / zYFold intermediate messages in current / all turns
NormalyoeToggle Markdown conceal ([oe / ]oe to set on/off)
Operatorim / amInner / around message text objects

---

Configuration

Flemma works without arguments -- require("flemma").setup({}) uses sensible defaults. Here's a practical starting point:

require("flemma").setup({
  provider = "anthropic",               -- "anthropic" | "openai" | "vertex" | "moonshot"
  thinking = "high",                    -- unified across all providers
  presets = {
    ["$fast"] = "vertex gemini-2.5-flash thinking=minimal",
    ["$opus"] = "anthropic claude-opus-4-6 thinking=max",
  },
  sandbox = { backend = "required" },   -- warn if no sandbox backend is available
  editing = { auto_write = true },      -- save .chat files after each response
})

Individual .chat files can override any of these settings. Detailed references:

  • configuration.md -- every option explained with inline comments
  • tools.md -- tool approval, custom tools, and the resolver API
  • mcp.md -- MCP support via MCPorter
  • templates.md -- per-file settings, expressions, and file includes
  • sandbox.md -- sandbox policies, path variables, and custom backends
  • ui.md -- highlights, rulers, turns, notifications, and folding
  • session-api.md -- programmatic access to token usage and cost data

---

FAQ

<details> <summary><strong>Can I use different models for different conversations?</strong></summary>

Yes. Each .chat file can set its own provider, model, and parameters. You can also switch mid-conversation with :Flemma switch openai gpt-5. Read more in configuration.md.

</details>

<details> <summary><strong>Can I attach files, images, or PDFs?</strong></summary>

Yes. Type @./path/to/file in your message and Flemma inlines the content before sending. Images and PDFs are base64-encoded and sent as multipart attachments where the provider supports it. MIME types are detected automatically. Read more in templates.md.

</details>

<details> <summary><strong>Can I build reusable prompt templates?</strong></summary>

Yes. A .chat file with a system prompt, variables, and expressions becomes a template. Define variables in a code block at the top of the file and reference them throughout your messages. You can also include other files and compose system prompts from building blocks. Read more in templates.md.

</details>

<details> <summary><strong>Can I control which tools the agent can use?</strong></summary>

Yes. Tools are governed by an approval system with built-in presets ($standard for file tools, $readonly for read-only access). You can auto-approve specific tools, require manual review for others, or write custom approval logic. Each .chat file can override the global policy. Read more in tools.md.

</details>

<details> <summary><strong>How do I store API keys securely?</strong></summary>

Flemma checks environment variables first, then your platform keyring (Linux Secret Service or macOS Keychain), then gcloud for Vertex AI. You never have to put keys in a config file. Read more in extending.md.

</details>

<details> <summary><strong>Can I add my own tools or integrate with other systems?</strong></summary>

Yes. Register custom tools, approval resolvers, credential resolvers, sandbox backends, and more -- everything plugs in through registries. For MCP servers (Slack, Linear, GitHub, etc.), enable the built-in MCPorter integration -- see mcp.md. For custom Lua tools, read tools.md and extending.md.

</details>

<details> <summary><strong>Who made this?</strong></summary>

<img src="https://images.weserv.nl/?url=gravatar.com%2Favatar%2Fea3f8f366bb2aa0855db031884e3a8e8%3Fs%3D400%26d%3Drobohash%26r%3Dg&mask=circle" valign="middle" align="left" width="18" height="18" alt="Photo of @StanAngeloff">&thinsp;@StanAngeloff. Flemma started as a personal tool for thinking, writing, and experimenting with AI inside Neovim. It's been used for everything from architecture documents and project planning to bedtime stories.

</details>

---

Troubleshooting

Start with :Flemma status. It shows a tree of everything Flemma knows about the current buffer -- provider, model, resolved parameters, sandbox state, enabled tools, approval policies, and which config layer set each value. Add verbose for the full picture. If something isn't working, this is the fastest way to find out why.

ProblemFix
Nothing happens on sendBuffer must end with .chat. Messages need @You: on its own line, content below.
Vertex refuses requestsCheck parameters.vertex.project_id. Run gcloud auth print-access-token manually.
Sandbox blocks writes:Flemma sandbox:status to check writable paths.
Keymaps clashkeymaps.enabled = false to disable all built-in mappings.
Temperature ignoredThinking (default "high") disables temperature on Anthropic/OpenAI. Set thinking = false.

---

🎯 aiskill88 AI 点评 B 级 2026-05-23

轻量级Neovim AI插件,整合主流模型,文档所有权设计贴心。但社区规模小、维护活跃度一般,适合极简工作流爱好者。

📚 实用指南(长尾问题)
适合谁
  • 使用 Cursor 编辑器、希望提升 AI 编程效率的开发者
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建多智能体协作系统的 Agent 开发者
最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
  • Cursor rules 控制在 80 行内,否则模型上下文成本会显著上升
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
部署方案
  • CLI:直接 npm install -g / pip install,命令行调用
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
flemma-nvim 中文教程flemma-nvim 安装报错怎么办flemma-nvim MCP 配置flemma-nvim Agent 工作流flemma-nvim 与同类工具对比flemma-nvim 最佳实践flemma-nvim 适合谁用

⚡ 核心功能

👥 适合谁
  • 使用 Cursor 编辑器、希望提升 AI 编程效率的开发者
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建多智能体协作系统的 Agent 开发者
⭐ 最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
  • Cursor rules 控制在 80 行内,否则模型上下文成本会显著上升
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效

👥 适合人群

AI 技术爱好者研究人员和学生开发者和工程师技术创业者

🎯 使用场景

  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发

⚖️ 优点与不足

✅ 优点
  • +完全开源免费,无授权费用
  • +本地部署,数据完全自主可控
  • +开发者社区支持,遇问题可查可问
⚠️ 不足
  • 安装和初始配置可能需要一定技术基础
  • 功能完整性通常不如成熟商业产品
  • 技术支持主要依赖开源社区,响应速度不稳定
⚠️ 使用须知

该工具使用 AGPL-3.0 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

⚠️ AGPL 3.0 — 最严格的 Copyleft,网络服务端使用也需开源,SaaS 使用受限。

🔗 相关工具推荐

📚 相关教程推荐
📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

flemma-nvim 是一款Lua开发的AI辅助工具。开源ChatGPT插件:An AI workspace inside Neovim where every conversation is a document you own.。⭐54 · Lua 主要应用场景包括:代码编写与调试、文档生成、代码注释。
💡 AI Skill Hub 点评

经综合评估,Flemma Neovim AI助手 在AI工具赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。

📚 深入学习 Flemma Neovim AI助手
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 flemma-nvim
原始描述 开源ChatGPT插件:An AI workspace inside Neovim where every conversation is a document you own.。⭐54 · Lua
Topics Neovim插件ChatGPTClaude开发工具AI工作区
GitHub https://github.com/Flemma-Dev/flemma.nvim
License AGPL-3.0
语言 Lua
🔗 原始来源
🐙 GitHub 仓库  https://github.com/Flemma-Dev/flemma.nvim 🌐 官方网站  https://flemma.dev/flemma.nvim

收录时间:2026-05-22 · 更新时间:2026-05-30 · License:AGPL-3.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。