Lean toolchain install

Install the toolchain pinned in lean-toolchain, fetching it from the GitHub release rather than through elan’s downloader. Idempotent, and it detects partial state rather than re-downloading.

Skills it satisfies

A skill states the capability; this Tool is one way to exercise it. Each skill’s declared input and output contract follows, where it has one.

lean-environment-setup

Sets up and troubleshoots the Lean 4 environment for Claude Code sessions. Ensures elan, lake, lean are installed so the paper-assistant MCP’s Lean tools are operational. Handles sandboxed/cloud environments where downloads may be restricted.

Source: folio-assistant-sci/skills/content/folio-paper-adapter/lean-environment-setup.md.

The skill declares no I/O contract (schemas/skills/lean-environment-setup/{input,output}.schema.json).

Inputs and outputs

Each port names a shared type by IRI, so two Tools for one skill can be checked for interchangeability.

porttyperequireddescriptionconstraint
outtoolchainTextThe linked toolchain name, and the per-repo override that selects it.string · A short single-line human string. Not admissible as a command-line argument.

Processes and tasks

No process step names a skill this Tool satisfies.

How it is deployed and reached

  • Command line. From the repository root: folio-assistant-sci/scripts/setup-lean-toolchain.sh.
  • GitHub Actions. No workflow in this checkout runs its command.

As an API: its operation in the OpenAPI document and the MCP tool list of its layer.

installcli: folio-assistant-sci/scripts/setup-lean-toolchain.sh
runtimebash, curl, elan
networkyes

When a host it reaches is refused:

host / errorremedy
github.comnone: It fetches the toolchain from the GitHub release because release.lean-lang.org is refused; with GitHub refused too there is no source.

What it is made of

Linked data

The Tool is published as its own JSON-LD document at its IRI, https://litlfred.github.io/folio-assistant/folio-assistant-sci/tools/lean-toolchain-setup.jsonld, partOf its layer’s document. The node below is the definition this page was drawn from, and is embedded in the page as application/ld+json.

{
  "@context": "https://litlfred.github.io/folio-assistant/folio-assistant-sci/folio-assistant-sci.context.jsonld",
  "@id": "https://litlfred.github.io/folio-assistant/folio-assistant-sci/tools/lean-toolchain-setup.jsonld",
  "@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
  "partOf": "https://litlfred.github.io/folio-assistant/folio-assistant-sci/folio-assistant-sci.jsonld",
  "name": "lean-toolchain-setup",
  "title": "Lean toolchain install",
  "description": "Install the toolchain pinned in `lean-toolchain`, fetching it from the GitHub release rather than through elan's downloader. Idempotent, and it detects partial state rather than re-downloading.",
  "install": {
    "cli": "folio-assistant-sci/scripts/setup-lean-toolchain.sh"
  },
  "invoke": {
    "shell": "folio-assistant-sci/scripts/setup-lean-toolchain.sh"
  },
  "io": {
    "inputs": [],
    "outputs": [
      {
        "name": "toolchain",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Text",
        "description": "The linked toolchain name, and the per-repo override that selects it."
      }
    ]
  },
  "satisfies": [
    "lean-environment-setup"
  ],
  "requirements": {
    "runtime": [
      "bash",
      "curl",
      "elan"
    ],
    "network": true
  },
  "remedies": [
    {
      "host": "github.com",
      "none": "It fetches the toolchain from the GitHub release because release.lean-lang.org is refused; with GitHub refused too there is no source."
    }
  ]
}

folio-assistant — code under the Apache License 2.0, documentation under CC BY 3.0. Generated schema and API references are rebuilt from source on every push to main.

deployed dev