kapi search-replace
kapi search-replace [files...]Search and Replace
Try it
Runs in your browser against a small sample file. Edit the command before running, or press Run to execute it as shown.
kapi search-replace messages.json --find "foo" --replace "bar"Flags
| Flag | Type | Default | Description |
|---|---|---|---|
| --concurrency, -j | int | 0 | max parallel files (0 = auto) |
| --dot-all | bool | false | Make the period character match every character including line-feed |
| --encoding, -e | string | UTF-8 | input file encoding |
| --fail-on-unknown | bool | false | exit with error if any file cannot be processed (default: skip with warning) |
| --format, -f | string | override input format detection | |
| --ignore-case | bool | false | Ignore case when matching search patterns |
| --json | bool | false | output results as JSON |
| --map, -m | stringArray | map glob pattern to format (e.g. '*.docx=okf_openxml:test') | |
| --multi-line | bool | false | Make ^ and $ match at the beginning and end of each line |
| --no-warn | bool | false | suppress warnings for skipped files |
| --output, -o | string | output path template (variables: {dir}, {name}, {ext}, {lang}) | |
| --output-dir | string | write outputs under DIR/{lang}/ (default: beside the input, mirroring its locale layout) | |
| --pack | bool | false | when transforming a .klz, also eject the result to the .klz (auto-pack) |
| --parallel-blocks | int | 0 | fan out block processing across N goroutines (0 = off) |
| --progress, -p | bool | false | show progress bar |
| --reg-ex | bool | false | Enable regular expression mode for all search patterns |
| --replace-all | bool | true | Replace all matches instead of only the first |
| --source | bool | false | Perform search and replace on source content |
| --source-lang | string | en | source language (e.g. en, en-US) |
| --strict | bool | false | alias for --fail-on-unknown |
| --target | bool | true | Perform search and replace on target content |
| --target-lang | string | target language (e.g. fr, de-DE) | |
| --trace | string | write flow trace JSON to file (for flow visualization) |
More examples
kapi search-replace page.html --find "colour" --replace "color"← Back to the Command Reference