Search and transform files
Execute commands through POST /v1/disks/DISK/exec?kind=bash. Paths and search roots refer to the selected disk. The shell reference defines supported syntax.
Find matching lines
Section titled “Find matching lines”curl --fail-with-body --no-buffer \ "https://api.wabe.sh/v1/disks/demo/exec?kind=bash" \ -H "Authorization: Bearer YOUR_PROJECT_API_KEY" \ --data-binary "rg -n -F 'TODO' /notes"rg searches recursively. Use -F for literal text and quote patterns passed to commands.
rg -n -g '*.md' 'TODO|FIXME' /notesfind /notes -maxdepth 2 -type f -name '*.txt'cat /notes/tasks.txt | grep -i 'open' | head -n 20printf 'beta\nalpha\nalpha\n' | sort -uThese command snippets are the source sent to exec. They run after the requested files have been created.
Filter incoming data
Section titled “Filter incoming data”Put the command in the query parameter to make the request body its stdin. This request searches a local file without storing it first:
curl --fail-with-body --no-buffer \ "https://api.wabe.sh/v1/disks/demo/exec?kind=bash&script=grep%20-n%20TODO" \ -H "Authorization: Bearer YOUR_PROJECT_API_KEY" \ --data-binary @./notes.txtFor rg, use rg PATTERN - when reading the outer request body. A pipe or input redirect inside a wabe Disk shell script selects stdin automatically.
Publish transformed output
Section titled “Publish transformed output”curl --fail-with-body --no-buffer \ "https://api.wabe.sh/v1/disks/demo/exec?kind=bash" \ -H "Authorization: Bearer YOUR_PROJECT_API_KEY" \ --data-binary 'cat /notes/tasks.txt | sort -u > /notes/sorted.txt'Use a different destination for a streaming transform. For replacement in place, use supported sed -i or sort -o, which complete the transform before publishing the replacement.
Match behavior
Section titled “Match behavior”rg uses Rust regex syntax. It reads .ignore and .rgignore, and reads .gitignore when the search directory has a .git entry. Ignore files above an explicitly selected search root are not loaded. --hidden, --no-ignore, -a and quoted -g patterns adjust traversal and matching.
Text commands have a default 1 MiB line limit. Sort and selected operations use temporary storage. See command behavior and flags and limits.