Skip to content
/ create_llm_txt Public template

A powerful script that generates a clean, LLM-optimized .txt file of your entire project. Ideal for AI prompt engineering, documentation, and audits.

Notifications You must be signed in to change notification settings

digi4care/create_llm_txt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 LLM_TXT Generator

Version Shell License Maintained

A powerful script that generates a clean, LLM-optimized .txt file of your entire project. Ideal for AI prompt engineering, documentation, and audits.


πŸ“Œ Purpose

This script was designed to generate a unified .txt file that includes:

  • A clean project tree structure
  • The full contents of all relevant source files

This format follows the llm_txt methodology, optimized for input into Large Language Models (LLMs) like GPT. It's perfect for use in AI agents, prompt chaining, code analysis, or retrieval-augmented generation.


πŸ“ Example Output (llm_txt.txt)

\------------------------ PROJECT TREE ------------------------
.
└── README.md

\------------------------ ./README.md ------------------------

# LLM\_TXT Generator

...


πŸ“œ What is `llm_txt` format?

The llm_txt format is a flat, readable structure used for giving LLMs a complete overview of a project:

βœ… All files concatenated into one file βœ… No binary or noisy files βœ… Each section clearly marked βœ… Tree structure as top-level context

This enables better comprehension by LLMs β€” especially when used for reasoning, debugging, or interpreting entire codebases.


βš™οΈ How It Works
  1. Removes old llm_txt.txt
  2. Generates a tree overview of the project
  3. Finds all relevant files based on include/exclude rules
  4. Concatenates all contents into llm_txt.txt

πŸ› οΈ Usage

Run the script from your terminal:

bash llm_txt.sh

⚠️ Make sure you have tree installed:

sudo apt install tree

🚫 What Gets Excluded?

Directories:

  • .git
  • .vscode

Files:

  • llm_txt.txt
  • .gitignore, kubeconfig
  • The script itself (llm_txt.sh)

You can customize the excluded paths in the script.


πŸ‘€ Author

Chris Engelhard πŸ“§ [email protected] 🌐 www.chrisengelhard.nl 🏒 Digi4Care


πŸͺͺ License

This project is licensed under the MIT License.


πŸ’‘ Ideas or Contributions?

Suggestions are welcome!

About

A powerful script that generates a clean, LLM-optimized .txt file of your entire project. Ideal for AI prompt engineering, documentation, and audits.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages