[GH-ISSUE #3545] Proposal: a Launch API, so other launchers can install, prepare and run Horizon #1019

Open
opened 2026-11-02 15:43:40 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @GIGABAIT93 on GitHub (Oct 29, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3545

Many players keep their Minecraft in Prism Launcher, MultiMC, ATLauncher, Modrinth App, HMCL or a launcher of their own. Horizon's launcher already reads those installs to prepare (#434). The other direction, those launchers offering Horizon as an instance type next to vanilla, has no documented contract today: finding a build, preparing it and starting it all live inside horizon-launcher and may change in any Nightly. docs/api/ describes the mod, agent control, server, launcher command and data format APIs, but not this one.

Proposal: a Launch API in docs/api/launch.md, versioned and at Preview per docs/api/stability.md. Everything below is an addition, so nothing breaks, and horizon-launcher could use the same flags itself.

1. Finding a build

  • A signed release index (releases.json as a release asset, or at a stable URL on playhorizon.dev). For each build it gives:

    • the tag, channel, date and commit;
    • the Minecraft version and the Launch API version;
    • the preparer's OUTPUT_VERSION and the Java major the preparer needs;
    • for each platform, the asset's name, URL, size and SHA-256.

    Today a launcher pages through the GitHub releases API, which allows 60 requests an hour without a token, and parses release titles.

  • A few builds kept longer. nightly-<date> releases are pruned after 7 days, so an instance cannot stay on a build it knows works. One build a week, kept for 90 days, would be enough.

  • The signature check as part of the API: SHA256SUMS.sig, the key list and rotation. Other launchers can then verify archives exactly as horizon-launcher does.

2. horizon-client

  • --game-dir DIR: the folder for saves, options.txt, resourcepacks/, horizon-mods/ and screenshots/, which is the working directory today. Vanilla calls it --gameDir.
  • --home DIR: the same as HORIZON_HOME (logs, crash reports).
  • --fullscreen, as vanilla accepts it. Today only options.txt and F11 set it.
  • --launch-api, or --capabilities --json: prints the Launch API version and the options this build accepts. Unknown options are refused (unknown option …), which is right, so a launcher needs a way to know what it may pass before it passes it.
  • The session file contract in the API reference: the JSON fields, mode 0600, two minutes, deleted on read. Today it is in docs/microsoft-account.md. Optionally, --session-stdin would take the same JSON so that nothing touches the disk.
  • Exit codes, documented, and on a crash the path of the crash report as the last line of output, so a launcher can show it.

3. horizon-prepare

  • Explicit inputs beside --minecraft-dir: --version-json, --client-jar, --libraries-dir and --assets-dir. Launchers lay these out differently (instance folders, shared libraries and assets), and today they would first have to rebuild the official launcher's layout.
  • --output DIR for the prepared resources, which go to <root>/.local/horizon-client/26.3 today. One prepared set could then live outside a release folder and serve every build with the same OUTPUT_VERSION.
  • One command for a complete preparation (--prepare --complete?), including what horizon-launcher adds afterwards: sounds, panorama, fonts, languages and the built-in packs. Without the sounds step the game is silent, which is easy to miss.
  • --progress json: one JSON line per step with a fraction, for a progress bar during the minutes it takes.
  • --check: exits 0 when the output is complete and current for this preparer, so a launcher knows when an update needs a new preparation.
  • Exit codes and the Java it needs, documented: a Java 25 runtime with the shipped exporters/, a JDK otherwise.

4. A guide

A page, "Running Horizon from another launcher", with the steps in order:

  1. Pick a build from the index.
  2. Verify it, then unpack it.
  3. Prepare it.
  4. Start it with an account.

Like the other APIs, it would come with the golden-output tests that stability.md asks for.

With this, any launcher could add Horizon the way it adds a mod loader, and horizon-launcher would stay the reference implementation.

Originally created by @GIGABAIT93 on GitHub (Oct 29, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3545 Many players keep their Minecraft in Prism Launcher, MultiMC, ATLauncher, Modrinth App, HMCL or a launcher of their own. Horizon's launcher already reads those installs to prepare (#434). The other direction, those launchers offering Horizon as an instance type next to vanilla, has no documented contract today: finding a build, preparing it and starting it all live inside `horizon-launcher` and may change in any Nightly. `docs/api/` describes the mod, agent control, server, launcher command and data format APIs, but not this one. **Proposal:** a Launch API in `docs/api/launch.md`, versioned and at Preview per `docs/api/stability.md`. Everything below is an addition, so nothing breaks, and `horizon-launcher` could use the same flags itself. ### 1. Finding a build - **A signed release index** (`releases.json` as a release asset, or at a stable URL on playhorizon.dev). For each build it gives: - the tag, channel, date and commit; - the Minecraft version and the Launch API version; - the preparer's `OUTPUT_VERSION` and the Java major the preparer needs; - for each platform, the asset's name, URL, size and SHA-256. Today a launcher pages through the GitHub releases API, which allows 60 requests an hour without a token, and parses release titles. - **A few builds kept longer.** `nightly-<date>` releases are pruned after 7 days, so an instance cannot stay on a build it knows works. One build a week, kept for 90 days, would be enough. - **The signature check as part of the API**: `SHA256SUMS.sig`, the key list and rotation. Other launchers can then verify archives exactly as `horizon-launcher` does. ### 2. `horizon-client` - `--game-dir DIR`: the folder for saves, `options.txt`, `resourcepacks/`, `horizon-mods/` and `screenshots/`, which is the working directory today. Vanilla calls it `--gameDir`. - `--home DIR`: the same as `HORIZON_HOME` (logs, crash reports). - `--fullscreen`, as vanilla accepts it. Today only `options.txt` and F11 set it. - `--launch-api`, or `--capabilities --json`: prints the Launch API version and the options this build accepts. Unknown options are refused (`unknown option …`), which is right, so a launcher needs a way to know what it may pass before it passes it. - **The session file contract in the API reference**: the JSON fields, mode 0600, two minutes, deleted on read. Today it is in `docs/microsoft-account.md`. Optionally, `--session-stdin` would take the same JSON so that nothing touches the disk. - **Exit codes**, documented, and on a crash the path of the crash report as the last line of output, so a launcher can show it. ### 3. `horizon-prepare` - **Explicit inputs** beside `--minecraft-dir`: `--version-json`, `--client-jar`, `--libraries-dir` and `--assets-dir`. Launchers lay these out differently (instance folders, shared libraries and assets), and today they would first have to rebuild the official launcher's layout. - `--output DIR` for the prepared resources, which go to `<root>/.local/horizon-client/26.3` today. One prepared set could then live outside a release folder and serve every build with the same `OUTPUT_VERSION`. - **One command for a complete preparation** (`--prepare --complete`?), including what `horizon-launcher` adds afterwards: sounds, panorama, fonts, languages and the built-in packs. Without the sounds step the game is silent, which is easy to miss. - `--progress json`: one JSON line per step with a fraction, for a progress bar during the minutes it takes. - `--check`: exits 0 when the output is complete and current for this preparer, so a launcher knows when an update needs a new preparation. - **Exit codes** and the Java it needs, documented: a Java 25 runtime with the shipped `exporters/`, a JDK otherwise. ### 4. A guide A page, "Running Horizon from another launcher", with the steps in order: 1. Pick a build from the index. 2. Verify it, then unpack it. 3. Prepare it. 4. Start it with an account. Like the other APIs, it would come with the golden-output tests that `stability.md` asks for. With this, any launcher could add Horizon the way it adds a mod loader, and `horizon-launcher` would stay the reference implementation.
Author
Owner

@GIGABAIT93 commented on GitHub (Oct 29, 2026):

🤖 Agent: GIGABAIT93's AI agent (Claude Code) is taking this on, in small pull requests that each make sense alone:

  1. horizon-client: --game-dir, --home, --fullscreen, --session-stdin, --launch-api, exit codes (2 for a refused command line, no crash report) and the crash report line; docs/api/launch.md at experimental, with a generated reference and its test.
  2. horizon-prepare: --output DIR and --check.
  3. horizon-prepare: one complete preparation (the sounds included) and --progress json.
  4. horizon-prepare: explicit inputs (--version-json, --client-jar, --libraries-dir, --assets-dir).
  5. The guide "Running Horizon from another launcher", and the Launch API to preview.

The release index and keeping some nightlies longer touch the release workflows, so they stay here for discussion. If you would rather have other names or another shape for --launch-api, say so on the first pull request and the rest will follow it.

<!-- gh-comment-id:6491729631 --> @GIGABAIT93 commented on GitHub (Oct 29, 2026): 🤖 Agent: GIGABAIT93's AI agent (Claude Code) is taking this on, in small pull requests that each make sense alone: 1. `horizon-client`: `--game-dir`, `--home`, `--fullscreen`, `--session-stdin`, `--launch-api`, exit codes (2 for a refused command line, no crash report) and the crash report line; `docs/api/launch.md` at experimental, with a generated reference and its test. 2. `horizon-prepare`: `--output DIR` and `--check`. 3. `horizon-prepare`: one complete preparation (the sounds included) and `--progress json`. 4. `horizon-prepare`: explicit inputs (`--version-json`, `--client-jar`, `--libraries-dir`, `--assets-dir`). 5. The guide "Running Horizon from another launcher", and the Launch API to preview. The release index and keeping some nightlies longer touch the release workflows, so they stay here for discussion. If you would rather have other names or another shape for `--launch-api`, say so on the first pull request and the rest will follow it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1019
No description provided.