Skip to content

feat: add [[tools.github]] installer type#9

Draft
nilshamerlinck wants to merge 4 commits intomainfrom
feat/github-tool-installer
Draft

feat: add [[tools.github]] installer type#9
nilshamerlinck wants to merge 4 commits intomainfrom
feat/github-tool-installer

Conversation

@nilshamerlinck
Copy link
Contributor

Summary

  • Adds a new [[tools.github]] config section for installing tools directly from GitHub releases
  • Supports three modes: latest-release auto-resolution, install script, and binary asset download
  • Updates the example config (odoo_dev.toml) to use the new format for nvm

Details

Config format:

[[tools.github]]
name = "nvm"
repo = "https://github.com/nvm-sh/nvm"
version = "latest-release"   # or a specific tag like "v0.39.7"
script = "install.sh"        # omit to download a binary asset instead

Behaviour:

  1. version = "latest-release" → calls the GitHub Releases API to resolve the current tag before proceeding
  2. script defined → constructs https://raw.githubusercontent.com/{owner}/{repo}/{version}/{script} and delegates to the existing _install_script() helper
  3. script not defined → fetches release assets via the API, picks the one matching the current OS/arch (handles .tar.gz, .tgz, .zip, plain binaries), installs to ~/.local/bin/{name}

Test plan

  • make check passes (linting + type checks)
  • make test passes (57 tests)
  • Dry-run: tlc install-tools --dry-run shows GitHub tools section
  • Live: nvm installs correctly via [[tools.github]] with version = "latest-release" and script = "install.sh"

🤖 Generated with Claude Code

nilshamerlinck and others added 2 commits February 27, 2026 11:39
Support installing tools from GitHub releases with three modes:
- version = "latest-release": auto-resolve to the latest tag via GitHub API
- script defined: download and execute install script from raw.githubusercontent.com
- script not defined: download binary asset matching the current OS/arch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nilshamerlinck nilshamerlinck force-pushed the feat/github-tool-installer branch from fc247ca to 4c5e3a0 Compare February 27, 2026 04:39
nilshamerlinck and others added 2 commits February 27, 2026 12:37
The old fallback grabbed the first file without an extension (e.g.
LICENSE) instead of the actual binary. Now we build a (size, path) list
filtered by known text extensions and filenames, and pick the largest
candidate — which is always the real binary.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant