Documentation
drenv manages DragonRuby installs and your game's dependencies. Run drenv <command> --help for flags on any command.
Install
Latest v0.19.0The install script downloads the right binary for your platform, drops it in ~/.drenv/bin, and prints the line to add to your $PATH.
curl -fsSL drenv.org/install.sh | bashirm https://drenv.org/install.ps1 | iexKeep it current with drenv self-update. On macOS, if Gatekeeper warns about a manually downloaded binary, run xattr -d com.apple.quarantine ./drenv.
Quick start
drenv install # download DragonRuby (asks which tier you own)
drenv new my-game # scaffold a project on that version
cd my-game
drenv run # launch itdrenv new uses your newest install by default. Standard, indie, and pro installs live side by side — drenv versions lists them, and a bare version resolves to your highest tier (pin one with e.g. 7.11-pro).
Dependencies
Declare libraries in mygame/drenv.toml. drenv resolves them into mygame/vendor/, pins them in drenv.lock, and generates a bundle file you require once:
drenv add github:Nitemaeric/conjurationThen add one line to the top of mygame/app/main.rb:
require 'app/drenv_bundle.rb'Commit drenv.toml and drenv.lock; the vendored copies are reproducible and stay out of git. Full guide, including publishing a library, in the dependencies docs.
Editor intelligenceEXPERIMENTAL
drenv ships a language server for DragonRuby projects — completions, docs, diagnostics, and navigation derived from your installed engine version. Zed and VS Code supported. Requires drenv 0.17.0 or newer.
Command reference
Install and organize DragonRuby versions.
drenv installDownload the latest DragonRuby GTK. Prompts for your tier the first time and remembers it — standard from itch.io, indie and pro from dragonruby.org. Pass --tier to choose or switch.
drenv register <path>Register a local install manually from a .zip or a directory. Pass --tier to file it under indie/pro.
drenv uninstall <version>Remove an installed version (tier-resolved). Confirms first; pass -y to skip.
drenv versionsList installed versions, each tier labelled, with the current project's version marked.
drenv changelog [version]Print the changelog entry for a version (defaults to the latest installed).
Create, switch, run, and ship your game.
drenv new <name>Scaffold a new project on your newest install (or --version <v>), with a sensible .gitignore.
drenv use [version]Switch the current project to another installed version. Defaults to your newest install.
drenv versionPrint the current project's DragonRuby version.
drenv run [args...]Sync dependencies and launch the project. Watches path deps and re-vendors them as you edit. Extra args go to dragonruby.
drenv publish [args...]Verify dependencies against the lockfile, then run dragonruby-publish — always shipping exactly what's locked.
Vendor Ruby libraries into your game, Bundler-style.
drenv add <source>Add and vendor a dependency. Sources: github:owner/repo[@tag], git:<url>, url:<url>, path:<dir>.
drenv remove <name>Remove a dependency and its vendored copy.
drenv listList declared dependencies and the revision each is locked to.
drenv update [name]Re-resolve dependencies to their latest and rewrite the lockfile. A name updates just that one.
drenv outdatedShow dependencies whose upstream has moved past the lockfile.
drenv bundleResolve and vendor everything from drenv.toml. Pass --frozen to verify against the lockfile (CI).
DragonRuby language server for your editor (experimental). Full feature list on the rule reference page.
drenv lspStart the language server (over stdio) — completions, hover docs, signatures, diagnostics, and navigation from your installed engine. Editors launch this for you; you don't run it by hand.
drenv lsp doctorDiagnose why the language server isn't working: whether a DragonRuby project is detected here, which engine resolves, whether drenv is on your PATH, and which editors are installed.
Keep the tool itself current.
drenv self-updateUpdate drenv itself to the latest release.