Skip to content

anysphere/origin-cli-asdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

origin-cli-asdf

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).

Usage (mise)

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 --version

Usage (asdf)

asdf plugin add co https://github.com/anysphere/origin-cli-asdf
asdf install co latest
asdf global co latest

Layout

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.

Provenance

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.

Development

# 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.

About

ASDF mise plugin for the origin command line tool, to enable it to be installed via mise.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages