Files
gh-dnvriend-concat-glob-too…/commands/concat.md
2025-11-29 18:23:11 +08:00

40 lines
936 B
Markdown

---
description: Concatenate files matching glob patterns
argument-hint: patterns
---
Concatenate files matching PATTERNS to output file with separators.
## Usage
```bash
concat-glob-tool PATTERNS... --output-file FILE [OPTIONS]
```
## Arguments
- `PATTERNS...`: Glob patterns (e.g., `*.py`, `src/**/*.md`)
- `-o, --output-file FILE`: Output file path (required)
- `--separator TEXT`: Separator text (default: `---`)
- `-n, --dry-run`: Preview (default, enabled)
- `--no-dry-run`: Execute concatenation
- `-f, --force`: Overwrite existing file
- `-v/-vv/-vvv`: Verbosity (INFO/DEBUG/TRACE)
## Examples
```bash
# Preview concatenation (dry-run)
concat-glob-tool '*.py' -o output.txt
# Execute concatenation
concat-glob-tool '*.py' '*.md' -o output.txt --no-dry-run
# Custom separator
concat-glob-tool '*.py' -o output.txt --separator '===' --no-dry-run
```
## Output
Files concatenated with format: `\n---\n# FILENAME\n---\n`