Files
moreminimore-vibe/scripts
Will Chen 7d5595f630 Optimize codebase extract & fix proposal handler token counting logic (#36)
* remove deprecated script
* Optimize codebase extract & fix proposal handler token counting logic
* add caching + lock
* sort by modified timestamp
* cache cleanup
2025-04-28 21:39:16 -07:00
..
2025-04-11 09:38:16 -07:00
2025-04-11 09:38:16 -07:00

Scripts

This directory contains utility scripts for the project.

extract-codebase.ts

A script that extracts code files from a directory, respecting .gitignore rules, and outputs them in a format suitable for LLM consumption.

Usage

# Make the script executable first
chmod +x scripts/extract-codebase.ts

# Run with default options (current directory, output to codebase-extract.md)
./scripts/extract-codebase.ts

# Specify a source directory and output file
./scripts/extract-codebase.ts ./src ./output.md

Features

  • Walks through the specified directory recursively
  • Respects all .gitignore rules
  • Extracts files with extensions: .ts, .tsx, .js, .jsx, .css
  • Formats output with markdown code blocks, including file paths
  • Writes all extracted code to a single markdown file