miseREADME.md
main92 lines · 3.0 KiBRaw
- # mise (Cleyrop Forge backend)
- A [`mise`](https://mise.jdx.dev) backend plugin for installing and upgrading CLI tools published on Cleyrop's public forge ([`code.cleyrop.tech`](https://code.cleyrop.tech)).
- ## Quick Start
- ### In a project (`mise.toml`)
- ```toml
- [plugins]
- forge = "https://code.cleyrop.tech/mise.git"
- [tools]
- "forge:roneo" = "latest"
- ```
- Then run:
- ```sh
- mise install
- mise upgrade
- ```
- ### Globally via CLI
- Install the plugin under the `forge` backend prefix:
- ```sh
- mise plugins install forge https://code.cleyrop.tech/mise.git
- mise use -g forge:roneo@latest
- ```
- Check available versions or upgrade later:
- ```sh
- mise ls-remote forge:roneo
- mise outdated
- mise upgrade forge:roneo
- ```
- ## Multi-Binary Repositories
- A single plugin handles every tool published on the forge. When a repository ships multiple binaries in the same release, select a specific binary using `forge:<repo>/<bin>`:
- ```toml
- [tools]
- "forge:my-suite" = "1.2.0" # default binary ("my-suite")
- "forge:my-suite/helper" = "1.2.0" # specific binary ("helper") from "my-suite"
- ```
- ## Options & Environment Variables
- | Option (`mise.toml`) | Environment Variable | Default | Description |
- | --- | --- | --- | --- |
- | `url` | `MISE_FORGE_URL` | `https://code.cleyrop.tech` | Base URL of the forge instance |
- | `bin` | — | `<repo>` | Explicit binary name (alternative to `forge:<repo>/<bin>`) |
- | `tag_prefix` | — | `v` | Tag prefix for fast-path lookup (falls back to full listing if not found) |
- | `verify_cosign` | `MISE_FORGE_VERIFY_COSIGN` | `false` | Require and verify Cosign blob signatures against `key_url` |
- | — | `MISE_FORGE_TOKEN` | — | Optional Bearer token for authenticated forge instances |
- Example with options:
- ```toml
- [tools]
- "forge:roneo" = { version = "0.1.0", verify_cosign = "true" }
- ```
- For repositories that only publish prereleases (such as `-alpha.*` tags), enable `mise`'s prerelease matching (`MISE_PRERELEASES=1` or `prereleases = true`) when using `@latest`, or pin the exact prerelease version.
- ## Release API Contract
- This plugin consumes the read-only public forge release API (`docs/PUBLIC-FORGE-API.md`):
- - `GET /api/v1/repos` — published repositories (`mise search`)
- - `GET /api/v1/repos/<repo>/releases` — releases newest-first, paginated via `Link: <…>; rel="next"`
- - `GET /api/v1/repos/<repo>/releases/<tag>` and `…/releases/latest` — single release metadata
- - `GET /<repo>/releases/download/<tag>/<asset>` — immutable release binaries/archives and signatures
- - `GET /api/v1/keys/<name>.pub` — Cosign public key
- Platform selection uses the declared `os` (`linux`, `darwin`, `windows`), `arch` (`amd64`, `arm64`), and `bin` fields from the release manifest rather than filename heuristics. Every download is verified against its declared `sha256` digest before installation.
- ## Running Tests
- The end-to-end test suite starts a local mock server implementing the release API and runs the real `mise` binary inside an isolated temporary data/cache/config directory:
- ```sh
- python3 tests/e2e.py
- ```
- ## License
- Apache-2.0 — see [LICENSE](LICENSE).