Codebase Combiner helps you curate files, count tokens, and generate a ready-to-paste prompt from a workspace or folder.
This repo ships two deliverables:
- VS Code extension (Node/JavaScript)
- Native macOS SwiftUI app (SwiftPM)
- Combine a workspace or folder into a single Markdown or text file.
- Flexible include/exclude filters by glob and extension.
- Token estimation for prompt sizing.
- Native macOS sidebar/detail app for visual file selection, prompt preview, and copy/save workflows.
- File-backed “last ready copy” recovery so the latest generated payload can be copied after closing or reopening the app.
- Animated loading, empty, selection, hover, and copy-feedback states with Reduce Motion support.
- Structured local logging for app lifecycle, scans, exports, and persistence failures without logging source contents.
- macOS Settings for default output format, filters, hidden-file handling, and max file size.
- Support links in the app menu, Settings, and sidebar for Buy Me a Coffee.
See INSTALL.md for full setup and run instructions.
Quick start (VS Code extension):
npm install
npm test
npm run packageQuick start (Swift app):
cd SwiftExplorerApp
swift run CodebaseExplorerAppCommands:
- “Combine Workspace to Single File”
- “Combine This Folder to Single File” (context menu)
Output options are configurable in VS Code settings under “Codebase Combiner”.
- Launch with
swift run CodebaseExplorerAppfromSwiftExplorerApp/. - Choose a folder, adjust filters, select files, then copy or save the combined prompt.
- The app keeps the last ready combined payload in local Application Support storage and offers a restore/copy control on relaunch.
- Use the sidebar footer or macOS app menu for Settings and support actions.
- Settings persist scan/output defaults through
@AppStorage.
- Tests:
npm test - Lint:
npm run lint - Format:
npm run format(ornpm run format:checkin CI)
- Build:
cd SwiftExplorerApp && swift build - Tests:
cd SwiftExplorerApp && swift test - Run:
cd SwiftExplorerApp && swift run CodebaseExplorerApp - Bundle launch smoke:
./script/build_and_run.sh --verify - Format (SwiftFormat):
cd SwiftExplorerApp && swiftformat . - Format check:
cd SwiftExplorerApp && swiftformat --lint .
- Local bundle validation:
Packaging/AppStore/build_app_store_package.sh --skip-signing - App Store signing/package flow: see
Packaging/AppStore/README.md - Output directory:
dist/app-store/
- JS: ESLint + Prettier + Mocha
- Swift: XCTest + SwiftFormat
- CI: GitHub Actions runs all quality gates on PRs
See CONTRIBUTING.md.
See SECURITY.md.
MIT. See LICENSE.
