{"id":20858714,"url":"https://github.com/thesephist/rush","last_synced_at":"2026-02-16T06:02:44.324Z","repository":{"id":97277496,"uuid":"488506202","full_name":"thesephist/rush","owner":"thesephist","description":"Rush lets you work on many files at once","archived":false,"fork":false,"pushed_at":"2022-05-04T11:30:45.000Z","size":9,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-07T05:45:08.012Z","etag":null,"topics":["cli","oaklang","unix-command"],"latest_commit_sha":null,"homepage":"","language":"Makefile","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/thesephist.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":"2022-05-04T08:18:26.000Z","updated_at":"2025-05-30T16:43:21.000Z","dependencies_parsed_at":"2023-06-26T03:02:26.767Z","dependency_job_id":null,"html_url":"https://github.com/thesephist/rush","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/thesephist/rush","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesephist%2Frush","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesephist%2Frush/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesephist%2Frush/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesephist%2Frush/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thesephist","download_url":"https://codeload.github.com/thesephist/rush/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesephist%2Frush/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29501364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T05:57:17.024Z","status":"ssl_error","status_checked_at":"2026-02-16T05:56:49.929Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","oaklang","unix-command"],"created_at":"2024-11-18T04:47:05.324Z","updated_at":"2026-02-16T06:02:44.306Z","avatar_url":"https://github.com/thesephist.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rush 🪶\n\n**Rush** is a command-line utility that lets you run one command on many files using a simple command template syntax. For example, let's say you have a bunch of `.jpeg` files, and you really want them to be named `.jpg` instead. You can do\n\n```sh\nrush mv *.jpg '{{name}}.jpg'\n```\n\nto accomplish this. If you want to instead convert them to PNGs and tag them with their last-modified dates, you can do\n\n```sh\nrush convert *.jpg '{{mdate}}-{{name}}.png'\n```\n\nWhen run, Rush first creates an output file name for each input file using the template string given (you'll find the full list of allowed parameters below). Then, the given command (`mv` or `convert` above) is run on each of the input-output pairs. In other words, running `rush cp *.pdf '{{name}}.{{mdate}}.pdf'` on a few files named `alpha.pdf`, `beta.pdf`, and `gamma.pdf` would run something like\n\n```sh\ncp alpha.pdf alpha.2021-04-29.pdf\ncp beta.pdf beta.2021-08-12.pdf\ncp gamma.pdf gamma.2022-05-04.pdf\n```\n\nIn this way, Rush makes doing one thing with many files pretty quick and painless. I originally made Rush to help me mass-rename and convert image files, but I've realized since then that this pattern is pretty universally useful. You _can_ do _some_ of the things Rush can do with a `for` loop in Bash, but I always forget the syntax, and it's much harder to get right. So most of the time, I reach for `rush`.\n\n## How do I use it?\n\nTyping `rush --help` gives us the help menu. If you'd rather learn by example, see the [examples](#examples).\n\n```\nRush lets you work on many files at once.\n\nUsage\n\trush [cmd] [src-files] [rename-spec] [options]\n\nOptions\n\t--[h]elp    Show this help message\n\t--stdin     Receive source files list from STDIN\n\t--[d]ry-run Print all operations, but do not run them\n\t--[v]erbose Print all executed commands as they are run\n\t--version   Print version information and exit\n\t--[f]orce   Overwrite any conflicting files\n\t--debug     Print CLI arguments for debugging then exit\n\nTemplate parameters\n\tpath        Full absolute path of the file\n\t            e.g. \"/home/me/image.jpg\"\n\tdir         Directory of the file\n\t            e.g. \"/home/me\"\n\tfullname    Entire file name, including extension\n\t            e.g. \"image.jpg\"\n\tname        File name, without the extension\n\t            e.g. \"image\"\n\text         Extension of the file (string after last '.', or\n\t            empty string if there is no '.')\n\t            e.g. \"jpg\"\n\ti           Integer index of this file when the file list is\n\t            sorted lexicographically\n\t            e.g. \"10\"\n\tmtime       Last-modified time of the file as a UNIX timestamp\n\t            e.g. \"1651654423\"\n\tmdate       Last-modified date of the file as an ISO date string\n\t            e.g. \"2022-05-04\"\n\tlen         Size of the file in bytes\n\t            e.g. \"4094\"\n```\n\n### Examples\n\nChange extensions on a bunch of files.\n\n```sh\nrush mv *.jpeg '{{name}}.jpg'\n```\n\nRename all PDF files to numbers in increasing order.\n\n```sh\nrush mv *.pdf '{{i}}.pdf'\n```\n\nAdd a prefix \"secret\" to all files, but don't delete the originals.\n\n```sh\nrush cp * 'secret-{{fullname}}'\n```\n\nOrganize files by their last-modified dates into folders and add their last-modified timestamps to their names. (For this to work, the folders must exist beforehand.)\n\n```sh\nrush mv * '{{mdate}}/{{name}}-{{mtime}}.{{ext}}'\n```\n\nConvert all PNGs to JPGs using [ImageMagick \"convert\"](https://imagemagick.org/script/convert.php).\n\n```sh\nrush convert *.png '{{name}}.jpg'\n```\n\n## Install\n\nIf you have [Oak](https://oaklang.org) installed, you can build from source (see below). Otherwise, I provide pre-built binaries for macOS and Linux (both x86) on the [releases page](https://github.com/thesephist/rush/releases). Just drop those into your `$PATH` and you should be good to go.\n\n## Build and development\n\nRush is built with my [Oak programming language](https://oaklang.org), and I manage build tasks with a Makefile.\n\n- `make` or `make build` builds a version of Rush at `./rush`\n- `make install` installs Rush to `/usr/local/bin`, in case that's where you like to keep your bins\n- `make fmt` or `make f` formats all Oak source files tracked by Git\n\n## Why's it called _Rush_?\n\nIt's short, doesn't conflict with any commonly-used CLIs, and felt like a fast... word to me.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesephist%2Frush","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthesephist%2Frush","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesephist%2Frush/lists"}