{"id":24506209,"url":"https://github.com/pvdb/git-repl","last_synced_at":"2026-05-17T13:34:55.084Z","repository":{"id":272257648,"uuid":"915960163","full_name":"pvdb/git-repl","owner":"pvdb","description":"The `git` REPL you've been looking for!","archived":false,"fork":false,"pushed_at":"2025-01-15T20:02:06.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T11:54:31.480Z","etag":null,"topics":["cli","git","repl","subcommand","terminal"],"latest_commit_sha":null,"homepage":"","language":null,"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/pvdb.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":"2025-01-13T07:27:31.000Z","updated_at":"2025-01-15T20:02:08.000Z","dependencies_parsed_at":"2025-01-13T09:51:28.003Z","dependency_job_id":null,"html_url":"https://github.com/pvdb/git-repl","commit_stats":null,"previous_names":["pvdb/git-repl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvdb%2Fgit-repl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvdb%2Fgit-repl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvdb%2Fgit-repl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvdb%2Fgit-repl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pvdb","download_url":"https://codeload.github.com/pvdb/git-repl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243707304,"owners_count":20334615,"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","git","repl","subcommand","terminal"],"created_at":"2025-01-21T23:33:29.889Z","updated_at":"2026-05-17T13:34:55.078Z","avatar_url":"https://github.com/pvdb.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-repl\n\nThe [generic, command-agnostic `repl` utility][pvdb/repl] can be installed as a `git` external command, after which it can be used as a regular `git` subcommand:\n\n```sh\n$ git repl\n\"git %s\" \u003e\u003e ls-files\n...\n\"git %s\" \u003e\u003e status --short\n...\n\"git %s\" \u003e\u003e diff\n...\n\"git %s\" \u003e\u003e add -p README.md\n...\n\"git %s\" \u003e\u003e commit -m 'fix typo in README'\n...\n\"git %s\" \u003e\u003e ^D\n$ _\n```\n\nAs illustrated above, it provides a generic REPL environment that can be used to interact with `git` in a more interactive way than the regular `git` command-line tool allows.\n\n## installation\n\n`git-repl` is installed as a symlink to the generic `repl` command-line utility and therefore requires that `repl` is installed on your system first.\n\n`repl` itself comes in two flavors: a Ruby version and a Go version, so you have the choice between the two, depending on which language runtime you prefer to have installed on your system; both versions are functionally equivalent.\n\nFirst, install the latest version of the [generic `repl` utility][pvdb/repl] in a directory that is on your `PATH`; you can adjust `REPL_INSTALL_DIR` in the below instructions to match your shell environment.\n\nNext, in the same directory on your `PATH` where `repl` is installed, create a symlink named `git-repl` to the `repl` utility; that way you can run `git repl` without any changes to your system's `$PATH`.\n\n### (option 1) if `repl` is already installed\n\nCreate `git-repl` as a symlink to `repl`:\n\n    REPL_INSTALL_DIR=/usr/local/bin\n    ln -s \"${REPL_INSTALL_DIR}/repl\" \"${REPL_INSTALL_DIR}/git-repl\"\n\nYou can now run `git repl` in the same way you invoke any other `git` subcommand.\n\n### (option 2) install the Ruby version of the `repl` utility\n\n[`repl.rb`][repl.rb] is the Ruby version of the `repl` utility, which requires Ruby to be installed on your system, but has no other external dependencies _(that is: it only uses classes and modules from [Ruby's standard library](https://docs.ruby-lang.org/en/master/standard_library_md.html))_.\n\n    REPL_INSTALL_DIR=/usr/local/bin\n    curl -s -O https://raw.githubusercontent.com/pvdb/repl/main/repl.rb\n    mv ./repl.rb \"${REPL_INSTALL_DIR}/repl\"\n    chmod 755 \"${REPL_INSTALL_DIR}/repl\"\n    ln -s \"${REPL_INSTALL_DIR}/repl\" \"${REPL_INSTALL_DIR}/git-repl\"\n\nFinally, ensure and check that `git-repl` is executable\n\n    git-repl --version\n\nWith `rlwrap` installed, and for the Ruby version of `repl` this will be something like:\n\n\u003e `repl 1.0.0 (rlwrap 0.46.1, ruby 3.3.6)`\n\n### (option 3) install the Go version of the `repl` script\n\n[`repl.go`][repl.go] is the Go version of the `repl` utility, which requires Go to be installed on your system, but has no other external dependencies _(that is: it only uses packages from [Go's standard library](https://pkg.go.dev/std))_.\n\n    REPL_INSTALL_DIR=/usr/local/bin\n    curl -s -O https://raw.githubusercontent.com/pvdb/repl/main/repl.go\n    go build -o \"${REPL_INSTALL_DIR}/repl\" repl.go\n    rm repl.go\n    chmod 755 \"${REPL_INSTALL_DIR}/repl\"\n    ln -s \"${REPL_INSTALL_DIR}/repl\" \"${REPL_INSTALL_DIR}/git-repl\"\n\nFinally, ensure and check that `git-repl` is executable\n\n    git-repl --version\n\nWith `rlwrap` installed, and for the Go version of `repl` this will be something like:\n\n\u003e `repl 1.0.0 (rlwrap 0.46.1, go1.23.5)`\n\n## usage\n\nOnce installed, a `git` REPL can be launched using `git repl` (or less commonly using `git-repl` instead).\n\nRunning `git repl [args]` is equivalent to running `repl git [args]`, which means that `git` is the default command that is invoked in the REPL environment.\n\nIt also means that it supports all the same command-line options as the `repl` utility itself, which can be used to customize the REPL environment to your liking\n\nUse `git-repl --help` or else go to the full documentation of [the `repl` utility][pvdb/repl] for more information.\n\n## (optional) add `readline` support to `repl`\n\nThe `repl` utility wraps itself in [`rlwrap`][rlwrap] if it is installed on your system.\n\n`rlwrap` is a GNU `readline` wrapper that provides command history and line editing capabilities for any command-line tool that lacks these features.\n\n## example\n\nComing soon\n\n## generate a `git`-specific completion file for `repl`\n\n```sh\ngit --list-cmds=\"main,alias,others\" \u003e ${HOME}/.repl/git\n```\n\nThe default `repl` completion directory is `${HOME}/.repl/` but can be overridden by setting the `REPL_COMPLETION_DIR` environment variable _(in your shell environment or else in `$(HOME)/.replrc`)_.\n\n[pvdb/repl]: https://github.com/pvdb/repl\n[rlwrap]: https://github.com/hanslub42/rlwrap\n\n[repl.rb]: https://raw.githubusercontent.com/pvdb/repl/refs/heads/main/repl.rb\n[repl.go]: https://raw.githubusercontent.com/pvdb/repl/refs/heads/main/repl.go\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvdb%2Fgit-repl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpvdb%2Fgit-repl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvdb%2Fgit-repl/lists"}