# Install

> Use when the user invokes $leaf:install, asks to install or update the leaf CLI, or LEAF work is blocked because leaf is not on PATH.

- Skill: `hoetaek/install` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add hoetaek/install`
- Raw SKILL.md: https://api.skillmd.com/api/skills/hoetaek/install/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: hoetaek (https://skillmd.com/u/hoetaek)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/hoetaek/install

---


# LEAF Install

Install or update the `leaf` CLI for the current OS, then verify the installed
version. This is the Codex-compatible install entry; Claude-style hosts may
also expose the same workflow as `/leaf:install`.

## Procedure

1. Check the current version:

   ```bash
   leaf --version
   ```

   If the version is `0.12.0` or newer, report that version and stop. If
   `leaf` is missing or older, continue.

2. Determine the current OS. Do not use the current repo, `Cargo.toml`, or
   source-checkout status to choose the installer.

   - On Unix shells, run `uname -s`: `Darwin` means macOS, `Linux` means Linux.
   - On Windows/PowerShell, treat the OS as Windows.
   - If the OS cannot be determined, ask the user before installing.

3. Run the installer for that OS:

   - macOS: if Homebrew is available:

     Missing `leaf`:

     ```bash
     brew install hoetaek/tap/leaf
     ```

     Older Homebrew-managed `leaf`:

     ```bash
     brew update && brew upgrade hoetaek/tap/leaf
     ```

     If Homebrew is unavailable or does not manage the current `leaf`, run:

     ```bash
     curl --proto '=https' --tlsv1.2 -LsSf https://github.com/hoetaek/leaf/releases/latest/download/leaf-installer.sh | sh
     ```

   - Linux: run the shell installer:

     ```bash
     curl --proto '=https' --tlsv1.2 -LsSf https://github.com/hoetaek/leaf/releases/latest/download/leaf-installer.sh | sh
     ```

   - Windows: run the PowerShell installer:

     ```powershell
     powershell -ExecutionPolicy ByPass -c "irm https://github.com/hoetaek/leaf/releases/latest/download/leaf-installer.ps1 | iex"
     ```

4. Verify with:

   ```bash
   leaf --version
   ```

5. Report the installed version. If installation failed, show the failing
   command and error summary, then suggest the next OS-appropriate fallback. Do
   not claim success without version output.

