Skip to content

OpenCode Vitals 0.1.1

Choose a tag to compare

@moutazideal moutazideal released this 26 Sep 06:11
· 12 commits to main since this release

Install with one command

Editing opencode.json to add a single line is a poor first step for anyone new, so the package installs itself into the directory OpenCode already reads, and never touches your configuration file.

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

The install command copies exactly the files npm ships, keeps the shell and Python files executable, prints the path it used, and makes no network calls of its own. Also available: --link (symlink while working on the source), --status, --uninstall, --dir PATH, and --force.

Running it twice is an update, not a second copy, and it removes files that a newer release no longer ships. It refuses to replace a directory that holds a different package, and it will not write outside the plugin directory.

Fixed

  • The install command's guard against writing outside the plugin directory compared path prefixes with the PATH separator (: on Linux) instead of the path separator, so every install was rejected. It could not have shipped working.
  • An install over an existing copy was reported as "a different package" because the guard looked for any manifest instead of comparing the package name, so an update could not run.
  • --status printed the internal word other-package about your own installation. It now says copy.

Measured

  • 132 plugin checks and 56 bar checks. The install command is covered for: copying the shipped list, keeping executable bits, creating nested directories, being idempotent, removing files a newer release drops, refusing to touch a different package, refusing to replace a link without --force, linking twice being a no-op, uninstalling, and plugin directory resolution.

Note

This release was published before an audit of the shipped code found two dangerous bugs (a Windows liveness check that terminated the process it checked, and a five second respawn loop for a bar that could not start). They are fixed in 0.1.2, which is 0.1.1 plus every audit fix.

Upgrading from 0.1.0: run npx opencode-vitals-install if you installed by folder, or restart OpenCode if you use the plugins config entry.