Initial commit
This commit is contained in:
39
commands/concat.md
Normal file
39
commands/concat.md
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
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`
|
||||
Reference in New Issue
Block a user