basemodo update
Update this CLI: replace this basemodo with the latest release, or the version named.
basemodo update [OPTIONS] [VERSION]Downloads the build for this computer from the CLI's releases (github.com/basemodocom/cli), checks it against the release's checksums as the install line does, runs it once to be sure it works, then puts it in place of the basemodo you ran, wherever it is installed. A download that fails or does not match its checksum changes nothing: the basemodo you have keeps working. Already on that version, or newer than the latest release (a build of your own), it changes nothing. A version (0.9.0, or v0.9.0) installs that one, to pin or go back to it. Once it is in place, the new basemodo brings Basemodo's Skills in your home folder up to date, only where they already are; run under sudo, it leaves them to you, to bring up to date with basemodo setup --user, not under sudo. A project's Skills are brought up to date by running basemodo setup --project in it. BASEMODO_RELEASES_URL says where the releases are, as it does for the install line. On Windows, which does not let a running program be overwritten, the basemodo.exe you ran moves aside and is removed the next time basemodo runs.
Like every command, it also takes the global options --json and --api-url.
Examples
Update to the latest version:
basemodo updateInstall version 0.9.0, newer or older:
basemodo update 0.9.0Update from a script, and check what changed:
basemodo update --jsonOutput
With --json, it prints {"from", "to", "changed" (false when it already was "to", or was newer than the latest release), "skills": one {"path", "skills", "changed"} for each folder of the home folder whose Basemodo Skills it brought up to date: the folder, the names of the Skills it holds now, and whether they changed (false when they already were these); empty when none held them, "next" (what is left: basemodo setup --project in each project that has them, and basemodo setup --user when the Skills in the home folder were not brought up to date; null when nothing changed)}. A download whose checksum does not match is an error with code checksum_mismatch; one the release's checksums do not list, checksum_not_listed; a version that is not a release, release_not_found; a folder basemodo cannot write in, update_unwritable. Each leaves basemodo as it was.
From an agent
Terminal only: it replaces the program on the Person's computer; an agent with a terminal runs it there.