Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vmarcosp/findr

🔎 A simple and intuitive find & replace command-line interface.
https://github.com/vmarcosp/findr

esy find find-and-replace find-cli find-files finder ocaml reason-native replace replace-text sed

Last synced: about 1 month ago
JSON representation

🔎 A simple and intuitive find & replace command-line interface.

Awesome Lists containing this project

README

        







Preview
Features
Commands
License



## Preview





Find command








Replace command + regex


## Installation
### Using npm or yarn
```
npm i -g @vmarcosp/findr
# or
yarn global add @vmarcosp/findr
```
### Using curl + script
```
curl -fsSL https://github.com/vmarcosp/findr/raw/master/scripts/install.sh | bash
```

## OS Support
- :white_check_mark:   Mac
- :white_check_mark:   Linux
- :gear:   Windows *(WIP)*

## Features

- :white_check_mark:   Find
- :white_check_mark:   Replace
- :white_check_mark:   Colorized output
- :white_check_mark:   Highlight and preview occurrences
- :white_check_mark:   Select files to replace
- :white_check_mark:   Regex support
- ⚙️   Select ocurrences to replace *(WIP)*

## Commands

### Find command:
Positional arguments:
- 1º *Text to find*

Named arguments:
- `--folder` or `-f`
- `--regex` or `-r` regex mode
- `--extension` or `-e` filter files by extension

Example:
```sh
# Basic usage
findr find "write_file" --folder src

# Filtering by extension
findr find "write_file" --folder src --extension re,js
```

### Replace command:
Positional arguments:
- 1º *Text to replace*
- 2º *New text*

Named arguments:
- `--folder` or `-f`
- `--regex` or `-r` *regex mode*
- `--extension` or `-e` filter files by extension

Example:
```sh
# Basic usage
findr replace "write_file" "create_file" --folder src

# Regex mode
findr replace "\bwrite_file" "create_file" --folder src --regex
```

## License

MIT