Skip to content

Home

Flort Logo

File Concatenation and Project Overview Tool

Python Version PyPI Version License Tests

Flort is a powerful command-line tool designed to create consolidated views of your project's source code by combining multiple files into a single output file. It's perfect for preparing code context for Large Language Models (LLMs), generating documentation, and analyzing project structure.

✨ Key Features

Perfect for LLM Workflows

Flort was specifically designed to help developers prepare clean, organized code context for AI assistants and large language models.

  • Intelligent File Discovery


    Comprehensive file scanning with advanced include/exclude filtering, pattern matching, and binary file detection.

    Learn about filtering

  • Directory Tree Generation


    Visual project structure representation with customizable depth and formatting options.

    See output formats

  • Python Code Outline


    Extract class and function signatures, docstrings, and type annotations for API documentation.

    View examples

  • Advanced Filtering


    Extension-based, pattern-based, and directory-based filtering with support for complex exclusion rules.

    Master filtering

  • Token Counting


    Built-in token analysis for LLM context planning and optimization.

    Understand tokens

  • Archive Support


    Create ZIP or TAR.GZ archives of your processed output for easy sharing.

    Archive options

  • Interactive UI


    Curses-based file selector with mouse support for visual project exploration.

    Try the UI

  • High Performance


    Efficient processing of large codebases with memory optimization and progress tracking.

    Performance tips

🚀 Quick Start

# Install from PyPI
pip install flort

# With UI support on Windows
pip install flort[ui]
# Process Python files
flort . --extensions py --output project.txt

# Multiple file types
flort . --extensions py,js,md --output codebase.txt

# Interactive selection
flort --ui
# Full project analysis
flort . \
  --extensions py,js,ts,md \
  --exclude-patterns "*test*,*cache*" \
  --outline \
  --archive zip \
  --output analysis.txt

Get Started View Examples

🎯 Common Use Cases

For LLM Context Preparation

Prepare clean, organized code context for AI assistants:

# Prepare Python project for LLM analysis
flort . --extensions py --exclude-patterns "*test*,*cache*" --outline --output llm_context.txt

# Include documentation and config files  
flort . --extensions py,md,yml,json --exclude-patterns "*test*" --output full_context.txt

For Documentation

Generate comprehensive project overviews:

# Project structure overview
flort . --extensions py,md --no-dump --output structure.txt

# API documentation outline
flort . --extensions py --outline --no-dump --output api_docs.txt

For Code Review

Package code changes for review:

# Review specific files
flort . --include-files "file1.py,file2.py,config.json" --archive zip

# Package component for review
flort src/ --extensions py,js --exclude-patterns "*min.js" --archive zip

🎨 Interactive Experience

Experience Flort's powerful interactive UI:

$ flort --ui

🎯 FLORT FILE SELECTOR
📁 /home/user/project
Filter: .py, .js, .md

📂 src/
  [✓] 📄 main.py
  [✓] 📄 utils.py
  [ ] 📄 config.json
📂 tests/
  [✗] 📄 test_main.py
  [✗] 📄 test_utils.py
📄 README.md [✓]
📄 setup.py [✓]

Selected: 4 | Ignored: 2 | Types: 3

Features: - 🖱️ Mouse and keyboard navigation - 📂 Real-time directory browsing
- 🎯 File type filtering - ✅ Visual selection management - 🔍 Live preview of selections

📊 Output Format

Flort generates structured, readable output:

## Florted: 2025-06-02 10:30:15
## Directory Tree
project/
├── main.py
├── src/
│   ├── utils.py
│   └── config.py
└── README.md

## Python Code Outline
### File: main.py
FUNCTION: main() -> None
  DOCSTRING: Main entry point

CLASS: Application
  METHOD: __init__(self, config: str)
  METHOD: run(self) -> bool

## File Data
--- File: main.py
--- Characters: 1,234
--- Token Count: 256
[file content here]

🤝 Community & Support

🎯 Next Steps

Ready to dive deeper? Here's where to go next:

  1. Installation Guide - Detailed setup for your platform
  2. Quick Start - Get up and running in 5 minutes
  3. Usage Guide - Master all command-line options
  4. Examples - Real-world use cases and workflows
  5. API Reference - Programmatic usage

Made with ❤️ by Chris Watkins Flort: Making code consolidation simple and powerful