{"id":17083939,"url":"https://github.com/spacekookie/luaenv","last_synced_at":"2026-05-10T16:44:56.223Z","repository":{"id":81288468,"uuid":"90663148","full_name":"spacekookie/luaenv","owner":"spacekookie","description":"Virtual lua environments and rock piles for development. Similar to RVM for Ruby","archived":false,"fork":false,"pushed_at":"2017-05-09T17:39:35.000Z","size":13,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T19:44:24.742Z","etag":null,"topics":["development","environments","fish-shell","lua"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/spacekookie.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":"2017-05-08T19:07:45.000Z","updated_at":"2020-12-01T08:31:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"eaf647e4-f71b-44ff-9a18-eca87c26e825","html_url":"https://github.com/spacekookie/luaenv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacekookie%2Fluaenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacekookie%2Fluaenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacekookie%2Fluaenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacekookie%2Fluaenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spacekookie","download_url":"https://codeload.github.com/spacekookie/luaenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245107678,"owners_count":20561904,"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":["development","environments","fish-shell","lua"],"created_at":"2024-10-14T13:04:19.975Z","updated_at":"2026-05-10T16:44:51.166Z","avatar_url":"https://github.com/spacekookie.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LUAENV\n\nLike RVM but for lua. Or [vert](https://github.com/aconbere/vert) but soooooooo much cooler\\*. You can either set your default lua version to something other than what your distribution has set or create local `piles` that only have specific dependencies installed for development.\n\nA lua `env` is also called a `pile`. Because...ya know. It's a `pile` of `rocks`. *rimshot*\n\n### Basics\n\nWhen you use `luarocks --local` packages get installed under `~/.luarocks`. With luaenv you can change that even if you don't want to use an env for a single project only. When setup correctly luaenv creates a new env for each lua version installed under `~/.local/share/luaenv/vanilla/\u003cversion\u003e/` that you can switch to easily with `luaenv switch \u003cversion\u003e`. Include that command in your `shellrc` if you like.\n\nOn the other hand you can create a new env to install packages into under `~/.local/share/luaenv/\u003cpile_name\u003e@\u003cversion\u003e/` or locally in whatever directory you desire. If there is both a \"local\" and \"global\" env the local one will take precedence.\n\nluaenv currently only supports the [fish](https://fishshell.org) shell\n\n### Tools available\n\n`luaenv` is the core cli tool which gives you access to a variety of functions. It's written entirely in fish which makes it immune to accidentally setting a bad lua path and requires you to have *no* dependencies besides the shell itself.\n\nFunctions available are\n\n - `create` creates new luaenvs with options\n - `destroy` destroys existing luaenvs\n - `lua` switches to the default env with the provided version\n - `use` uses an existing luaenv\n - `stop` stop using the current env. Is ignored if no env is currently in use\n - `workon` like `use` but changes into the registered work directory\n - `ls` lists all globally installed envs\n\nTools like lua, luajit, luarocks, etc are symlinked into the user path in a way that they shadow the system defaults.\n\n### Usage\n\nA quick rundown of how to use luaenv. We want to create a pile. You can specify a lua version as well as if you want it to be \"global\" or \"local\". Global piles will be installed under `~/.local/share/luaenv/`\n\n```bash\n$ luaenv create -i 5.1 -l env/\n```\nWhen adding `-l` you also need to add a directory that it will use to store the luaenv. Next up we want to activate the env. Because we created a local env, we need to pass the directory as a parameter\n\n```bash\n$ luaenv use env/\n$ luaenv stop  # This way we could stop using the environment\n```\n\nNow when we call `lua -v` we will get:\n\n```bash\nLua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio\n```\n\n**Hurray!**\n\n\n### So what exactly is the difference to vert? O.ô\n\n - luaenv doesn't clutter your home directory with more `.folders`. It uses unix standards where things should be stored\n - It supports my favourite shell [fish](https://fishshell.org) a lot better\n - It's general design is much closer to RVM than vert which is more based on the principles of python virtualenvs\n\n---\n\n\\* According to me, with no control group or external input. Margin of error is 100%. I don't even know how to do margin of error. Terms and conditions may and *will* apply.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacekookie%2Fluaenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspacekookie%2Fluaenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacekookie%2Fluaenv/lists"}