| Crates.io | fara |
| lib.rs | fara |
| version | 0.1.21 |
| created_at | 2025-05-29 08:44:57.179002+00 |
| updated_at | 2025-05-29 17:02:10.914457+00 |
| description | Find And Replace App — a fast and flexible command-line tool to search and replace text across files and folders. |
| homepage | |
| repository | https://github.com/ibilalkayy/fara |
| max_upload_size | |
| id | 1693606 |
| size | 37,599 |
fara stands for Find And Replace App — a fast and flexible command-line tool to search and replace text across files and folders.
**/*.rs.--ignore-case.--backup (if needed).You can install fara using Cargo:
cargo install fara
Alternatively, clone the repository and build it manually:
git clone https://github.com/ibilalkayy/fara.git
cd fara
cargo build && cargo install --path .
fara --find "Foo" --replace "Bar" --target "./src/**/*.rs"
This will search for "Foo" in all .rs files under ./src/ and replace it with "Bar".
| Option | Description |
|---|---|
-f, --find <TEXT> |
The text to search for |
-r, --replace <TEXT> |
The new text to replace the matched text |
-t, --target <PATH> |
The file or folder to search in (supports glob patterns) |
-e, --regex <REGEX> |
Use a regular expression for advanced matching |
--ignore-case |
Ignore case when matching text |
--confirm |
Ask for confirmation before replacing |
--dry-run |
Show the changes without modifying the file (coming soon) |
--output <FILE> |
Write the changed text to a different output file |
--backup <PATTERN> |
Create a backup of matching files |
-h, --help |
Show help information |
-V, --version |
Show version information |
Replace "Hello" with "Hi" in all .txt files in a folder:
fara --find "Hello" --replace "Hi" --target "./notes/**/*.txt" --confirm
Use regex to replace digits with a dash:
fara --regex "\d+" --replace "-" --target "./data/*.csv" --confirm
Case-insensitive replace:
fara --find "welcome" --replace "Hello" --target "main.rs" --ignore-case
We welcome contributions! If you find a bug, want to request a feature, or contribute code, feel free to open an issue or submit a pull request.
Licensed under the Apache-2.0 License.