Repository navigation
FAQ
Welcome to the concat FAQ! This page answers common questions about the tool.
concat is a command-line utility that scans a project directory and combines all its files into a single, comprehensive Markdown file. The output starts with a directory tree structure, followed by the complete contents of each file.
The primary use case for concat is to package the entire context of a software project into a single text block. This format is perfect for pasting into Large Language Models (LLMs) like ChatGPT, Claude, or Gemini. It allows the AI to get a complete understanding of your codebase at once, which is far more efficient than uploading files one by one. 🤖
This is a common issue that usually points to one of two things:
-
The file is not in your system's PATH. The
PATHis a list of directories your terminal searches for executable programs. For theconcatcommand to work from anywhere, the file must be in one of those directories.- On Linux and macOS, a common location is
/usr/local/bin. Make sure you completed thesudo mv concat /usr/local/bin/step. - On Windows, ensure the folder where you placed
concat.exeis listed in yourPathEnvironment Variable.
- On Linux and macOS, a common location is
-
The file is not executable. On Linux and macOS, files downloaded with
curldon't always have permission to run. You need to grant it permission.- Run this command:
chmod +x concat
- Run this command:
Yes. The release process automatically builds a binary for Windows (concat-windows-amd64.exe and concat-windows-arm64.exe). You can download it from the [Releases page](https://github.com/about80ninjas/concat/releases/latest) and use it in PowerShell or Command Prompt.
Use the --exclude flag. This flag accepts glob patterns, which are like wildcards for file paths. To exclude a single directory and all its contents, use /* at the end of the directory name.
# Exclude a single directory
concat --exclude "node_modules/*" .
# Exclude multiple directories and file types
concat --exclude "node_modules/*,vendor/*,*.log" .Use the --include flag with a comma-separated list of glob patterns. When this flag is used, concat will ignore any file that does not match one of the patterns.
concat --include "*.py,*.md" .By default, concat detects binary files and skips them. It will print a [skipped binary file] message in their place to keep the output clean and readable.
If you absolutely need to include the data from a binary file, you can use the --include-binaries flag. This will write a hexadecimal dump of the file's contents into the output.
Yes. Use the -o (or --output) flag to specify your desired filename.
concat -o my-project-snapshot.md .Contributions are highly encouraged! If you've found a bug or have an idea for a new feature, please open an issue on GitHub. If you'd like to contribute code, you can fork the repository and submit a pull request. The README.md contains instructions for building the project from source.