agent-sync uses glob patterns in multiple contexts:
inputs
field of configuration files to select input filesinclude
, includeRaw
, reference
, and referenceRaw
) to dynamically include filesPattern | Description | Example |
---|---|---|
* |
Matches any sequence of characters within a single path component | docs/*.md matches all .md files in the docs directory |
** |
Matches any sequence of characters across multiple path components (recursive) | docs/**/*.md matches all .md files in docs and all its subdirectories |
? |
Matches exactly one character | file?.md matches file1.md but not file10.md |
[abc] |
Matches any character within the brackets | file[123].md matches file1.md , file2.md , or file3.md |
{a,b,c} |
Matches any of the comma-separated patterns | file.{md,txt} matches file.md or file.txt |
!pattern |
Excludes files that match the pattern | !*_test.md excludes all files ending with _test.md |
!
prefix) are processed first!
prefix) are applied to filter the resultsFor example:
files/**/*.md # Include all Markdown files in the files directory and subdirectories
!files/**/*_test.md # Exclude all test files
The final list of files will be sorted alphabetically by path. If you need files to be processed in a specific order, list them individually without glob patterns.
*.md # All Markdown files in the current directory
docs/*.md # All Markdown files in the docs directory
**/*.md # All Markdown files in any directory
docs/**/*.md # All Markdown files in the docs directory and its subdirectories
{config,settings}.json # Matches both config.json and settings.json
docs/*.{md,txt} # Matches .md and .txt files in the docs directory
*.md # Include all Markdown files
!*_test.md # Exclude test Markdown files
src/**/*.{js,ts} # All JavaScript and TypeScript files in src directory and subdirectories
!src/**/test/** # Exclude all files in test directories
Previous | Next |
---|---|
Input and Output Processing | Logging |