{"id":15015623,"url":"https://github.com/themanyone/replace","last_synced_at":"2026-04-01T16:59:51.755Z","repository":{"id":225976661,"uuid":"767370475","full_name":"themanyone/REPLace","owner":"themanyone","description":"A REPL for all langauges with *your* editor and this simple bash script.","archived":false,"fork":false,"pushed_at":"2024-03-08T03:53:51.000Z","size":77,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-19T17:11:15.985Z","etag":null,"topics":["c","c17","cobol","cpp","cpp17","csharp","fortran","go","hare","java","node","perl","php","python","repl","rust","zig"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/themanyone.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":"2024-03-05T07:08:25.000Z","updated_at":"2024-03-05T23:00:26.000Z","dependencies_parsed_at":"2024-11-18T17:44:44.239Z","dependency_job_id":"ea4bf538-c5c4-4712-a1a7-2d2c57b3b7b1","html_url":"https://github.com/themanyone/REPLace","commit_stats":null,"previous_names":["themanyone/replace"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themanyone%2FREPLace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themanyone%2FREPLace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themanyone%2FREPLace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themanyone%2FREPLace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/themanyone","download_url":"https://codeload.github.com/themanyone/REPLace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243313691,"owners_count":20271230,"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":["c","c17","cobol","cpp","cpp17","csharp","fortran","go","hare","java","node","perl","php","python","repl","rust","zig"],"created_at":"2024-09-24T19:47:42.459Z","updated_at":"2025-12-28T11:46:48.585Z","avatar_url":"https://github.com/themanyone.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REPL Ace\n\u003cimg src=\"go.png\" title=\"Instant REPL\" width=\"300\" align=\"right\"\u003e\nA REPL for all languages and compilers. One command is all you need.\n\n    repl.sh [source]\n    or\n    repl.sh [compiler] -run [source] [optional args]\n\n## Dependencies\n\nInstall `fswatch`, available from distro package manager.\n\nGet optional compiler, preprocessor for your favorite language.\n\n    TinyCC | https://repo.or.cz/tinycc.git/\n    Crap   | https://themanyone.github.io/crap/\n    Go     | https://go.dev/\n    Zig    | https://ziglang.org/\n    Hare   | https://sr.ht/~sircmpwn/hare/sources\n\n## Installation\n\nCopy scripts to somewhere in $PATH.\n    install -D r* /usr/local/bin\n\n## Make Sources Executable\n    chmod +x hello.c\n\nPut this header at the top of the source code.\n    //usr/local/bin/tcc $0 -run -- foo bar baz; exit $?\n\nThis tricks the shell into running the compiler.\n\nThe -- foo bar baz arguments are optional, for testing.\nYour script can access them in the argv[] argument list.\n\nHere's one for go compiler.\n    //path/to/go run \"$0\" -- foo bar \u0026\u0026 exit $?\n\nAnother example for zig.\n    //path/to/repl.sh zig run hello.zig fizz buzz \u0026\u0026 exit $?\n\nIt's basically a bash script, so you can run other commands.\n\n## Usage\n\nNow you can run scripted source code from the terminal.\n\n    * Try it.\n        `./hello.c`\n    * Launch repl.sh command or alias.\n        `repl.sh ./hello.c`\n    * Edit the [source] with your favorite editor.\n        `nano hello.c`\n    * Script will re-run whenever it is saved in the editor.\n\nYou could also run python scripts whenever they are updated.\n    `repl.sh hello.py`\n\nUse it for any kind of script, configuration, or AI agent.\n\n## Advanced Usage\n\nSometimes it's a challenge making sources into executable scripts. We can also compile and run them from the command line, using the editor's F5 `run` command, or by using an alias.\n\nMake aliases for your favorite REPLs.\n    alias repl_c='repl.sh tcc -run hello.c hello world'\n    alias repl_go='repl.sh go run hello.go foo bar baz'\n    alias repl_zig='repl.sh zig run hello.zig fizz buzz'\n\nPut aliases in `~/.bashrc` for later use.\n\n## Extra arguments\n\nSupply extra arguments to access them in source code.\n    `repl.sh tcc -run hello.c hello world`\n    `printf(\"%s %s\", argv[1], argv[2]); //outputs \"hello world\"`\n\nPrint arguments in golang.\n    `repl.sh go run hello.go foo bar baz`\n\n    ```go\n    package main; import (\"fmt\"; \"os\")\n    func main() {\n        fmt.Printf(\"Args 1: %s\\n\", os.Args[1]) // prints foo\n    }\n    ```\n\n## Runner\n\nUse `runner` if your compiler has no `-run` option.\nCode `runner` can be used in script headers or commands.\nThe `-o` is optional if `repl.sh` can find the executable.\n\nIn script headers.\n    //path/to/runner my_compiler \"$0\" -- my args \u0026\u0026 exit 0\n    //path/to/runner go build \"$0\" -- foo bar \u0026\u0026 exit 0\n\nFrom command line\n    repl.sh zig run hello.zig fizz buzz\n    repl.sh runner gcc $CFLAGS $LIBS -o test test.c -- my args\n    repl.sh runner hare build hello.ha -- my args\n\n## Sharing\n\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation; either version 2 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License along\n    with this program; if not, write to the Free Software Foundation, Inc.,\n    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\n## Updates\n\n    Get updates from https://github.com/themanyone/REPLace.git\n\n## Other REPLs\n\n    Itcc: repl for c-like languages https://github.com/themanyone/itcc\n    various languages in the browser http://repl.it\n    csharp: included with monodevelop http://www.csharphelp.com/\n    psysh: comes with php for php code http://php.net\n    evcxr: another Rust REPL https://github.com/evcxr/evcxr\n    ipython: interactive python https://github.com/ipython/ipython\n    rep.lua: a lua REPL https://github.com/hoelzro/lua-repl\n    re.pl: perl command line https://github.com/daurnimator/rep\n    d8-314: from V8, JavaScript https://developers.google.com/v8/\n    csi: from chicken, a scheme REPL http://call-cc.org/\n    RStudio: interactive R coding https://rstudio.com/\n    Ruby IRB: REPL tool for Ruby https://ruby-doc.org/stdlib-2.7.2/libdoc/irb/rdoc/IRB.html\n    numerous bash-like shells and interpreters\n\n## Author's links\n\n    - GitHub https://github.com/themanyone\n    - YouTube https://www.youtube.com/themanyone\n    - Mastodon https://mastodon.social/@themanyone\n    - Linkedin https://www.linkedin.com/in/henry-kroll-iii-93860426/\n    - [TheNerdShow.com](http://thenerdshow.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemanyone%2Freplace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthemanyone%2Freplace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemanyone%2Freplace/lists"}