{"id":16139104,"url":"https://github.com/jdolitsky/moopo","last_synced_at":"2026-04-21T22:35:48.253Z","repository":{"id":147312885,"uuid":"172657029","full_name":"jdolitsky/moopo","owner":"jdolitsky","description":"Build Porter bundles with MoonScript","archived":false,"fork":false,"pushed_at":"2019-03-06T04:08:04.000Z","size":463,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-02T13:12:20.655Z","etag":null,"topics":["cnab","go","golang","lua","moonscript","porter"],"latest_commit_sha":null,"homepage":"","language":"Go","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/jdolitsky.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":"2019-02-26T07:08:04.000Z","updated_at":"2020-01-29T06:42:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"e644b461-2263-4754-a815-4d7a51aa11cd","html_url":"https://github.com/jdolitsky/moopo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jdolitsky/moopo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdolitsky%2Fmoopo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdolitsky%2Fmoopo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdolitsky%2Fmoopo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdolitsky%2Fmoopo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdolitsky","download_url":"https://codeload.github.com/jdolitsky/moopo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdolitsky%2Fmoopo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32113312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"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":["cnab","go","golang","lua","moonscript","porter"],"created_at":"2024-10-09T23:47:22.328Z","updated_at":"2026-04-21T22:35:48.248Z","avatar_url":"https://github.com/jdolitsky.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg align=\"right\" src=\"moopo.png\" width=\"140px\" /\u003e\n\n# moopo\n\n`moopo` is a pre-processor for [Porter](https://porter.sh/) which allows you to build bundles with [MoonScript](https://moonscript.org/).\n\nSee also: [lupo](https://github.com/jdolitsky/lupo)\n\n## Install\n\n*Note: MoonScript should be installed, and system should already have a working Porter installation (see [install instructions](https://porter.sh/install/)). There must also be a `luac` executable in PATH (temporarily required by [Azure/golua](https://github.com/Azure/golua)).*\n\nJust build from source and copy into PATH (requires git, make, and Go 1.11+):\n```\n(\n  set -x \u0026\u0026 mkdir -p $GOPATH/src/github.com/jdolitsky/ \u0026\u0026 \\\n  cd $GOPATH/src/github.com/jdolitsky/ \u0026\u0026 \\\n  [ -d moopo/ ] || git clone git@github.com:jdolitsky/moopo.git \u0026\u0026 \\\n  cd moopo/ \u0026\u0026 make build \u0026\u0026 sudo mv bin/moopo /usr/local/bin/\n)\n```\n\n## How to use\n\nSimply use the `moopo` command in place of the `porter` command.\n\nReplace your existing `porter.yaml` bundle definition with `porter.moon`.\n\nHere is a simple `porter.moon` example (notice global `bundle` variable):\n```moon\nname = \"my-bundle\"\nversion = \"0.1.0\"\ndescription = \"this application is extremely important\"\n\n-- Example of pushing to your personal Docker Hub account,\n-- assuming USER env var matches your Docker Hub username\n-- (make sure you create the \"my-bundle\" repo ahead of time)\nregistry_host = \"docker.io\"\nregistry_repo = os.getenv(\"USER\")..\"/\"..name\n\n-- Class that represents our app\nclass MyApp\n    new: =\u003e\n        @bundle = {\n            name: name,\n            version: version,\n            description: description,\n            invocationImage: registry_host..\"/\"..registry_repo..\":\"..version,\n            mixins: {},\n            install: {},\n            uninstall: {}\n        }\n\n    add_mixin: (mixin) =\u003e\n        table.insert(@bundle.mixins, mixin)\n\n    add_install_step: (step) =\u003e\n        table.insert(@bundle.install, step)\n\n    add_uninstall_step: (step) =\u003e\n        table.insert(@bundle.uninstall, step)\n\n-- Method that returns valid input for exec mixin\necho = (desc, msg) -\u003e\n    {exec: {description: desc, command: \"bash\", arguments: { \"-c\", \"echo \"..msg}}}\n\n-- Create bundle and modify\napp = MyApp!\napp\\add_mixin(\"exec\")\napp\\add_install_step(echo(\"Install \"..name, \"Hello World\"))\napp\\add_uninstall_step(echo(\"Uninstall \"..name, \"Goodbye World\"))\n\n-- Export bundle\nexport bundle = app.bundle\n```\n\nRun `moopo` to build the bundle from `porter.moon`:\n```\n$ moopo build\nCopying dependencies ===\u003e\nCopying mixins ===\u003e\nCopying mixin exec ===\u003e\nCopying mixin porter ===\u003e\n...\n```\n\nIf a file named `porter.moon` is detected in the working directory, `moopo` will attempt to use this to generate a `porter.yaml` file in the format expected by Porter, then run Porter itself.\n\nNote: if there is an existing `porter.yaml`, it will be completely overwritten. You may even wish to place `porter.yaml` (and `porter.lua`) in your `.gitignore`, as it is dynamically generated each run.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdolitsky%2Fmoopo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdolitsky%2Fmoopo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdolitsky%2Fmoopo/lists"}