🚀 LLMify
A collection of tools that optimize your codebase for LLMs and agents

LLMify is made for LLMs by LLMs - a suite of powerful tools that transform your codebase into the perfect context for AI agents. Get started with a single command: npx llmify
✨ Features
- 📊 Visual Project Structure - Creates a tree view of your codebase
- 📄 Smart Content Extraction - Pulls content from all relevant files
- 🧠 Context Optimization - Formats output specifically for LLMs
- 🔍 Intelligent Filtering - Respects
.gitignore and auto-creates .llmignore
- 🛠️ Highly Customizable - Control depth, paths, and patterns
- 💬 AI-Powered Commit Messages - Generate detailed commit messages using LLMs
- 📝 Documentation Updates - Automatically update docs based on code changes
- 🔄 Code Refactoring - Refactor TypeScript code using LLMs based on custom prompts
🔥 Why LLMify?
Getting the right context to an LLM is critical for quality results. LLMify solves this by:
- Saving Time - No more manual file copying or writing commit messages
- Improving Responses - Gives LLMs better structural understanding of your codebase
- Reducing Token Usage - Smart filtering excludes irrelevant files
- Working Everywhere - Supports all major platforms
- Better Commits - Generate clear, conventional commit messages
- Up-to-Date Docs - Keep documentation in sync with code changes
- Efficient Refactoring - Automate code refactoring with precision and control
📦 Installation
NPM (Recommended)
npm install -g llmify
Direct Download
Grab the latest release for your platform.
🚀 Quick Start
Generate context for your current directory:
llmify
cat llm.txt | pbcopy
cat llm.txt | xclip
type llm.txt | clip
Generate a commit message for staged changes:
git add .
llmify commit
llmify commit -f
llmify commit --docs
👩💻 Usage Examples
Context Generation
llmify /path/to/project
llmify -p src/components
llmify -o context_for_llm.txt
llmify -d 3
llmify -e "*.test.js" -e "**/__mocks__/*"
llmify -i "important-config.json"
llmify -v
Commit Message Generation
llmify commit
llmify commit -f
llmify commit --docs
llmify commit --no-edit
llmify commit -v
llmify commit --llm-timeout 60
Documentation Update
llmify docs
llmify docs --commits 5
llmify docs --interactive
llmify docs --path src/
llmify docs --dry-run
llmify docs --force
llmify docs --no-stage
llmify docs --prompt "Focus on API changes."
Code Refactoring
llmify refactor src/app.ts
llmify refactor src/app.ts --prompt "Simplify arrow functions"
llmify refactor src/app.ts --no-check-types
llmify refactor src/app.ts --show-diff
llmify refactor src/app.ts --apply --force
llmify refactor src/app.ts --dry-run
⚙️ Configuration
LLMify can be configured via a .llmifyrc.yaml file in your project root or ~/.config/llmify/config.yaml:
llm:
provider: "openai"
model: "gpt-4o"
ollama_base_url: "http://localhost:11434"
commit:
model: "gpt-4o"
docs:
model: "gpt-4o"
Environment variables can also be used:
LLMIFY_LLM_PROVIDER - Set the LLM provider
LLMIFY_LLM_MODEL - Set the default model
OPENAI_API_KEY - OpenAI API key
ANTHROPIC_API_KEY - Anthropic API key
🔧 .llmignore - Control What's Included
LLMify automatically creates a .llmignore file with sensible defaults. Customize it to exclude any files irrelevant to your LLM conversations:
# Example .llmignore
*.min.js
*.csv
node_modules/
dist/
coverage/
🎯 Example Output
The generated file has a clean, LLM-friendly structure:
Click to see example output
============================================================
Project Root: /path/to/your/project
Generated At: 2023-06-15T10:30:45Z
============================================================
## File Tree Structure
yourproject/
├── .gitignore
├── main.go
├── utils.go
└── docs/
├── README.md
└── usage.md
============================================================
## File Contents
### File: .gitignore
node_modules/
*.log
dist/
---
### File: main.go
```go
package main
import (
"fmt"
)
func main() {
fmt.Println("Hello, world!")
}
</details>
## 💡 Pro Tips
- Include a `.llmignore` in your project templates
- Use with `--path` to focus on specific parts of your codebase
- Combine with project-specific prompts for best results
- For very large codebases, use `-d` to limit directory depth
- Use `llmify commit --docs` to keep documentation in sync
- Configure different models for different tasks in `.llmifyrc.yaml`
## 🤝 Contributing
Contributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
## 📝 License
[MIT](https://github.com/jakezegil/llmify/blob/main/LICENSE) © Jake Zegil
---
<p align="center">
Made with ❤️ for better LLM interactions
<br>
<a href="https://github.com/jakezegil/llmify">Star on GitHub</a> •
<a href="https://www.npmjs.com/package/llmify">View on npm</a>
</p>