---
title: "code2prompt vs codecompanion.nvim"
type: "comparison"
canonical_url: "https://www.graphcanon.com/compare/mufeedvh-code2prompt-vs-olimorris-codecompanion-nvim"
tools: ["mufeedvh-code2prompt", "olimorris-codecompanion-nvim"]
---

# code2prompt vs codecompanion.nvim

*GraphCanon updated Sep 20, 2026*

## Verdict

Pick code2prompt when code2prompt is primarily Rust; codecompanion.nvim is Lua; pick codecompanion.nvim when codecompanion.nvim is primarily Lua; code2prompt is Rust.

[code2prompt](https://code2prompt.dev) reports 7.7k GitHub stars, 446 forks, and 16 open issues, last pushed Sep 18, 2026. [codecompanion.nvim](https://codecompanion.olimorris.dev) has 6.9k stars, 457 forks, and 15 open issues, last pushed Sep 19, 2026. Figures are from public GitHub metadata via [code2prompt's repository](https://github.com/mufeedvh/code2prompt) and [codecompanion.nvim's repository](https://github.com/olimorris/codecompanion.nvim).

| | [code2prompt](/tools/mufeedvh-code2prompt.md) | [codecompanion.nvim](/tools/olimorris-codecompanion-nvim.md) |
| --- | --- | --- |
| Tagline | CLI tool to convert codebase into LLM prompt | :rocket: Getting Started |
| Stars | 7,678 | 6,862 |
| Forks | 446 | 457 |
| Open issues | 16 | 15 |
| Language | Rust | Lua |
| Adopt for | - | AI coding plugin for Neovim in Lua with Apache license and support for various LLMs. |
| Persona | - | - |
| Runtime | - | - |
| License | MIT | Apache-2.0 |
| Categories | Developer Tools, LLM Frameworks | Developer Tools, LLM Frameworks |

## Trust and health

_Sourced signals - not a safety guarantee. No winner column._

| | [code2prompt](/tools/mufeedvh-code2prompt.md) | [codecompanion.nvim](/tools/olimorris-codecompanion-nvim.md) |
| --- | --- | --- |
| Days since push | 1d | 0d |
| Open issues (now) | 16 | 15 |
| Stars delta | +169 (30d) | +70 (30d) |
| Open issues delta | -4 (30d) | +1 (30d) |
| Full report | [trust report](/tools/mufeedvh-code2prompt/trust.md) | [trust report](/tools/olimorris-codecompanion-nvim/trust.md) |

## Decision facts: code2prompt

- **Hosting:** self hosted - code2prompt operates as a self-hosted CLI tool, allowing for local data processing that is important for users with confidentiality requirements or those who wish to avoid cloud dependency.
- **Pricing:** freemium - The code2prompt tool is available under MIT license free of monetary charge. However, premium support or advanced features might incur costs if provided by the development team in future updates.

## Decision facts: codecompanion.nvim

- **Adopt for:** AI coding plugin for Neovim in Lua with Apache license and support for various LLMs.

## Choose when

### Choose code2prompt if…

- code2prompt is primarily Rust; codecompanion.nvim is Lua.
- License: code2prompt is MIT, codecompanion.nvim is Apache-2.0.
- code2prompt operates as a self-hosted CLI tool, allowing for local data processing that is important for users with confidentiality requirements or those who wish to avoid cloud dependency.
- Pricing: The code2prompt tool is available under MIT license free of monetary charge. However, premium support or advanced features might incur costs if provided by the development team in future updates..
- Tags unique to code2prompt: ai, chatgpt, claude, cli.
- When you aim to structure and deliver your entire codebase into an LLM for comprehensive documentation or refactoring guidance.

### Choose codecompanion.nvim if…

- codecompanion.nvim is primarily Lua; code2prompt is Rust.
- License: codecompanion.nvim is Apache-2.0, code2prompt is MIT.
- Tags unique to codecompanion.nvim: agent-client-protocol, ai-coding, anthropic, claude-code.
- codecompanion.nvim ships Docker support for self-hosted deployment.
- When you are a Neovim user seeking AI-driven code completion that integrates smoothly into your editor setup.

## When NOT to use code2prompt

- In situations requiring real-time interaction or analysis of codebases due to the static nature of its prompt generation process, as this might not cater to agile or evolving project requirements.
- If you are in need of a tool beyond simple CLI operation and desire an integrated development environment (IDE) plugin for more interactive and continuous assistance.

## When NOT to use codecompanion.nvim

- Avoid if your coding involves non-Lua languages and you do not require or support the specific LLMs handled by this plugin.
- This tool may not be suitable for developers who prefer code companion tools with broader language or LLM compatibility outside Neovim.

## Common questions

### What is the difference between code2prompt and codecompanion.nvim?

code2prompt: CLI tool to convert codebase into LLM prompt. codecompanion.nvim: :rocket: Getting Started. See the comparison table for live GitHub stats and shared categories.

### When should I choose code2prompt over codecompanion.nvim?

Choose code2prompt over codecompanion.nvim when code2prompt is primarily Rust; codecompanion.nvim is Lua; License: code2prompt is MIT, codecompanion.nvim is Apache-2.0; code2prompt operates as a self-hosted CLI tool, allowing for local data processing that is important for users with confidentiality requirements or those who wish to avoid cloud dependency; Pricing: The code2prompt tool is available under MIT license free of monetary charge. However, premium support or advanced features might incur costs if provided by the development team in future updates.; Tags unique to code2prompt: ai, chatgpt, claude, cli; When you aim to structure and deliver your entire codebase into an LLM for comprehensive documentation or refactoring guidance.

### When should I choose codecompanion.nvim over code2prompt?

Choose codecompanion.nvim over code2prompt when codecompanion.nvim is primarily Lua; code2prompt is Rust; License: codecompanion.nvim is Apache-2.0, code2prompt is MIT; Tags unique to codecompanion.nvim: agent-client-protocol, ai-coding, anthropic, claude-code; codecompanion.nvim ships Docker support for self-hosted deployment; When you are a Neovim user seeking AI-driven code completion that integrates smoothly into your editor setup.

### When should I avoid code2prompt?

In situations requiring real-time interaction or analysis of codebases due to the static nature of its prompt generation process, as this might not cater to agile or evolving project requirements. If you are in need of a tool beyond simple CLI operation and desire an integrated development environment (IDE) plugin for more interactive and continuous assistance.

### When should I avoid codecompanion.nvim?

Avoid if your coding involves non-Lua languages and you do not require or support the specific LLMs handled by this plugin. This tool may not be suitable for developers who prefer code companion tools with broader language or LLM compatibility outside Neovim.

### Is code2prompt or codecompanion.nvim more popular on GitHub?

code2prompt has more GitHub stars (7,678 vs 6,862). Stars measure visibility, not whether either tool fits your constraints.

### Are code2prompt and codecompanion.nvim open source?

Yes - both are open-source projects on GitHub (code2prompt: MIT, codecompanion.nvim: Apache-2.0).

### Where can I find alternatives to code2prompt or codecompanion.nvim?

GraphCanon lists graph-backed alternatives at [code2prompt alternatives](/tools/mufeedvh-code2prompt/alternatives) and [codecompanion.nvim alternatives](/tools/olimorris-codecompanion-nvim/alternatives) ([code2prompt markdown twin](/tools/mufeedvh-code2prompt/alternatives.md), [codecompanion.nvim markdown twin](/tools/olimorris-codecompanion-nvim/alternatives.md)), ranked by typed relationship edges rather than popularity votes.

### Is there a machine-readable version of this comparison?

Yes. The markdown twin at [this comparison](/compare/mufeedvh-code2prompt-vs-olimorris-codecompanion-nvim.md) mirrors this page for agents and LLM crawlers, with the same stats table and FAQ answers.

### Which is better maintained, code2prompt or codecompanion.nvim?

code2prompt: Very active. codecompanion.nvim: Very active. Compare maintenance labels, days since push, and release cadence in the trust section below - stars alone do not measure maintenance.

### Where are the full trust reports for code2prompt and codecompanion.nvim?

GraphCanon publishes per-repo trust reports with dated maintenance, provenance, and scan summaries: [code2prompt trust report](/tools/mufeedvh-code2prompt/trust); [codecompanion.nvim trust report](/tools/olimorris-codecompanion-nvim/trust).

---

**Machine-readable endpoints**

- JSON: [`/api/graphcanon/graph?tool=mufeedvh-code2prompt`](/api/graphcanon/graph?tool=mufeedvh-code2prompt)
- LLM index: [/llms.txt](/llms.txt)
- Full corpus: [/llms-full.txt](/llms-full.txt)

_GraphCanon - The knowledge graph for AI development. https://www.graphcanon.com/_
