Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aqua as "universal interpreter" that installs dependencies of shell scripts on the fly #2973

Open
reitzig opened this issue Jun 27, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@reitzig
Copy link

reitzig commented Jun 27, 2024

Feature Overview

Looking at pkgx and their "universal interpreter" feature, I wonder if something similar would be feasible for aqua.

Why is the feature needed?

Makes dependencies of shell scripts explicit and painless to "install" -- as long as the user uses aqua, of course. ;)

Workaround

This script kind of works: reitzig/scripts:aquax

Avoiding the intermediate config file would be neater and probably more efficient, though. One might want to tailor the output to the use case, too.

Example Code

#!/usr/bin/env -S aquax +charmbracelet/gum +mikefarah/yq bash

gum log --level info "Aqua registry at $(yq '.registries.[] | select(.type == "standard") | .ref' < ~/.config/aqua/aqua.yaml)"

Or even:

#!/usr/bin/env -S aquax +charmbracelet/[email protected] +mikefarah/yq>=4 bash

gum log --level info "Aqua registry at $(yq '.registries.[] | select(.type == "standard") | .ref' < ~/.config/aqua/aqua.yaml)"

NB: Fixed versions work with the workaround script; version ranges don't. (Don't think aqua supports them, either?)

Note

No response

@reitzig reitzig added the enhancement New feature or request label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: No status
Development

No branches or pull requests

1 participant