An asdf-style plugin that teaches
mise (and asdf) how to install the Origin CLI (co),
Cursor's code-forge CLI.
It is pure lifecycle glue: it does not build or vendor co. At install time
it downloads the prebuilt co binary published by the origin-cli-release
pipeline and verifies its SHA256 against the release manifest — the same
distribution channel the repo-local install.sh uses.
- Manifests:
https://downloads.cursor.com/co/channels/<channel>/manifest.json(channel head) and.../co/<version>/manifest.json(immutable per-version). - Binaries:
.../co/<version>/<platform>/co.tar.gz, SHA256-verified before use.
Platforms: darwin-arm64, darwin-x64, linux-arm64, linux-x64 (glibc). No
Windows (asdf plugins are bash; matches co's own platform matrix).
Declaratively, in a mise.toml:
[plugins]
co = "https://github.com/anysphere/origin-cli-asdf"
[tools]
co = "latest" # or a pinned co@<version>Then mise install provisions co and puts it on PATH. Ad hoc:
mise plugin install co https://github.com/anysphere/origin-cli-asdf
mise use -g co@latest
co --versionasdf plugin add co https://github.com/anysphere/origin-cli-asdf
asdf install co latest
asdf global co latest| File | asdf hook | Purpose |
|---|---|---|
bin/list-all |
list-all |
Print installable versions (current channel heads — there's no public "list every version" endpoint). |
bin/latest-stable |
latest-stable |
Resolve co@latest to a concrete version (latest channel head; stable isn't published yet). |
bin/download |
download |
Download + SHA256-verify a version into $ASDF_DOWNLOAD_PATH. |
bin/install |
install |
Place the verified co binary at $ASDF_INSTALL_PATH/bin/co. |
lib/utils.bash |
— | Shared helpers (platform detection, manifest fetch/parse, SHA256, download). |
co@latest / co@stable channel aliases resolve to whatever the channel
pointer currently references; any real co/<version>/manifest.json also
installs directly, whether or not list-all printed it.
Derived from packages/origin-cli/mise-asdf-plugin in the anysphere/everysphere
monorepo, extracted to its own repo because mise's [plugins] table clones a git
URL and expects bin/list-all at the repo root. If the release manifest schema,
CDN layout, or platform matrix changes, update this repo alongside the
origin-cli-release pipeline.
# Point at a linked local checkout instead of the remote:
mise plugins link --force co /path/to/origin-cli-asdf
mise ls-remote co
mise install co@latest
# Or run the hooks directly:
./bin/list-all
ASDF_INSTALL_TYPE=version ASDF_INSTALL_VERSION="$(./bin/latest-stable)" \
ASDF_DOWNLOAD_PATH=/tmp/co/dl ASDF_INSTALL_PATH=/tmp/co/inst \
sh -c './bin/download && ./bin/install && /tmp/co/inst/bin/co --version'Lint: shellcheck -x bin/* lib/*.bash and shfmt -i 2 -d bin/* lib/*.bash.