Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:23:11 +08:00
commit d36eeec1dc
7 changed files with 678 additions and 0 deletions

39
commands/concat.md Normal file
View 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`