fix --plan: exact switch commands for nvm, pyenv, mise and asdf

Open Beginner friendly
#61 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
3-5 days
Newbie friendliness
72/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
cli

Research direction

Start in src/devready/managers.py, where the ordered MANAGERS table and the fnm-only exact-command lookup live, and check how the pin parser marks a version as fully validated. Add one row each for nvm, pyenv, mise and asdf, then add per-manager unit tests covering present and absent cases. Done when a .nvmrc pin of 20 with nvm on PATH yields nvm install 20 && nvm use 20, no manager on PATH leaves output unchanged, and range pins such as >=20 <21 never produce a manager command, with pytest and ruff passing.

Written by the indexing model from the issue text.

Description

enhancement good first issue

Problem: When the installed version does not satisfy a pin, DevReady suggests an exact switch command only when the pin is a plain version and fnm is on PATH (see src/devready/managers.py). Users of nvm, pyenv, mise or asdf still get the generic "switch versions with your version manager" prose.

Do:

  • Extend the ordered MANAGERS table in managers.py with one row per supported manager, keeping the existing lookup rules (PATH only, never executed, first match wins):
    • nvm: nvm install 20 && nvm use 20
    • pyenv: pyenv install -s 3.12 && pyenv local 3.12
    • mise: mise use node@20 / mise use [email protected]
    • asdf: asdf install nodejs 20 && asdf local nodejs 20
  • Only build a command from a version the pin parser fully validated (plain X, X.Y, X.Y.Z); ranges keep the generic suggestion.
  • Keep the suggestion on one line and inside the existing text wrapping; JSON/SARIF suggestions follow automatically.
  • Add unit tests per manager (present/absent), a CHANGELOG line, and update docs/architecture.md or the managers comment if the table shape changes.

Done when:

  • With nvm on PATH and .nvmrc = 20, the suggestion is nvm install 20 && nvm use 20.
  • With no manager on PATH, output is unchanged from today.
  • A range pin such as >=20 <21 never produces a manager command.
  • pytest, ruff check and ruff format --check pass.

Notes:

  • Managers stay lookup-only; fix --plan never runs them.
  • Use each manager's documented non-interactive flags (for example pyenv's -s).
Dominant language
Python
Stars
2
Forks
3
Avg merge
10h 51m
Merged PRs (30d)
40

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Evalogical-Inc/devReady

All issues in Evalogical-Inc/devReady

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.