{"repo":"nk9/okapi","free":true,"listed":false,"github":"https://github.com/nk9/okapi","clone":"git clone https://github.com/nk9/okapi.git","description":"Find lines across files by regex and edit them all at once with your $EDITOR","language":"Rust","stars":70,"topics":["command-line-tool","editing","regex"],"license":"Apache-2.0","category":"cli-tools","readme_excerpt":"Okapi: Find it. Fix it. Finished. Sometimes you know how to identify lines which need editing, but crafting a replacement string is either hard or impossible. Enter okapi , a batch editor with a difference. Match lines from across thousands of files by regex, then edit them all in one temporary file with your $EDITOR . Multiple cursors, rectangular selection, saved patterns—go nuts. You can use the full power of your editor to make changes across a whole codebase. Once you save and close, okapi writes everything back to where it came from. --- How it works 1. Okapi runs ripgrep with the provided pattern. 2. Each matching line is collected (up to a configurable limit). 3. All matching lines are cached and opened together in your editor. 4. You edit the lines directly and save the file. 5. When the editor quits cleanly, okapi applies your changes back to the source files. Don't worry if you changed a file after starting your edit session, okapi checks for conflicts before writing a line back. If it finds one, it will show you the conflict and skip that edit. --- Usage Installation If you don't have Homebrew, you can download the release binary for your platform from the Releases page. I don't currently have Windows binaries, but would be happy to accept a PR to add that to the workflow. (I don't use Windows, so I'd want to know that the tool works reliably there.) Finding lines Find all lines in the current directory, recursively, containing \"Anatome\". Note that ripgrep is case","default_branch":null,"files":null,"tree":[],"storefront":"/r/nk9","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nk9/okapi/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}