This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is an asdf plugin for Task (go-task/task), a task runner/build tool. The plugin follows asdf plugin conventions to manage Task installations.
The plugin consists of three main components:
- bin/ - Entry points for asdf operations (list-all, download, install, latest-stable)
- lib/utils.bash - Core functionality shared across scripts including GitHub API interactions, version management, and platform detection
- scripts/ - Development tools for linting and formatting
Key architectural patterns:
- All bin scripts source
lib/utils.bashfor shared functionality - Downloads are fetched from GitHub releases at
go-task/task - Platform detection handles Linux/macOS and various architectures (amd64, arm64, 386, arm)
- Version tags are fetched directly from GitHub and stripped of 'v' prefix
# Test the plugin locally
asdf plugin test task https://github.com/sgaunet/asdf-task "task --version"# Run shellcheck and shfmt checks
./scripts/lint.bash# Auto-format bash scripts
./scripts/format.bash- The plugin only supports version installs (not ref or path installs)
- Downloads are extracted to a temporary directory first, then only the
taskbinary is moved to the install path - GitHub API token can be provided via
GITHUB_API_TOKENenvironment variable for rate limiting - Version sorting handles semantic versioning with special characters
- Comprehensive error handling with retry logic for network operations
- Checksum verification for downloaded files when available
- Debug mode available via
ASDF_TASK_DEBUG=1for troubleshooting - Optional scripts provide environment setup (
exec-env) and help documentation - Support for multiple platforms including Linux, macOS, Windows (WSL), and BSD variants