{"id":14156571,"url":"https://github.com/untitaker/spacemod","last_synced_at":"2025-04-07T06:12:23.429Z","repository":{"id":45309950,"uuid":"314855511","full_name":"untitaker/spacemod","owner":"untitaker","description":"An easy to understand and powerful text search-and-replace tool","archived":false,"fork":false,"pushed_at":"2025-01-28T14:20:56.000Z","size":148,"stargazers_count":45,"open_issues_count":5,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-31T05:06:28.968Z","etag":null,"topics":["codemod","grep","refactoring","refactoring-tools","rust","search-and-replace"],"latest_commit_sha":null,"homepage":"https://untitaker.github.io/spacemod/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/untitaker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-21T16:33:19.000Z","updated_at":"2025-01-28T14:20:30.000Z","dependencies_parsed_at":"2025-03-13T08:01:05.026Z","dependency_job_id":"b4a2d427-3e95-4e19-a805-c2694e18c8c1","html_url":"https://github.com/untitaker/spacemod","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untitaker%2Fspacemod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untitaker%2Fspacemod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untitaker%2Fspacemod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untitaker%2Fspacemod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/untitaker","download_url":"https://codeload.github.com/untitaker/spacemod/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601449,"owners_count":20964864,"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":["codemod","grep","refactoring","refactoring-tools","rust","search-and-replace"],"created_at":"2024-08-17T08:06:35.931Z","updated_at":"2025-04-07T06:12:23.413Z","avatar_url":"https://github.com/untitaker.png","language":"Rust","readme":"\u003cdiv class=\"oranda-hide\"\u003e\n\n# spacemod\n\n\u003c/div\u003e\n\n`spacemod` is a text search-and-replace tool optimized towards refactoring\ncode.\n\n```python\n# example.py (before)\ncopy_file(to_file=to_file, from_file=from_file)\n\ncopy_file(\n    to_file=get_file(filepath, mode),\n    from_file=get_file_writer(other_filepath, other_mode)\n)\n```\n\n```sh\n# Use spacemod's custom pattern-matching language to deal with whitespace easier.\n# Without -S, normal regex patterns are assumed.\n\n$ spacemod -S \\\n  'copy_file ( to_file= (.*) , from_file= (.*) )' \\\n  'copy_file($2, $1)' \\\n  example.py\n\n# spacemod will open interactive TUI and ask for approval of diffs. Use\n# --accept-all to use spacemod non-interactively.\n```\n\n```python\n# example.py (after)\ncopy_file(from_file, to_file)\n\ncopy_file(get_file_writer(other_filepath, other_mode)\n, get_file(filepath, mode))\n```\n\nIt is very similar to [fastmod](https://github.com/facebookincubator/fastmod),\nbut with some additional features:\n\n* **Undo stack.** Approved a diff too soon? Hit `[u]ndo` to revert.\n* **Yes to all diffs like this.** Auto-approve future diffs with the exact same content.\n* **Parenthesis-matching (experimental).** Besides regex, spacemod also\n  supports a custom regex-like language that requires less escaping and\n  whitespace-handling.\n\n\u003c!-- oranda already provides installation instructions --\u003e\n\u003cdiv class=\"oranda-hide\"\u003e\n\n## Documentation\n\nCheck [the website](https://untitaker.github.io/spacemod/) for installation and usage.\n\n## License\n\nLicensed under `MIT`, see `./LICENSE`.\n\n\u003c/div\u003e\n","funding_links":[],"categories":["rust","Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funtitaker%2Fspacemod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funtitaker%2Fspacemod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funtitaker%2Fspacemod/lists"}