file-concat-tool v1.0.6
File Concat Tool ๐
Automated code context generator for AI prompting. Recursively combines .ts/.tsx files while ignoring common non-source directories and files.
๐จ Current Limitations
Supported File Types: .ts and .tsx only
Excluded Patterns:
node_modulesdirectory- Files containing "config" in name
- Test directories (
__tests__) and files (*.test.ts) - Automatically adds output to
.gitignore
Future updates may include additional file types and customization options
๐ก Motivation
Tired of manually copying code for AI prompts? This tool solves:
- Automatic
.gitignoremanagement ๐ - Smart test file exclusion ๐งช
- Recursive directory scanning ๐
- Clean output formatting ๐
Get complete code context with one command!
๐ Installation
Install globally via npm:
npm install -g file-concat-tool๐ฆ Usage
Navigate to your project:
cd /path/to/your/projectRun the tool:
file-concat
Output: Creates tsx_ts_files_content.txt with:
- Tool credit header
- Relative file paths
- File contents separated by clear markers
- Automatic
.gitignoreupdate
๐ File Processing Rules
| Status | Pattern | Examples | Action Taken |
|---|---|---|---|
| โ | All .ts and .tsx files | index.ts, component.tsx | Included in output |
| ๐ซ | node_modules directory | Any nested dependency | Skipped entirely |
| ๐ซ | Files containing "config" | config.ts, app.config.ts | Excluded from processing |
| ๐ซ | Test-related files | *.test.ts, __tests__ | Ignored during scan |
| โ ๏ธ | Existing .gitignore | Any existing gitignore | Appended with output file |
๐ Example Output
=== File: src/index.ts ===
import App from './App';
=== File: src/App.tsx ===
export default function App() { ... }
=== File: src/utils/helpers.ts ===
export function formatDate() { ... }๐ค Contributing
We welcome contributions! Please follow our workflow:
1. Fork the repository
2. Create a feature branch (git checkout -b feat/amazing-feature)
3. Commit your changes (git commit -m 'Add amazing feature')
4. Push to the branch (git push origin feat/amazing-feature)
5. Open a Pull Request
๐ License
MIT Licensed - See LICENSE for details.
Made with โค๏ธ by noluyorAbi - Automate All The Annoying Things! ๐ค