{"id":13898061,"url":"https://github.com/aperezdc/rockz","last_synced_at":"2025-03-18T23:30:37.395Z","repository":{"id":142776968,"uuid":"53591222","full_name":"aperezdc/rockz","owner":"aperezdc","description":"Virtualfish-alike Lua+LuaRocks “Rockenv” wrapper for Zsh","archived":false,"fork":false,"pushed_at":"2024-06-02T08:47:58.000Z","size":29,"stargazers_count":9,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-28T12:55:34.291Z","etag":null,"topics":["environment","lua","luajit","luarocks","profile-manager"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aperezdc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-03-10T14:33:33.000Z","updated_at":"2024-06-02T08:48:02.000Z","dependencies_parsed_at":"2024-10-27T19:28:38.090Z","dependency_job_id":null,"html_url":"https://github.com/aperezdc/rockz","commit_stats":{"total_commits":35,"total_committers":1,"mean_commits":35.0,"dds":0.0,"last_synced_commit":"24f31d763342ac0bd8806efe7c7639e813ed9673"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aperezdc%2Frockz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aperezdc%2Frockz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aperezdc%2Frockz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aperezdc%2Frockz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aperezdc","download_url":"https://codeload.github.com/aperezdc/rockz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243955668,"owners_count":20374371,"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":["environment","lua","luajit","luarocks","profile-manager"],"created_at":"2024-08-06T18:04:02.556Z","updated_at":"2025-03-18T23:30:37.053Z","avatar_url":"https://github.com/aperezdc.png","language":"Shell","funding_links":[],"categories":["Plugins","Shell"],"sub_categories":["ZSH on Windows","Zinit (née zplugin)"],"readme":"# RockZ\n\nA [Z shell](http://zsh.org) virtualenvwrapper-lookalike, loosely based on Adam\nBrenecki's [virtualfish](https://github.com/adambrenecki/virtualfish) for the\n[Fish shell](http://fishshell.com), and highly based upon my own\n[VirtualZ](https://github.com/aperezdc/virtualz).\n\n* For [Lua](http://www.lua.org) instead of Python.\n* Using [LuaRocks](https://luarocks.org) instead of Pip.\n\n☺\n\n## Quickstart\n\nRockZ needs the paths to the Lua header files and the Lua library in order to\nbootstrap LuaRocks — so in turn LuaRocks knows how to build binary modules.\nThe names and locations vary in each system, so instead RockZ expects the user\nto define a *profile* which stores the needed paths.\n\nThe following should work for creating a `default` profile in most GNU/Linux\ndistributions:\n\n```sh\nrockz profile default \\\n  --lua=/usr/bin/lua \\\n  --include=/usr/include \\\n  --library=/usr/lib/liblua.so\n```\n\nOnce you have a profile, you can create a new “rockenv” (Lua+LuaRocks\nenvironment):\n\n```sh\nrockz new myenv\n```\n\nThe variables `${ROCK_ENV}` and `${ROCK_ENV_NAME}` will be set with the full\npath to the rockenv prefix directory and the rockenv name, respectively.\n\nEnvironments can be managed with the rest of `rockz` subcommands:\n\n```sh\nrockz activate myenv\nrockz new myotherenv\nrockz rm myenv\nrockz deactivate\n```\n\n\n## Installation \u0026 Setup\n\nThe recommended way is to use a plugin manager. By default, the location where\nRockZ looks for rockenvs is `~/.rockenvs`. This can be changed by setting the\ndesired path in the `${ROCKZ_HOME}` variable.\n\nWith [zgen](https://github.com/tarjoilija/zgen), add the following to your\n`.zshrc`:\n\n```sh\nzgen load aperezdc/rockz\n```\n\n### Using with LuaJIT\n\nRockZ works just fine with [LuaJIT](http://luajit.org). You will need to\ncreate a *profile* pointing to the LuaJIT binary and libraries. Use the\n`profile` subcommand as follows:\n\n```sh\nrockz profile luajit \\\n  --lua=/usr/bin/luajit \\\n  --include=/usr/include/luajit-2.0 \\\n  --library=/usr/lib/libluajit-5.1.so.2\n```\n\n*(Note that the actual paths may be different in your system — please\nchange the paths in the above invocation accordingly.)*\n\nNow that the profile is available, use `--profile` with the `new` subcommand\nto create a LuaJIT-powered environment:\n\n```sh\nrockz new luajitenv --profile=luajit\n```\n\nNow because RockZ created a symbolic link names `lua` to the Lua interpreter\nspecified in the profile, using `lua` will actually run LuaJIT:\n\n```\n% readlink \"$(which lua)\"\n/usr/bin/luajit-2.0.4\n% lua\nLuaJIT 2.0.4 -- Copyright (C) 2005-2015 Mike Pall. http://luajit.org/\nJIT: ON CMOV SSE2 SSE3 fold cse dce fwd dse narrow loop abc sink fuse\n\u003e\n```\n\nIsn't that convenient?\n\n\n### Rockenv name in the prompt\n\nWhen a rockenv is active, the following variables are defined:\n\n- `ROCK_ENV` contains the full path to the active environment.\n- `ROCK_ENV_NAME` contains the name of the active environment.\n\nFor example, the following will prepend the name of the current rockenv to\nyour existing prompt, but only if there is an environment active:\n\n```sh\nPROMPT=\"\\${ROCK_ENV_NAME:+\\${ROCK_ENV_NAME} }${PROMPT}\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faperezdc%2Frockz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faperezdc%2Frockz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faperezdc%2Frockz/lists"}