Flort
VSCode extension for preparing your codebase for AI analysis. Concatenates project files into AI-ready format for ChatGPT, Claude, GitHub Copilot, etc.
Why Use This?
AI assistants need complete context to provide good code analysis, but dumping entire projects wastes tokens, reduces conversation length, and slows responses. Flort helps you be precise - select only relevant files while maintaining clear file structure so AI knows exactly what each piece of code is.
Quick Start
- Install extension from VSCode marketplace
- Extension will prompt to install
flort
command automatically if not found
- Right-click files/folders → "Cherry Pick" (only selected files) or "Flort - Active Profile" (uses current profile)
- Copy output → paste into AI
Features
- Automatic Installation: Extension detects missing
flort
command and offers to install it
- Smart Profiles: Pre-configured profiles for different languages and use cases
- Cherry Pick Mode: Select only the files you need - no directory scanning
- Visual Configuration: Manage settings through VSCode's sidebar UI
- Debug Mode: Built-in debug output for troubleshooting
Profiles
Profile |
Use Case |
Cherry Pick |
Only outputs files/folders you specifically select - no automatic scanning |
All Files |
Complete project overview with smart exclusions |
Python |
Python projects with code outline generation |
JavaScript |
Web development, React/Node.js with node_modules excluded |
C/C++ |
Systems programming with build artifacts excluded |
PHP |
Web backend with vendor directory excluded |
Markdown |
Documentation files only |
Installation
Automatic Installation (Recommended)
- Install the extension from VSCode marketplace
- On first use, if
flort
is not found, the extension will:
- Prompt you to install it automatically
- Open a terminal and run the installation
- Verify the installation succeeded
Manual Installation
# Install flort command-line tool
pip install flort --user
# Or with pip3
pip3 install flort --user
# Verify installation
flort --version
# Install VSCode extension
code --install-extension watkinslabs.flort
Note: Install flort on the system where your code runs (local machine, remote server, WSL, etc.).
Usage
- Right-click any file or folder in Explorer
- Choose:
- "Flort - Active Profile" - Uses current profile settings
- "Flort - Cherry Pick" - Only selected files, no scanning
- "Flort Profile" → [Profile Name] - Quick profile selection
Method 2: Command Palette
- Press
Ctrl+Shift+P
(Windows/Linux) or Cmd+Shift+P
(Mac)
- Type "Flort"
- Select command
Method 3: Activity Bar
- Click the Flort icon in the Activity Bar
- Configure profiles and settings
- Click run button
First Run Setup
On first installation:
- Extension initializes default profiles automatically
- Sets "All Files" as the default profile
- Shows welcome message with quick actions
- Prompts to install
flort
if not found
Configuration
Profile Management
- Access profiles through the Flort sidebar view
- Click profile name to activate
- Add custom profiles with the + button
- Settings auto-save to active profile
File Selection Options
- Patterns: Glob patterns like
*.py
, src/**/*.js
- Extensions: File extensions without dots:
py
, js
, cpp
- Manual Files: Specific files to always include
- Exclude Patterns: Patterns to exclude like
*test*
, *.min.js
- Exclude Extensions: Extensions to skip like
pyc
, log
- Exclude Directories: Folders to ignore like
node_modules
, .git
Output Options
- Show Config: Display settings at output start
- Skip Directory Tree: Omit file structure visualization
- Generate Code Outline: Extract classes/functions (Python)
- File Listing Only: Show files without content
- Skip File Content: Directory tree only
- Archive Type: Create zip or tar.gz
Advanced Settings
- Debug Output: Enable detailed logging
- Include All Files: Override extension filters
- Include Hidden: Process hidden files/folders
- Include Binary: Allow binary file processing
- Max Directory Depth: Limit traversal depth
- Directory Scan Optional: For Cherry Pick profile behavior
Troubleshooting
Flort Command Not Found
- Extension will prompt to install automatically
- Or manually install:
pip install flort --user
- Ensure Python is in your PATH
Cherry Pick Not Working
- Cherry Pick requires file selection first
- It won't scan directories automatically
- Use "All Files" profile for full project scanning
Debug Mode
- Enable debug in profile settings
- Run flort command
- Check "Flort Debug" output panel
Python/Pip Issues
- Multiple Python versions: Extension detects
python
or python3
- Virtual environments: Activate before using extension
- Permission errors: Use
--user
flag or admin terminal
Commands
Command |
Description |
flort.concatenate |
Run with current profile |
flort.runWithCherryPick |
Select specific files only |
flort.concatenateWithProfile |
Select profile and run |
flort.runWithAllFiles |
All Files profile |
flort.runWithPython |
Python profile |
flort.runWithJavaScript |
JavaScript profile |
flort.runWithC |
C profile |
flort.runWithCPlusPlus |
C++ profile |
flort.runWithPHP |
PHP profile |
flort.runWithMarkdown |
Markdown profile |
flort.setProfile |
Switch active profile |
flort.addProfile |
Create new profile |
flort.addPattern |
Add inclusion pattern |
flort.addExtension |
Add file extension |
flort.addManualFile |
Add specific file |
flort.addExcludePattern |
Add exclude pattern |
flort.addExcludeExtension |
Add exclude extension |
flort.addExcludeDir |
Add exclude directory |
flort.toggleSetting |
Toggle boolean setting |
flort.editSetting |
Edit setting value |
flort.refreshProfiles |
Refresh profile view |
Technical Details
Command Line Integration
The extension builds commands like:
flort --include-files "file1.py,file2.js" \
--glob "*.py,src/**/*.js" \
--extensions py,js \
--exclude-patterns "*test*,*cache*" \
--exclude-extensions pyc,pyo \
--ignore-dirs node_modules,__pycache__ \
--output stdio \
/path/to/project
Workspace Settings
Settings stored in .vscode/settings.json
:
{
"flort.currentProfile": "Python",
"flort.profiles": {
"Python": {
"extensions": ["py"],
"excludePatterns": ["__pycache__/*"],
"outline": true
}
}
}
Requirements
- Python 3.x with pip
- VSCode ^1.74.0
- Works on Windows, macOS, Linux, WSL, Remote SSH
License
MIT License
Repository
Author
Chris Watkins - chris@watkinslabs.com
Contributing
Issues and pull requests welcome! Please report bugs or feature requests on the GitHub repository.