{"id":26216009,"url":"https://github.com/oderwat/gunner-nu","last_synced_at":"2026-03-27T04:50:03.512Z","repository":{"id":269040601,"uuid":"906235199","full_name":"oderwat/gunner-nu","owner":"oderwat","description":"A simple Gleam code runner implemented as NuShell custom commands","archived":false,"fork":false,"pushed_at":"2024-12-23T02:48:11.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T17:52:00.780Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nushell","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/oderwat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-12-20T12:56:33.000Z","updated_at":"2024-12-23T02:48:15.000Z","dependencies_parsed_at":"2024-12-23T03:26:53.731Z","dependency_job_id":null,"html_url":"https://github.com/oderwat/gunner-nu","commit_stats":null,"previous_names":["oderwat/gunner","oderwat/gunner-nu"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oderwat%2Fgunner-nu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oderwat%2Fgunner-nu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oderwat%2Fgunner-nu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oderwat%2Fgunner-nu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oderwat","download_url":"https://codeload.github.com/oderwat/gunner-nu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243205224,"owners_count":20253427,"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":[],"created_at":"2025-03-12T11:19:00.602Z","updated_at":"2025-12-28T05:03:42.352Z","avatar_url":"https://github.com/oderwat.png","language":"Nushell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gunner-Nu\n\nGunner-Nu is a simple Gleam language code runner that allows users to execute Gleam code snippets easily and efficiently.\n\nYou need Nushell to use it! You activate it using `source gunner.nu`\n\n## Quick start\n\n```\n# nushell is required\ngit clone https://github.com/hara/gunner.git\nsource ./gunner/gunner.nu\ngunner init\ngunner run examples/hello.gleam\ngunner add gleam_erlang\ngunner run examples/erlang-only.gleam\ngunner gleam deps list\n```\n\n## Here are some of its key functionalities:\n\n* running Gleam code snippets `gunner \u003cgleam_file\u003e` without creating a gleam project\n* adding packages to the runner `gunner add \u003cpackage\u003e` (can also add multiple packages at once)\n* running with Erlang or JS targets (in the \"sandbox\") `gunner \u003cgleam_file\u003e --js`\n* formatting Gleam code `gunner format \u003cgleam_file\u003e`\n* builds the sandbox \"runner\" using docker `gunner init` optional: `gunner init \u003cpackage1\u003e \u003cpackage2\u003e ...` (e.g. `gunner init gleam_erlang gleam_otp`)\n* allows running `gleam` directly inside the sandbox `gunner gleam deps list` (this can result in unexpected behavior)\n* it uses a volume to cache the dependencies and parts of the build\n\n## Why this?\n\nI wanted a quick and easy way to run Gleam code snippets while learning and demonstrating Gleam. The [Gleam Tour](https://tour.gleam.run/) is great but can't add packages. It also seems not to be \"up to date\" with the latest Gleam features.\n\n## Why \"Gunner\"?\n\n**G**leam R**unner** and because you can shoot your foot with it.\n\n## Why \"Nushell\"?\n\nI like Nushell, and it allows me to quickly create a custom command with flags and parameters, help and completions.\n\n## Command reference\n\n### gunner init\n\n```\nInitialize the gleam runner image (needs docker)\n\nUsage:\n  \u003e gunner init ...(package) \n\nFlags:\n  -h, --help: Display the help message for this command\n\nParameters:\n  ...package \u003cany\u003e: the packages to add\n```\n\n### gunner\n\n```\nRun a gleam code file\n\nUsage:\n  \u003e gunner {flags} \u003cgleam_file\u003e \n\nSubcommands:\n  gunner add (custom) - Add a package to the runner\n  gunner format (custom) - Format a gleam code file\n  gunner gleam (custom) - Runs any command in the runner (with gleam)\n  gunner init (custom) - Initialize the gleam runner image (needs docker)\n\nFlags:\n  --js: using javastript target\n  -f, --format: format the code before running\n  -v, --verbose: output compililation information\n  -h, --help: Display the help message for this command\n\nParameters:\n  gleam_file \u003cany\u003e: the gleam code file to run\n```\n\n### gunner add\n\n```\nAdd a package to the runner\n\nUsage:\n  \u003e gunner add ...(package) \n\nFlags:\n  -h, --help: Display the help message for this command\n\nParameters:\n  ...package \u003cany\u003e: the packages to add\n```\n\n### gunner format\n\n```\nFormat a gleam code file\n\nUsage:\n  \u003e gunner format \u003cgleam_file\u003e \n\nFlags:\n  -h, --help: Display the help message for this command\n\nParameters:\n  gleam_file \u003cany\u003e: the gleam code file to format\n```\n\n### gunner gleam\n\n```\nRuns any command in the runner (with gleam)\n\nUsage:\n  \u003e gunner gleam ...(args) \n\nFlags:\n  -h, --help: Display the help message for this command\n\nParameters:\n  ...args \u003cany\u003e: the packages to add\n```\n\n### gunner de-init\n\n```\nRemove the gunner docker image and docker volume\n\nUsage:\n  \u003e gunner de-init \n\nFlags:\n  -h, --help: Display the help message for this command\n```\n\n## License and copyright\n\nThis project is released under the [MIT License](LICENSE.md).\n\nCopyright (c) 2024 Hans Raaf\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foderwat%2Fgunner-nu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foderwat%2Fgunner-nu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foderwat%2Fgunner-nu/lists"}