{"id":19850506,"url":"https://github.com/mroth/ramdisk","last_synced_at":"2025-10-13T17:14:21.221Z","repository":{"id":57534612,"uuid":"164532489","full_name":"mroth/ramdisk","owner":"mroth","description":":ram: Convenience wrapper for managing RAM disks","archived":false,"fork":false,"pushed_at":"2022-12-19T02:09:09.000Z","size":24,"stargazers_count":48,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-21T08:40:41.647Z","etag":null,"topics":["cli","linux","macos","ramdisk"],"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/mroth.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}},"created_at":"2019-01-08T01:51:26.000Z","updated_at":"2025-02-28T08:21:53.000Z","dependencies_parsed_at":"2023-01-29T20:31:36.489Z","dependency_job_id":null,"html_url":"https://github.com/mroth/ramdisk","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mroth/ramdisk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mroth%2Framdisk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mroth%2Framdisk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mroth%2Framdisk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mroth%2Framdisk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mroth","download_url":"https://codeload.github.com/mroth/ramdisk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mroth%2Framdisk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016287,"owners_count":26085827,"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-13T02:00:06.723Z","response_time":61,"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":["cli","linux","macos","ramdisk"],"created_at":"2024-11-12T13:26:24.944Z","updated_at":"2025-10-13T17:14:21.206Z","avatar_url":"https://github.com/mroth.png","language":"Go","readme":"# ramdisk :ram:\n\n\u003c!-- disable badges until more stable\n[![Build Status](https://travis-ci.com/mroth/ramdisk.svg?branch=master)](https://travis-ci.com/mroth/ramdisk)\n[![Go Report Card](https://goreportcard.com/badge/github.com/mroth/ramdisk)](https://goreportcard.com/report/github.com/mroth/ramdisk)\n[![GoDoc](https://godoc.org/github.com/mroth/ramdisk?status.svg)](https://godoc.org/github.com/mroth/ramdisk)\n--\u003e\n\nConvenience wrapper for managing RAM disks across different operating systems\nwith a consistent interface.\n\n## Usage\n\nHelp screen:\n```\n$ ramdisk -h\nramdisk 0.1.0 🐏\n\nUsage:\n  ramdisk [options] create [\u003cmount-path\u003e]\n  ramdisk destroy \u003cdevice-path\u003e\n\nOptions:\n  -h -help      Show this screen.\n  -v            Verbose output.\n  -size=\u003cmb\u003e    Size in megabytes [default: 32].\n```\n\nCreating a new ram disk with a specified size:\n```\n$ ramdisk -size=512 create\n512MB ramdisk created as /dev/disk5, mounted at /tmp/ramdisk-401987900\nTo later remove do: `ramdisk destroy /dev/disk5`\n```\n\n## Installation\n\n* 💾 Download a [precompiled binary](https://github.com/mroth/ramdisk/releases/).\n* 🍺 Homebrew on macOS: `brew install mroth/tap/ramdisk`\n* 📦 Compile via Go toolchain: `go install github.com/mroth/ramdisk/cmd/ramdisk@latest`\n\n## Platform Support\n\n### macOS :white_check_mark:\n\nWorks great and does not require superuser access.\n\nThe basic steps followed are:\n\n- Create an unmounted but attached device in RAM that consists of the\n  appropriate number of device blocks via `hdiutil`.\n- Format a new uniquely named HFS+ volume on that device via `newfs_hfs`.\n- Mounts the volume at a uniquely generated path within the `/tmp` filesystem,\n  via `mount`.\n\nThis normally requires a sequence of arcane commands on the macOS command line\nwhich I can never remember, and thus was the primary reason I created this\nwrapper.\n\n### Linux :white_check_mark:\n\nThings are quite simple and work great via `tmpfs` on Linux! (But note that most\nLinux implementations unfortunately requires sudo access to mount new volumes.)\n\n\u003csmall\u003e\nIf you prefer a sudo-less route, most modern Linux on kernel 2.6+ often\n_already_ has `/dev/shm` mounted, which is memory backed, so you can also just\nuse that without any initialization at all.\n\u003c/small\u003e\n\n### Windows :x:\n\nThis would be great, unfortunately there is no built-in support at the operating\nsystem level at current time. The standard solution seems to be to use [ImDisk],\nbut I haven't built support for that into this library yet because well, relying\non third-party drivers to be installed on an end user system isn't going to\nwork.\n\n[ImDisk]: http://www.ltr-data.se/opencode.html/#ImDisk","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmroth%2Framdisk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmroth%2Framdisk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmroth%2Framdisk/lists"}