Apps / Text Replacer
Text Replacer v1.0.0
Find and replace text across every matching file in a folder using one or more rules, with a safe preview, dry-run, automatic backup and undo.
The omniscient:// link needs a protocol handler on your machine, which is not built yet. Until then it does nothing — use the commands below.
Actions
Jump to:
previewreplaceundo
Preview replacements
preview
Show which files contain matches for the find/replace rules and how many, without changing anything.
Inputs
Name Type Required / default Values and notes
folder
path
required
rules
json
required
pattern
string
optional, default *
recursive
bool
optional, default false
Outputs
Name Type Notes
files
json
skipped
json
scanned
int
Replace across folder
replace
Destructive
Apply the find/replace rules to every matching file in the folder. Backs up any file it changes before writing, so it can be undone. Use --dry-run to preview without writing.
Inputs
Name Type Required / default Values and notes
folder
path
required
rules
json
required
pattern
string
optional, default *
recursive
bool
optional, default false
backup
bool
optional, default true
Outputs
Name Type Notes
changed
json
skipped
json
scanned
int
backup_dir
path
Undo last replace
undo
Destructive
Restore files from the most recent (or a named) Text Replacer backup for this folder.
Inputs
Name Type Required / default Values and notes
folder
path
required
backup
string
optional, default ""
Outputs
Name Type Notes
restored
int
backup_dir
path
Requires
Python >=3.10
Packages none
Models none
Use it
preview
replace
undo
Preview replacements
Command line
shell Copy
python app.py --action preview --params '{"folder": "D:/path/to/folder", "rules": {}}'
Run from the app’s own folder. Single quotes work in bash and PowerShell; in cmd.exe use double quotes and escape the inner ones.
MCP tool
mcp Copy
run_action("text-replacer", "preview", {"folder": "D:/path/to/folder", "rules": {}})
Workflow node
json Copy
{
"id": "n0",
"app": "text-replacer",
"action": "preview",
"params": {
"folder": "D:/path/to/folder",
"rules": {}
},
"inputs": {}
}
Replace across folder
Command line
shell Copy
python app.py --action replace --params '{"folder": "D:/path/to/folder", "rules": {}}'
# preview first - destructive action, nothing is changed:
python app.py --action replace --params '{"folder": "D:/path/to/folder", "rules": {}}' --dry-run
Run from the app’s own folder. Single quotes work in bash and PowerShell; in cmd.exe use double quotes and escape the inner ones.
MCP tool
mcp Copy
run_action("text-replacer", "replace", {"folder": "D:/path/to/folder", "rules": {}})
# preview first:
run_action("text-replacer", "replace", {"folder": "D:/path/to/folder", "rules": {}}, dry_run=true)
Workflow node
json Copy
{
"id": "n0",
"app": "text-replacer",
"action": "replace",
"params": {
"folder": "D:/path/to/folder",
"rules": {}
},
"inputs": {}
}
Undo last replace
Command line
shell Copy
python app.py --action undo --params '{"folder": "D:/path/to/folder"}'
# preview first - destructive action, nothing is changed:
python app.py --action undo --params '{"folder": "D:/path/to/folder"}' --dry-run
Run from the app’s own folder. Single quotes work in bash and PowerShell; in cmd.exe use double quotes and escape the inner ones.
MCP tool
mcp Copy
run_action("text-replacer", "undo", {"folder": "D:/path/to/folder"})
# preview first:
run_action("text-replacer", "undo", {"folder": "D:/path/to/folder"}, dry_run=true)
Workflow node
json Copy
{
"id": "n0",
"app": "text-replacer",
"action": "undo",
"params": {
"folder": "D:/path/to/folder"
},
"inputs": {}
}
Example prompts
Things you can say to Claude, Cursor or Codex once the MCP server is registered.
replace all 'foo' with 'bar' in every .txt file in D:/notes, preview first remove every occurrence of '<<TODO>>' from the files in this folder swap 'localhost:8000' for 'api.example.com' across all files in D:/project, recursively