Skip to content

OpenCode Vitals 0.1.3

Choose a tag to compare

@moutazideal moutazideal released this 26 Sep 06:57
· 29 commits to main since this release

The install command actually works now

0.1.2 shipped the audit fixes but not a working way to install itself from npm. Two things were wrong:

  • npx opencode-vitals-install asks npm for a package by that name, and opencode-vitals-install is a file inside this package, so npm answered 404. There is a bin called opencode-vitals now.
  • The installer decided whether it was started directly by comparing process.argv[1] with its own path as strings; npm runs bins through a symlink in node_modules/.bin, so the two never matched and the command exited silently, with no output and status zero. Both sides are resolved through symlinks now, with a regression test that runs the commands through a shim shaped exactly like npm's.

Install

npx opencode-vitals selftest     # can this machine draw the bar?
npx opencode-vitals install      # installs it into the directory OpenCode reads
# restart OpenCode

npx opencode-vitals status reports what is installed, npx opencode-vitals uninstall removes it, and --link, --dir and --force work as documented. The older names (opencode-vitals-install, opencode-vitals-selftest) still exist for scripts that add the package to a project.

Also in this release: a closed pipe (| head) no longer prints a node stack trace, and the README test that generates its checks from the README's npx commands now also proves that every subcommand it prints is one the dispatcher accepts.

Measured

  • 162 plugin checks and 56 bar checks, up from 156 and 56. The documented commands were run end to end from a packed tarball installed through npm: install copied 12 files at 0.1.3, and status, the --status alias and uninstall all behaved.