{"id":37019075,"url":"https://github.com/jaccomoc/jactl-repl","last_synced_at":"2026-04-18T09:06:11.761Z","repository":{"id":151145999,"uuid":"614325837","full_name":"jaccomoc/jactl-repl","owner":"jaccomoc","description":"REPL for Jacsal scripting language","archived":false,"fork":false,"pushed_at":"2026-04-03T07:53:18.000Z","size":98,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-03T13:49:42.449Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaccomoc.png","metadata":{"files":{"readme":"docs/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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-15T11:10:51.000Z","updated_at":"2026-04-03T06:51:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"e528061b-3afb-486e-97a9-50ea9a145b53","html_url":"https://github.com/jaccomoc/jactl-repl","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/jaccomoc/jactl-repl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaccomoc%2Fjactl-repl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaccomoc%2Fjactl-repl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaccomoc%2Fjactl-repl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaccomoc%2Fjactl-repl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaccomoc","download_url":"https://codeload.github.com/jaccomoc/jactl-repl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaccomoc%2Fjactl-repl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31962892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-01-14T02:03:00.491Z","updated_at":"2026-04-18T09:06:11.753Z","avatar_url":"https://github.com/jaccomoc.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jactl-Repl\n\nThe Jactl-Repl project is a command line shell for the [Jactl](https://jactl.io) scripting\nlanguage.\nIt provides a Read-Evaluate-Print-Loop execution shell for testing simple Jactl scripts, using the excellent\n[JLine](https://github.com/jline/jline3) for command line editing and history.\n\n## Download\n\nYou can download the Jactl REPL jar file from Maven Central using this link:\n[https://repo1.maven.org/maven2/io/jactl/jactl-repl/2.7.1/jactl-repl-2.7.1.jar](https://repo1.maven.org/maven2/io/jactl/jactl-repl/2.7.1/jactl-repl-2.7.1.jar)\n\nSince it is built as a \"fat\" jar it can be run standalone (see [Running](#Running) section below).\n\n## Building\n\n### Requirements\n\n* Java 8+\n* JLine 3.21.0\n* Jactl 2.7.1\n* Gradle 8.0.2\n\n### Build\n\nDownload a zip file of the source from GitHub or use `git` to clone the repository: \n\n```shell\ngit clone https://github.com/jaccomoc/jactl-repl.git\ncd jactl-repl\n./gradlew build\n```\n\nThat will build `jactl-repl-${VERSION}.jar` under the `build/libs` directory where `${VERSION}` is the current version\nor the version of the tag/branch you are using.\n\n## Running\n\nTo run the REPL:\n```shell\njava -jar jactl-repl-${VERSION}.jar\n```\n\nThis will present a single `\u003e ` prompt where you can enter Jactl code that will be compiled, executed, and the\nresult printed out.\nIf the code looks like it continues on a subsequent line, the REPL will output two spaces and wait for the additional\ncode to be entered.\n\nFor example:\n```groovy\n$ java -jar jactl-repl-${VERSION}.jar\n\u003e def isPrime(n) { n \u003e 1 \u0026\u0026 !n.sqrt().filter{ it \u003e 0 \u0026\u0026 n % (it+1) == 0 } }\nFunction@1864869682\n\u003e def primes = 100.map{ it + 1 }.filter(isPrime)\n[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]\n\u003e primes.map{\n    def fib(n) { n \u003c= 2 ? 1 : fib(n - 1) + fib(n - 2) }\n    fib(it)\n  }.limit(10)\n[1, 2, 5, 13, 89, 233, 1597, 4181, 28657, 514229]\n\u003e\n```\n\nYou can use the up and down arrows on the keyboard to cycle through previous commands and the left and right arrows\nto navigate within a recent command if you want to change anything.\n\nOther keybindings map to common keybindings used by shells such as `bash` or `zsh` when in `emacs` mode.\n\nThe main ones to remember:\n\n| Key Binding                      | Description                                                                                                                                                                                                                                            |\n|:---------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `\u003cup-arrow\u003e`\u003cbr/\u003e`\u003cctrl-P\u003e`      | Previous input line                                                                                                                                                                                                                                    |\n| `\u003cdown-arrow\u003e`\u003cbr/\u003e`\u003cctrl-N\u003e`    | Next input line\n| `\u003cleft-arrow\u003e`\u003cbr/\u003e`\u003cctrl-B\u003e`    | Previous character\n| `\u003cright-arrrow\u003e`\u003cbr/\u003e`\u003cctrl-F\u003e`  | Next character\n| `\u003cctrl-A\u003e`                       | Beginning of line                                                                                                                                                                                                                                      |\n | `\u003cctrl-E\u003e`                       | End of line                                                                                                                                                                                                                                            |\n| `\u003cctrl-R\u003e`                       | Search backwards for previous matching input line (incremental search based on characters entered after the `\u003cctrl-R\u003e`).\u003cbr/\u003eOnce searching has started `\u003cctrl-R\u003e` will continue searching for the previous matching entry to the one being displayed. |\n | `\u003cctrl-L\u003e`                       | Clear the screen                                                                                                                                                                                                                                       | \n | `\u003cctrl-U\u003e`                       | Discard characters currently typed on the line                                                                                                                                                                                                         |\n\n### Commands\n\nAs well as entering Jactl code at the prompt, the REPL understands a limit set of commands that all start with `:`.\nFor example, `:help` or `:?` will print out the help text listing the commands available:\n```\n$ java -jar build/libs/jactl-repl-${VERSION}.jar\n\u003e :help\n\nAvailable commands:\n  :help          Help - print this text\n  :?             Alias for :help\n  :exit          Exit\n  :quit          Quit - alias for :exit\n  :clear         Clear current buffer\n  :read file     Read and execute contents of file\n  :load          Load - alias for :read\n  :vars          Show variables and their values (concise form)\n  :show          Show variables and their values in pretty printed form\n  :purge         Purge variables and imports\n  :imports       Show imports\n  :java          Enable/disable Java interoperability\n  :stack arg     Enable/disable stack traces for errors (true - enable, false - disable)\n  :debug level   Enable/disable debug output for errors (0 - off, 1 - on, 2 - more detail)\n  :history [n]   Show recent history (last n entries - defaults to 50)\n  :!n            Recall history entry with given number\n\n\u003e\n```\n\nThese are the commands:\n\n| Command                        | Description                                                                                               |\n|:-------------------------------|:----------------------------------------------------------------------------------------------------------|\n| `:help` `:?`                   | Print help text.                                                                                          |\n| `:exit` `:quit`                | Exit.                                                                                                     |\n| `:clear`                       | In the middle of a multi-line statement this will clear the buffer and allow you to start again.          |\n| `:read file`\u003cbr/\u003e `:load file` | Read/load a Jactl script file and compile and run it. Tab completion is availabe for the file name.       |\n| `:vars`                        | Show all top level variables and their values.                                                            |\n| `:show`                        | Show all top level variables and pretty print their values                                                |\n| `:purge`                       | Purge (delete) all variables.                                                                             |\n| `:imports`                     | List all imports                                                                                          |\n| `:java`                        | Toggle Java interoperability so scripts can access arbitrary Java classes.                                |\n| `:stack arg`                   | Enable/disable stack traces for errors (true - enable, false - disable)                                   |\n| `:debug level`                 | Enable/disable debug output (0 - disable, 1 - enable, 2 - more detail)                                    |\n| `:history n`                   | Show recent history (default 50 entries). If a value for n is given then that many entries will be shown. |\n| `:!n`                          | Recall history entry `n` and evaluate it.                                                                 |\n\n## History File\n\nThe command line history is persisted in a file called `.jactl_history` in your home directory.\nA maximum of 10000 lines is kept.\n\n## `.jactlrc` File\n\nAt start up time the contents of `~/.jactlrc` are read.\nThis file, if it exists, is itself a Jactl script and allows you to customise the behaviour of the Jactl REPL\nby setting the values of some global variables.\nThis file is also used when running Jactl scripts from the command line and is documented in the Jactl project\ndocumentation here: [.jactl File](https://jactl.io/command-line-scripts#jactlrc-file).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaccomoc%2Fjactl-repl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaccomoc%2Fjactl-repl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaccomoc%2Fjactl-repl/lists"}