Skip to main content
M

ployenv

momiedejiyi/ployenv

DSH host plugin that drives the ployenv local runtime version manager from the chat (list/install/use runtimes, ship a ployenv binary, and inject its path list into session shells).

Install

dsh plugin --profile web add github:momiedejiyi/ployenv

README

ployenv

English | 简体中文

License: MIT

A portable, single-binary version manager for local language runtimes — Node.js, Java, Go and Python — with nothing to install and nothing to configure.

No installer, no account, no licence checks, and no changes to your system environment. Drop one executable anywhere; its runtimes and settings live next to it.

$ ployenv install node@20
$ ployenv use node@20
$ ployenv shell

Why ployenv

  • Non-invasive — never edits the system PATH, .npmrc, pip.ini or the registry. Activating a version affects one terminal window only.
  • Explicit — official sources by default. ployenv adopts an existing installation only when you ask it to, and never guesses.
  • Predictable — the effective version comes from a project file (.ployenv, plus .nvmrc, .tool-versions and friends) or from one global default, and PLOYENV_<LANG>_VERSION overrides both. Nothing ever falls back to "some installed version".
  • Portable — a single ~7.5 MB static binary with zero third-party dependencies. Move the folder, keep everything.
  • Scriptable — --json output is pure ASCII (non-ASCII characters are escaped as \uXXXX), so it survives any console code page.

Install

Windows 10/11 is the primary target; Linux and macOS (amd64/arm64) are built and validated on native runners by CI. The macOS binaries are unsigned and unnotarized, so the first run may need xattr -d com.apple.quarantine. Building needs Go 1.22+.

go build -ldflags "-s -w" -o dist/ployenv.exe ./cmd/ployenv

Or, if script execution is allowed:

powershell -ExecutionPolicy Bypass -File .\build.ps1 -Test

Then put the binary on your PATH, for example D:\PloyEnv\ployenv.exe.

Quick start

# see what is available
ployenv available node --limit 5

# install a runtime (22, lts and latest all work)
ployenv install node@20
ployenv install java@21
ployenv install go@1.24
ployenv install python@3.12

# record a default, then inspect
ployenv use node@20
ployenv current
ployenv list

# activate it in this terminal only
ployenv shell

Pin a project by adding a .ployenv file next to its source:

node=20.20.2
java=21
go=1.24
python=3.12

ployenv use node@20 --project writes or updates this file for you.

Documentation

The full command reference, configuration and troubleshooting guide lives in docs/manual.md (简体中文).

Highlights:

CommandDescription
ployenv supportList supported runtimes
ployenv available <lang>Installable versions
ployenv doctorPaths, writability and resolution report
ployenv configShow or change every setting

Run ployenv --help for the built-in summary.

Roadmap

Done

  • Portable data directory, one-time base configuration
  • Node.js, Java, Go and Python, each described by a built-in Spec
  • Mirror fallback, and interrupt-safe cleanup (Ctrl+C leaves no partial files)
  • SHA-256 verification for Go archives (node / Java / Python checksums still to come)
  • Session activation without touching the system environment
  • --json machine interface
  • Prebuilt archives published to GitHub Releases (windows / linux / darwin on amd64 / arm64, with checksums)

Next

  • Configurable runtime definitions (FR-11). Today runtime definitions are compiled-in Go code; config.json cannot add or override one yet
  • Checksums for node, Java and Python, and a doctor connectivity check against every configured download source
  • Remaining runtimes on the same Spec definition, including the database and middleware kinds (MySQL, Redis, Nginx) that already have a reserved kind field
  • shell completion scripts; --dry-run is rejected until it is implemented (it used to be accepted and silently ignored, BUG-020)
  • Log rotation honoring logs.keep

Not planned

  • Automatic switching on cd — it needs a global shell hook, which would break the non-invasive promise. Use ployenv shell in each project terminal.

License

MIT © MOMIEDEJIYI

Related plugins