FileTree ForgeA declarative filesystem refactoring language inside Markdown. FileTree Forge lets you visualize, edit, and refactor your project structure using explicit operation markers in Markdown. No hidden magic, no automatic diffing—just clean, predictable filesystem operations. 🎯 Features
🚀 Quick Start1. Generate a TreeRight-click any folder in the Explorer → "FileTree Forge: Generate Markdown Tree" This creates a clean representation of your folder structure:
2. Mark Your OperationsAdd operation markers to declare what you want to do:
3. Preview ChangesPress
4. Apply ChangesPress Operations execute, filesystem updates, and temporary documents close automatically! 📋 Operation Markers
|
| Action | Windows/Linux | Mac | Description |
|---|---|---|---|
| Preview | Ctrl+Shift+Enter |
Cmd+Shift+Enter |
Show what will change |
| Apply | Ctrl+Enter |
Cmd+Enter |
Execute operations |
| Save | Ctrl+S |
Cmd+S |
Save file only (no apply) |
🔄 Complete Workflow
1. Right-click folder → "Generate Markdown Tree"
↓
2. Edit tree, add operation markers:
- [+] for new files/folders
- [-] for deletions
- [~ name] for renames
↓
3. Ctrl+Shift+Enter → Preview operations
↓
4. Review grouped operations
↓
5. Ctrl+Enter → Apply changes
↓
6. Done! Tree & preview docs close automatically
📊 Operation Execution Order
Operations execute in this safe order:
- Create folders (parent before child)
- Create files
- Rename files/folders
- Delete files
- Delete folders (deepest first)
This order prevents errors like deleting a folder before its contents.
🛡️ Safety Features
- ✅ Structure Validation: Tree must match filesystem exactly
- ✅ Workspace Scoped: No operations outside workspace
- ✅ Path Validation: No absolute paths, no
..references - ✅ Confirmation Dialogs: Deletes require confirmation
- ✅ Safe Execution Order: Operations in correct sequence
- ✅ Auto-Close: Temporary documents close after apply
⚙️ Configuration
{
"filetree-forge.confirmBeforeApply": true,
"filetree-forge.ignorePatterns": [
"node_modules",
".git",
".vscode",
"dist",
"out",
"build"
]
}
Settings
confirmBeforeApply(default:true): Show confirmation before applying operationsignorePatterns(default:["node_modules", ".git", ...]): Patterns to ignore when generating trees
📝 Examples
Example 1: Add New Files
# Generate tree
src/
├─ components/
│ └─ Button.tsx
# Add new component
src/
├─ components/
│ ├─ Button.tsx
│ └─ Input.tsx [+]
# Preview → Apply
# Result: Input.tsx created
Example 2: Reorganize Structure
# Before
src/
├─ Button.tsx
├─ Input.tsx
# After - create folder and mark for creation
src/
├─ components/ [+]
│ ├─ Button.tsx [+]
│ └─ Input.tsx [+]
# Note: Original files would need [-] markers
Example 3: Clean Up Old Files
src/
├─ old-utils/ [-]
├─ deprecated.ts [-]
├─ current.ts
└─ utils/
❓ FAQ
Why does it show "Structure mismatch"?
The tree structure (without markers) must exactly match your filesystem. If files have been added, removed, or renamed outside of FileTree Forge, regenerate the tree.
Can I move files between folders?
Not directly with a single operation. You would delete from the old location [-] and create in the new location [+].
What if I make a mistake?
Use version control (git) before applying major changes. FileTree Forge doesn't have undo, but you can revert using git.
Can I use this on multiple folders at once?
Each tree is scoped to the folder you right-clicked. Generate separate trees for different folders.
🆚 Why FileTree Forge?
Unlike other file tree extensions:
- ✅ Explicit: You mark exactly what you want—no guessing
- ✅ Validated: Structure must match filesystem—no surprises
- ✅ Safe: Operations in correct order—no errors
- ✅ Clean: No UUIDs or metadata cluttering your trees
- ✅ Predictable: What you see is what you get
📚 Documentation
🐛 Known Limitations
- No undo functionality (use version control)
- Cannot move files in a single operation (delete + create)
- No file content editing (structure only)
- Trees are scoped to a single folder
🤝 Contributing
Issues and pull requests are welcome! Please read the Developer Guide before contributing.
📄 License
MIT - see LICENSE file for details.
🎯 Philosophy
"A declarative filesystem refactoring language inside Markdown."
FileTree Forge is built on the principle of explicit over implicit. You mark what you want, review it, and apply it. No hidden magic, no automatic diffing, no surprises.
Made with ❤️ for developers who value clarity and control.