{"id":13581360,"url":"https://github.com/beringresearch/macpine","last_synced_at":"2025-10-21T04:56:21.163Z","repository":{"id":37847897,"uuid":"494401866","full_name":"beringresearch/macpine","owner":"beringresearch","description":"Lightweight Linux VMs on MacOS","archived":false,"fork":false,"pushed_at":"2025-08-14T08:29:28.000Z","size":1084,"stargazers_count":995,"open_issues_count":10,"forks_count":28,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-10-19T10:47:54.807Z","etag":null,"topics":["golang","linux","m1-mac","macos","qemu","virtualization"],"latest_commit_sha":null,"homepage":"https://beringresearch.github.io/macpine/","language":"Go","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/beringresearch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2022-05-20T09:28:44.000Z","updated_at":"2025-10-18T21:29:02.000Z","dependencies_parsed_at":"2023-02-09T02:30:35.943Z","dependency_job_id":"79f16b7d-8b68-452c-8545-444da1c32404","html_url":"https://github.com/beringresearch/macpine","commit_stats":{"total_commits":376,"total_committers":10,"mean_commits":37.6,"dds":0.4414893617021277,"last_synced_commit":"049d913c6c60d3a3074a1ddab2872b9a08db58e0"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/beringresearch/macpine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beringresearch%2Fmacpine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beringresearch%2Fmacpine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beringresearch%2Fmacpine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beringresearch%2Fmacpine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beringresearch","download_url":"https://codeload.github.com/beringresearch/macpine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beringresearch%2Fmacpine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280207209,"owners_count":26290616,"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","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"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":["golang","linux","m1-mac","macos","qemu","virtualization"],"created_at":"2024-08-01T15:02:00.790Z","updated_at":"2025-10-21T04:56:21.148Z","avatar_url":"https://github.com/beringresearch.png","language":"Go","readme":"[![build](https://github.com/beringresearch/macpine/actions/workflows/build.yml/badge.svg)](https://github.com/beringresearch/macpine/actions/workflows/build.yml) [![Go Report Card](https://goreportcard.com/badge/github.com/beringresearch/macpine)](https://goreportcard.com/report/github.com/beringresearch/macpine)\n\n# Lightweight Alpine VMs on MacOS\n\nCreate and manage lightweight Alpine VMs on MacOS with:\n\n:repeat: Seamless port forwarding\n\n:card_index_dividers: Automatic file sharing\n\n:roller_coaster: Bridged networking\n\n:rocket: aarch64 and x86_64 emulation\n\n\u003cimg src=\"https://user-images.githubusercontent.com/5474655/233823903-357fcece-08e4-44fd-a173-b038c978de3f.gif\" width=\"80%\" /\u003e\n\n## Motivation\nThe goal of this project is to enable MacOS users to:\n\n1. Easily spin up and manage lightweight Alpine Linux environments.\n2. Use tiny VMs to take advantage of containerisation technologies, including [Incus](https://linuxcontainers.org/incus/), [LXD](https://linuxcontainers.org/lxd/introduction/) and Docker.\n3. Build and test software on x86_64 and aarch64 systems.\n\n# Installation\n\n`macpine` is intended for use on modern macOS. Support for older versions of macOS and other OSes may vary.\n\n## Install from Homebrew (recommended)\n\n```bash\nbrew install macpine # installs `alpine` command and `qemu` dependency automatically\n```\n\n## Get the latest binary\n\nDownload the [latest binary release](https://github.com/beringresearch/macpine/releases/latest) for your system and add it to your `$PATH`\nby moving it to e.g. `/usr/local/bin/`:\n\n```bash\narch=\"$([ `uname -m` = 'x86_64' ] \u0026\u0026 echo 'amd64' || echo 'arm64')\" # detect architecture\nwget \"https://github.com/beringresearch/macpine/releases/latest/download/alpine_darwin_$arch\"\nmv \"alpine_darwin_$arch\" alpine\nsudo chmod +x alpine\nsudo mv alpine /usr/local/bin/\n#export PATH=\"$PATH:/usr/local/bin\"\n```\n\nMacpine depends on QEMU \u003e= 7.22.0:\n\n```bash\nbrew install qemu\n```\n\n## Install from MacPorts\n\nYou can also install `macpine` via [MacPorts](https://www.macports.org):\n\n```bash\nsudo port install macpine\n```\n## Install from source\n\nBuilding from source requires a working `go` compiler, and running requires `qemu`:\n\n```bash\nbrew install go qemu\ngit clone https://github.com/beringresearch/macpine\ncd macpine\nmake            # compiles the project into a local bin/ directory\nmake install    # installs binaries to /usr/local/bin\n                # PREFIX=/some/other/path make install installs to /some/other/path\n```\n\n# Getting Started\n\nTo create and start a new instance:\n\n```bash\nalpine launch                       # launches with default parameters\nalpine launch -a aarch64            # create an aarch64 instance\nalpine launch -d 10G -c 4 -m 2048   # create an instance with a 10GB disk, 4 cpus, and 2GB of RAM\n\nalpine launch -h                    # view all configuration options and defaults\n```\n\nAccess instance via ssh:\n\n```bash\nalpine launch -s 22         # launch an instance and expose SSH port to host port 22\nalpine ssh instance-name    # attach shell to instance (replace `instance-name` as appropriate)\n```\n\nExpose additional instance ports to host:\n\n```bash\n# launch an instance, expose SSH to host port 2022 and forward host ports 8888 and 5432 to instance ports 8888 and 5432\nalpine launch -s 2022 -p 8888,5432\n\n# launch an instance, expose SSH to host port 8022, forward host port 8081 to instance port 8082, and forward\n# host port 8083 to instance port 8083\nalpine launch -s 8022 -p 8081:8082,8083\n\n# launch an instance, expose SSH to host port 9022, forward host port 9091 UDP to instance port 9091 UDP,\n# and forward host port 9092 UDP to instance port 9093 UDP\nalpine launch -s 9023 -p 9091u,9092:9093u\n```\n\nInstances can be easily packaged for backup or sharing as `.tar.gz` files:\n\n```bash\nalpine list\n\nNAME                 STATUS      SSH    PORTS   ARCH      PID     TAGS\ncheerful-result      Running     2022           aarch64   26568\nglittering-swing     Running     3022           x86_64    57206   emulation,intel\n```\n\n```bash\nalpine publish cheerful-result\n```\n\nThis will create a file `cheerful-result.tar.gz` which can be imported as:\n\n```bash\n#alpine delete cheerful-result\nalpine import cheerful-result.tar.gz\n```\n\nSee [all the docs](docs/docs) for more information:\n- [advanced port forwarding and securing instance SSH](docs/docs/create_instance.md)\n- [editing instance configurations](docs/docs/modify_instance.md)\n- [running incus within instances](docs/docs/incus_macpine.md)\n- [running LXD within instances](docs/docs/lxd_macpine.md)\n- [hardening instances](docs/docs/hardening.md)\n- [auto-starting instances at login](docs/docs/autostart.md)\n- [general troubleshooting](docs/docs/troubleshooting.md)\n\n## Command Reference\n\n```man\nCreate, control, and connect to Alpine instances.\n\nUsage:\n  alpine [command]\n\nAvailable Commands:\n  completion  Generate shell autocompletions.\n  delete      Delete instances.\n  edit        Edit instance configurations.\n  exec        execute a command on an instance over ssh.\n  help        Help about any command\n  import      Imports an instance archived with `alpine publish`.\n  info        Display information about instances.\n  launch      Create and start an instance.\n  list        List instances.\n  pause       Pause instances.\n  publish     Publish instances.\n  rename      Rename an instance.\n  restart     Stop and start instances.\n  resume      Unpause instances.\n  ssh         Attach an interactive shell to an instance via ssh.\n  start       Start instances.\n  stop        Stop instances.\n  tag         Add or remove tags from an instance.\n\nFlags:\n  -h, --help   help for alpine\n\nUse \"alpine [command] --help\" for more information about a command.\n```\n\n**Multiple instances in a command:** some commands (`delete`, `edit`, `info`, `pause`, `publish`, `restart`, `resume`, `start`, `stop`)\naccept multiple instance names and will repeat the operation over each unique named instance once.\n\n**Tags:** using `alpine tag`, instances can be tagged; tags can be used in multi-instance commands (see above) e.g.\n`alpine start +foobar` will start all instances which have had been tagged `foobar` with `alpine tag instance-name foobar`. Note that\nthe tag `launchctl-autostart` [is used for auto-starting instances at login](docs/docs/autostart.md).\n\n**Shell autocompletion:** shell command completion files (installed automatically with `brew install macpine`) can be generated with\n`alpine completion [bash|zsh|fish|powershell]`. See `alpine completion -h` or the [completion documentation](docs/docs/completions.md)\nfor more information.\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberingresearch%2Fmacpine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberingresearch%2Fmacpine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberingresearch%2Fmacpine/lists"}