{"id":17674779,"url":"https://github.com/ademking/replacestr","last_synced_at":"2026-05-02T05:05:14.662Z","repository":{"id":65556936,"uuid":"520653990","full_name":"Ademking/replacestr","owner":"Ademking","description":"Simple utility to replace all occurrences of a string in your files","archived":false,"fork":false,"pushed_at":"2022-08-02T21:36:19.000Z","size":5,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-05T15:47:22.572Z","etag":null,"topics":["cli","replace-text","terminal","terminal-cli","tool"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/replacestr","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ademking.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-02T21:26:09.000Z","updated_at":"2022-08-06T19:46:40.000Z","dependencies_parsed_at":"2023-01-29T09:35:11.112Z","dependency_job_id":null,"html_url":"https://github.com/Ademking/replacestr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ademking/replacestr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ademking%2Freplacestr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ademking%2Freplacestr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ademking%2Freplacestr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ademking%2Freplacestr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ademking","download_url":"https://codeload.github.com/Ademking/replacestr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ademking%2Freplacestr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263550840,"owners_count":23478874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","replace-text","terminal","terminal-cli","tool"],"created_at":"2024-10-24T07:08:54.993Z","updated_at":"2026-05-02T05:05:14.635Z","avatar_url":"https://github.com/Ademking.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://i.imgur.com/4122j5z.png\" alt=\"screenshot\"\u003e\n\u003c/div\u003e\n\n# replacestr \n\nreplacestr is a simple utility that can be used to replace a string in your files. Replacing a string in a file is a common task for developers.\nYou don't need to know how to write a regex to replace a string in a file. Easy to use and easy to understand.\n\nFor example, if you want to replace all occurrences of `foo` with `bar` in a file, you can use the following command:\n\n```\nreplacestr -f myfile.txt -s foo -r bar\n```\n\n## Usage\n\n```\n$ replacestr -f myfile.txt -s foo -r bar\n$ replacestr -f myfolder/*.txt -s foo -r bar\n$ replacestr -f myfolder/**/*.txt -s foo -r bar\n$ replacestr -f *.txt -s foo -r bar -i test.txt # ignore case\n$ replacestr -f C:/Users/Adem/Myfolder/*.txt -s old -r new -i test.txt\n```\n\nTo display the help for the tool use the -h flag:\n\n```\n$ replacestr -h\n```\n\n| Flag (short)  | Flag (long)           | Description                           |\n| ------------- | --------------------- | ------------------------------------- |\n| -f \u003cfiles...\u003e | --files \u003cfiles...\u003e    | File(s) or folder to search in.       |\n| -s \u003cstring\u003e   | --search \u003cstring\u003e     | String to search for.                 |\n| -r \u003cstring\u003e   | --replace \u003cstring\u003e    | String to replace with.               |\n| -i \u003cfiles...\u003e | --ignore \u003cfiles...\u003e   | File(s) to ignore.                    |\n| -e \u003cencoding\u003e | --encoding \u003cencoding\u003e | Encoding to use. Default \"utf-8\"      |\n| -q            | --silent              | Silent mode: no output                |\n| -h            | --help                | Show help                             |\n| -v            | --version             | Show version                          |\n| -p            | --pretend             | Pretend mode: no changes will be made |\n| -a            | --about               | About replacestr                      |\n| -o \u003cfile\u003e     | --output \u003cfile\u003e       | Output file                           |\n\n## Installation\n\n#### Using npx you can run the script without installing it first:\n\n```\nnpx replacestr -f myfile.txt -s foo -r bar\n```\n\n#### Globally via npm\n\n```\nnpm install -g replacestr\n```\n\nThis will install replacestr globally so that it may be run from the command line anywhere.\n\n## Development\n\nCheckout this repository locally, then:\n\n```\n$ npm i\n$ npm run start -- --help\n```\n\n## Changelog\n\n[1.0.0] Initial release.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fademking%2Freplacestr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fademking%2Freplacestr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fademking%2Freplacestr/lists"}