Nim choosenim

ID

choosenim

Link

Repository

Upstream stars

⭐ 135

Last commit

2025-07-12

Version requirement

>= 0.8.4

Platforms

🐧 Linux · 🍎 macOS · 🪟 Windows

Operations

installed · search · install · upgrade · remove

purl types

pkg:choosenim/

CLI name

choosenim

Every call

choosenim <command> --noColor

Forced environment

CHOOSENIM_NO_ANALYTICS=1

Issues and PRs

📦 manager: nim-based

Source

choosenim.toml

choosenim is the Nim toolchain installer (https://github.com/nim-lang/choosenim).

The project moved from dom96/choosenim to the nim-lang organisation, and the old repository is neither archived nor deprecated: it still outranks the live one in search results, which is what dom96/choosenim#349 was opened to fix. The old repository stopped at 0.8.4 in July 2022; nim-lang carries the whole release history, 0.8.4 included, and has shipped through 0.8.16, so any version above 0.8.4 can only have come from the live one.

A package is a Nim toolchain version, and every declared verb agrees on it: the bare form installs one, remove and update each take one, and the listing prints one per row. This is the reading rustup settled, where the object the verbs agree on is what counts as a package. Nim libraries are a different object on a different tool, and mpm reaches them through nimble, which is why choosenim claims no purl type: a pkg:nim/... names a nimble library, never a compiler release.

Parsing notes, verified against choosenim 0.8.4 and 0.8.16 on Linux:

  • --installed is what makes the inventory readable with one pattern. A bare versions prints an Installed: section followed by an Available: one, and nothing in a row says which section holds it; passing the flag drops the second section outright, so every row left is installed. It also spares a network round-trip, the catalog being fetched only without it.

  • No installed_version is captured, deliberately, following bob, pyenv and rustup. The token is the identity, and a second named group cannot capture the same span anyway. mpm treats the installed version as optional throughout.

  • Every row is indented under a right-aligned label, and that label is the * marking the selected version. The pattern accepts it and drops it, since remove and update take the bare version.

  • The first character of the token is what rejects the furniture. A row is either a release (2.2.10) or a nimble special version (#devel), while every other line of the listing is a Channel:, Installed: or Available: label, or the stable a channel resolves to. Requiring a digit or a # keeps all four out without pinning the label width.

  • The (latest) suffix on the newest release is left out of the id by stopping the token at the first space.

  • --noColor is required rather than tidiness. choosenim writes SGR escapes whether or not it holds a terminal, and ignores NO_COLOR, both verified. The escapes wrap the label, so they sit between the indentation and the version and no pattern could step over them the way bob’s does. The flag failing is not a silent risk: choosenim rejects an unknown flag outright with Error: Unknown flag: ..., so a rename would fail loudly instead of quietly emptying the inventory.

  • A search here is broader than it looks, because the ids are versions. mpm’s default matching is fuzzy and counts any alphanumeric segment of the query, so 2.0.16 splits into 2, 0 and 16 and matches nearly every Nim release. --exact is what narrows it to one.

  • No outdated: nothing reports staleness per version. (latest) marks the newest release rather than an upgrade, and the (update available!) marker choosenim does print is appended to the selected channel, which is one line about ambient state rather than a package the listing enumerates.

Caution

remove refuses the selected toolchain, exiting 1 with Error: Cannot remove current version., and the bare install form selects whatever it installs. So a version mpm just installed can never be the one it removes next, and cleaning up an older toolchain is the path that works. mpm declares the operation regardless, that being the case users actually reach for; the refusal surfaces as a normal failure. Switching away first to force it through was rejected: choosing a Nim version is the user’s decision, not a side effect mpm should smuggle into a removal.

Caution

No upgrade_all, and the two candidates are both traps. A bare update refuses to run at all (Error: Expected 1 parameter to 'update' command'), and update self replaces the choosenim binary rather than any Nim it installed, which is the same shape as rustup’s self-update and zvm upgrade. Only the per-version form is mapped.

Note

A release that still carries the analytics block stops at an interactive telemetry prompt the first time it runs, which no unattended caller can answer. 0.8.16 compiles that block out behind a when false: whose TODO says to re-enable it, so it never prompts. CHOOSENIM_NO_ANALYTICS is set on every release regardless: each release that prompts honors it, it opts out rather than in where --yes would have agreed to be tracked, and it keeps mpm unattended once the block is compiled back in.

No escalation: choosenim installs under ~/.choosenim and has no system-wide mode. No sync and no cleanup: neither exists, the catalog being fetched inline by the commands that need it.

What mpm adds to choosenim

Through mpm, choosenim gains --exact and --extended search, to narrow to exact names or match descriptions.

Bigger still, mpm reaches across every manager at once: mpm installed and mpm outdated cover choosenim alongside every other manager you run in one table, mpm upgrade --all updates them together, and mpm sbom exports the whole machine as one bill of materials.

Every mpm command also gains --dry-run and --plan previews, cross-scheme version comparison and purl identifiers. See manager augmentations for how each one is built.

Your choosenim commands, in mpm

You already know choosenim: each operation maps one-to-one onto mpm, in an interface shared by every manager.

To…

With choosenim

With mpm

List what’s installed

choosenim versions --installed

mpm --choosenim installed

Search for a package

choosenim versions

mpm --choosenim search versions

Install a package

choosenim <package_id>

mpm install pkg:choosenim/<package_id>

Upgrade one package

choosenim update <package_id>

mpm --choosenim upgrade <package_id>

Remove a package

choosenim remove <package_id>

mpm remove pkg:choosenim/<package_id>

Prefix any command above with --dry-run to simulate the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.

Operations

Operation

Supported

Notes

installed

✅

outdated

orphans

search

✅

Exact and extended search backfilled by mpm.

install

✅

upgrade

✅

upgrade_all

remove

✅

sync

cleanup

doctor

Configuration

  • Ignore choosenim on the mpm CLI by passing the --no-choosenim option.

  • Ignore it for every run in your configuration:

    [mpm]
    choosenim = false
    
  • Raise the timeout of all choosenim calls:

    [mpm.overrides.choosenim]
    timeout = 900
    
  • Run mpm config-template choosenim to print all overridable settings for your configuration file:

    [mpm.overrides.choosenim]
    cli_names = [
        "choosenim",
    ]
    cli_search_path = []
    dry_run = false
    ignore_auto_updates = true
    plan = false
    post_args = [
        "--noColor",
    ]
    pre_args = []
    pre_cmds = []
    requirement = ">=0.8.4"
    stop_on_error = false
    unmaintained = false
    version_cli_options = [
        "--version",
    ]
    version_regexes = [
        "^choosenim v?(?P<version>\\S+)",
    ]
    
    [mpm.overrides.choosenim.extra_env]
    CHOOSENIM_NO_ANALYTICS = "1"
    

The arguments and environment variables listed in the box atop this page are forced on every choosenim call, so runs stay quiet, non-interactive and reproducible: the defaults you would set in CI anyway.

Recipes

A few jobs you would otherwise script around choosenim, one mpm command each:

  • Snapshot and clone a machine: mpm --choosenim dump choosenim.toml, then mpm restore choosenim.toml on the next one.

  • Export a compliance SBOM: mpm --choosenim sbom (CycloneDX by default, --spdx for SPDX).

Privilege escalation

mpm runs this manager as the current user and never prepends sudo by default. Flip the policy for its privileged operations with --sudo or the per-manager sudo override.

None of its operations is privileged.

See privilege escalation for the full policy.

Cooldown

State of Nim choosenim’s release-age gating, from the cooldown support table:

Status: ❌ None (the catalog is a git tag list, which carries no publication date)

A cooldown only pays off where a compromised release can be withdrawn while the clock runs, and can only be emulated where the registry dates its releases. From the retraction table:

  • Registry: Nim release archive

  • Retraction: Archive removal: a compiler is a tarball on nim-lang.org, so a version is withdrawn by that archive ceasing to serve it, with the tag list the catalog reads regenerated to match

  • Publish date: ❌ the catalog is the git tag list of nim-lang/Nim, whose dates whoever cut the tag sets rather than a server

With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --cooldown best-effort opts back in.

Reference traces

A collection of raw native outputs captured from the manager’s own CLI and recorded in the bundled definition. If you know Nim choosenim well and a transcript below looks wrong, or a newer release changed its output format, report it.

$ choosenim versions --installed
   Channel: stable

 Installed:  
          * 2.2.10 (latest)
            1.6.20

Version check

The version is probed by running:

$ choosenim --version
choosenim v0.8.16 (2025-07-12 02:03:47) [linux/amd64]

and extracted with:

r"^choosenim v?(?P<version>\S+)"

Upstream project

Metrics

nim-lang/choosenim

Activity

commit activity commits since open issues open pull requests

Popularity

forks watchers contributors

Metadata

latest release release date license main language

Changelog

  • 8.0.0 (2026-09-20)

    • Add the choosenim Nim toolchain installer with inventory, catalog search, install, remove and single-version upgrade.