1.0.6 โ€ข Published 5 months ago

file-concat-tool v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

File Concat Tool ๐Ÿš€

npm Weekly Downloads License Open Issues PRs Welcome TypeScript Supported

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_modules directory
  • 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 .gitignore management ๐Ÿ”’
  • 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

  1. Navigate to your project:

    cd /path/to/your/project
  2. Run 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 .gitignore update

๐Ÿ“ File Processing Rules

StatusPatternExamplesAction Taken
โœ…All .ts and .tsx filesindex.ts, component.tsxIncluded in output
๐Ÿšซnode_modules directoryAny nested dependencySkipped entirely
๐ŸšซFiles containing "config"config.ts, app.config.tsExcluded from processing
๐ŸšซTest-related files*.test.ts, __tests__Ignored during scan
โš ๏ธExisting .gitignoreAny existing gitignoreAppended 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! ๐Ÿค–