Declarative CLI Version manager. Support Lazy Install and Sharable configuration mechanism named Registry. Switch versions seamlessly

Related tags

Command Line aqua
Overview

aqua

Build Status GitHub last commit License

Declarative CLI Version manager. Support Lazy Install and Sharable configuration mechanism named Registry. Switch versions seamlessly.

Index

Blog

Note: Windows isn't supported

Currently, aqua doesn't support Windows.

Overview

You can install CLI tools and manage their versions with declarative YAML configuration aqua.yaml.

e.g. Install jq, direnv, and fzf with aqua.

registries:
- type: standard
  ref: v0.8.4 # renovate: depName=suzuki-shunsuke/aqua-registry

packages:
- name: stedolan/jq
  registry: standard
  version: jq-1.6
- name: direnv/direnv
  registry: standard
  version: v2.28.0 # renovate: depName=direnv/direnv
- name: junegunn/fzf
  registry: standard
  version: 0.27.2 # renovate: depName=junegunn/fzf

After writing the configuration, you can install them by aqua i.

$ aqua i

aqua i installs all packages all at once. Tools are installed in ~/.aqua/pkgs and symbolic links are created in ~/.aqua/bin, so please add ~/.aqua/bin to the environment variable PATH.

It takes a long time to install many tools all at once, and some tools might not be actually needed.

So instead of aqua i let's execute aqua i -l.

$ aqua i -l

aqua i -l creates symbolic links to aqua-proxy in ~/.aqua/bin but skipping the downloading and installing tools. When you execute the tool, the tool is installed automatically if it isn't installed yet before it is executed. We call this feature as lazy install. By the lazy install, you don't have to execute aqua explicitly after changing the tool's version. When aqua.yaml is managed with Git, the lazy install is very useful because aqua.yaml is updated by git pull then the update is reflected automatically.

By adding aqua.yaml in your Git repositories, you can manage tools per repository. You can change the version of tools per project.

aqua installs the tools in the shared directory ~/.aqua, so the same version of the same tool is installed only at once. It saves the time and the disk usage.

aqua supports the mechanism named Registry. You can share and reuse the aqua configuration, so it makes easy to write aqua.yaml.

registries:
- type: standard
  ref: v0.8.4 # renovate: depName=suzuki-shunsuke/aqua-registry

packages:
- name: direnv/direnv
  registry: standard
  version: v2.28.0 # renovate: depName=direnv/direnv

In the above configuration, the standard Registry is used so you can install direnv easily.

By the command aqua generate, you can check if the registry supports the tool you need and write the configuration quickly.

$ aqua g

aqua g launches the interactive UI and you can select the package and it's version interactively.

  direnv (standard)
  consul (standard)
  conftest (standard)
> golangci-lint (standard)
  47/47
>

After selecting the package, the configuration is outputted.

$ aqua g
- name: golangci-lint
  registry: standard
  version: v1.42.0

If the Registries don't support the tool, you can send the pull request to the registry or create your own Registry or add the configuration in aqua.yaml as inline Registry.

Quick Start

Install aqua.

$ curl -sSfL https://raw.githubusercontent.com/suzuki-shunsuke/aqua-installer/v0.1.3/aqua-installer | bash -s -- -i bin/aqua
$ export PATH=$PWD/bin:$HOME/.aqua/bin:$PATH
$ export GITHUB_TOKEN=<your personal access token>

Write aqua.yaml.

packages:
- name: stedolan/jq
  registry: standard
  version: jq-1.5

registries:
- type: standard
  ref: v0.8.4 # renovate: depName=suzuki-shunsuke/aqua-registry

Install tools.

$ aqua i

Tools are installed successfully.

$ jq --version
jq-1.5

Edit aqua.yaml.

$ sed -i "s/jq-1\.5/jq-1.6/" aqua.yaml

Run jq again, then jq's new version is installed automatically and jq is run.

$ jq --version
jq-1.6

Main Usecase

  • Install tools in CI/CD
  • Install tools for your project's local development
  • Install tools in your laptop

Feature

  • Declarative YAML Configuration
    • You don't have to execute commands imperatively to install tools
  • Manage versions per project
    • You can change tools version per project
  • Install tools when they are executed
    • When you execute the tool which isn't installed yet, aqua installs the tool and execute the tool
  • Share tools across projects
    • aqua installs tools in the shared directory ~/.aqua. It saves time and disk to install tools
  • Ecosystem named Registry - it eases to write aqua configuration
    • You can share and reuse the aqua configuration. We provide the standard registry too

Install

Please download a binary from the Release Page.

Or you can install aqua quickly with aqua-installer.

e.g.

$ curl -sSfL https://raw.githubusercontent.com/suzuki-shunsuke/aqua-installer/v0.1.3/aqua-installer | bash

GitHub Actions

e.g.

- uses: suzuki-shunsuke/[email protected]
  with:
    version: v0.3.1
    install_path: /tmp/bin/aqua

Where are tools installed?

  • Symbolic links are created in $HOME/.aqua/bin, so add this to the environment variable PATH
  • Tools are installed in $HOME/.aqua/pkgs
(your working directory)/
  aqua.yaml
~/.aqua/ # $AQUA_ROOT_DIR (default ~/.aqua)
  bin/
    aqua-proxy (symbolic link to aqua-proxy)
    
   
     (symbolic link to aqua-proxy)
  global/
    aqua.yaml # global configuration
  pkgs/
    github_release/
      github.com/
        suzuki-shunsuke/
          aqua-proxy/
            v0.1.0/
              aqua-proxy_darwin_amd64.tar.gz
                aqua-proxy
  registries/
    github_content/
      github.com/
        suzuki-shunsuke/
          aqua-registry/
            v0.1.1-0/
              registry.yaml

   

Related Projects

Example

Change Log

Please see Releases.

Versioning Policy

We are Conforming suzuki-shunsuke/versioning-policy v0.1.0, which is compatible with Semantic Versioning 2.0.0.

License

MIT

Comments
  • Install go using aqua broke gopls LSP server

    Install go using aqua broke gopls LSP server

    aqua version

    Please use the latest version.

    $ aqua -v
    aqua version 1.5.1 (aaf1d8beb6965d785e0b04de4ab93021f8634640)
    
    

    Environment

    :warning: aqua doesn't support Windows.

    • OS (Linux, macOS, etc): Linux
    • CPU Architecture (amd64, arm64, etc): amd64

    Overview

    How to reproduce

    • aqua.yaml
    # aqua.yaml
    registries:
      - type: standard
        ref: v2.13.0    # renovate: depName=aquaproj/aqua-registry
    
    packages:
      - name: twpayne/[email protected]
      - name: junegunn/[email protected]
      - name: starship/[email protected]
      - name: ajeetdsouza/[email protected]
      - name: BurntSushi/[email protected]
      - name: sharkdp/[email protected]
      - name: sharkdp/[email protected]
      - name: ogham/[email protected]
      - name: blacknon/[email protected]
      - name: FiloSottile/[email protected]
      - name: golang/[email protected]
      - name: cli/[email protected]
      - name: go-task/[email protected]
      - name: direnv/[email protected]
      - name: kubernetes/[email protected]
      - name: fluxcd/[email protected]
      - name: kubernetes-sigs/[email protected]/v4.5.4
      - name: mozilla/[email protected]
      - name: helm/[email protected]
      - name: siderolabs/[email protected]
    

    Actual Behaviour

    When golang binary is in /usr/local/go/bin/go, My neovim which is running gopls LSP client is not crashing on package or import completion. But when golang binary is in ~/.local/share/aquaproj-aqua/bin/go, it will crash neovim without any log at all.

    Important Factoids

    References

    • https://github.com/golang/go/issues/51643
    opened by budimanjojo 47
  • Support Windows

    Support Windows

    Feature Overview

    Currently, aqua doesn't support Windows. It is desirable for aqua to support Windows.

    I don't have Windows, so I'm not familiar with Windows. And it is a little difficult to verify aqua on Windows.

    There are differences between Windows and Linux, so we have to solve some problems.

    • https://github.com/aquaproj/aqua/blob/a7b5c0f1f51f9c94a975b033060ffa997be2bfe0/pkg/controller/which/lookpath.go#L13-L29
    • https://github.com/aquaproj/aqua/blob/a7b5c0f1f51f9c94a975b033060ffa997be2bfe0/pkg/exec/exec.go#L11

    We also have to fix aqua-registry to support Windows.

    Why is the feature needed?

    Please explain the problem you want to solve.

    Windows is most popular OS, so the Windows support may make aqua more popular.

    Does the feature include Breaking Changes?

    Probably no, but we have to investigate it.

    Example Code

    Nothing.

    enhancement windows 
    opened by suzuki-shunsuke 32
  • [Feature Request] Add `replacements_overrides` param for registry

    [Feature Request] Add `replacements_overrides` param for registry

    Feature Overview

    Add replacements_overrides param for registry to make registry more declarative.

    Why is the feature needed?

    Please explain the problem you want to solve.

    Some packages written in rust have a little strange pattern for asset. We can use {{if eq .VARIABLE}}~~{{else}}~~{{end}} for such pattern, but it is complicated. Why don't we add replacements_overrides like format_overrides or rosetta2? It makes registry more declarative.

    Does the feature include Breaking Changes?

    No.

    Example Code

    command and configuration

    - type: github_release
      repo_owner: sharkdp
      repo_name: bat
      rosetta2: true
      asset: 'bat-{{.Version}}-{{.Arch}}-{{if eq .GOOS "linux"}}{{if eq .GOARCH "amd64"}}unknown-linux-musl{{else}}unknown-linux-gnu{{end}}{{else}}{{.OS}}{{end}}.{{.Format}}'
      description: 'A cat(1) clone with wings.'
      format: tar.gz
      format_overrides:
      - goos: windows
        format: zip
      replacements:
        amd64: x86_64
        arm64: aarch64
        darwin: apple-darwin
        windows: pc-windows-msvc
        386: i686
      files:
      - name: bat
        src: 'bat-{{.Version}}-{{.Arch}}-{{if eq .GOOS "linux"}}{{if eq .GOARCH "amd64"}}unknown-linux-musl{{else}}unknown-linux-gnu{{end}}{{else}}{{.OS}}{{end}}/bat'
    

    to

     - type: github_release
      repo_owner: sharkdp
      repo_name: bat
      rosetta2: true
    - asset: 'bat-{{.Version}}-{{.Arch}}-{{if eq .GOOS "linux"}}{{if eq .GOARCH "amd64"}}unknown-linux-musl{{else}}unknown-linux-gnu{{end}}{{else}}{{.OS}}{{end}}.{{.Format}}'
    + asset: 'bat-{{.Version}}-{{.Arch}}-{{.OS}}.{{.Format}}'
      description: 'A cat(1) clone with wings.'
      format: tar.gz
      format_overrides:
      - goos: windows
        format: zip
      replacements:
        amd64: x86_64
        arm64: aarch64
        darwin: apple-darwin
    +   linux: unknown-linux-musl
        windows: pc-windows-msvc
        386: i686
    + replacements_overrides:
    + - goos: linux
    +   goarch: arm64
    +   replacements:
    +     linux: unknown-linux-gnu
      files:
      - name: bat
        src: 'bat-{{.Version}}-{{.Arch}}-{{if eq .GOOS "linux"}}{{if eq .GOARCH "amd64"}}unknown-linux-musl{{else}}unknown-linux-gnu{{end}}{{else}}{{.OS}}{{end}}/bat'
    
    enhancement 
    opened by 4513ECHO 20
  • [Feature Request] Generate json schema for registry from Go structs

    [Feature Request] Generate json schema for registry from Go structs

    Feature Overview

    Generate json schema to validate registry files.

    Why is the feature needed?

    Please explain the problem you want to solve.

    We can write registry with in yaml. It is declarative, but writing correctly has been difficult a bit lately. I want help of editor.

    I suggest to give out json schema. It defines structure of json-like lanuage (yaml or toml), and it can be used by language server. It is useful for completion or linting, so we can develop registry more easily.

    Also, generated schema should be served on the website (https://aquaproj.github.io is suitable)

    Ready-made projects to do that:

    • https://github.com/xeipuuv/gojsonschema
    • https://github.com/mcuadros/go-jsonschema-generator
    • https://github.com/invopop/jsonschema

    Does the feature include Breaking Changes?

    No.

    Example Code

    command and configuration

    $ 
    
    
    
    enhancement 
    opened by 4513ECHO 17
  • [Windows] Cannot execute symlinks for installed tools under $AQUA_ROOT_DIR/bin

    [Windows] Cannot execute symlinks for installed tools under $AQUA_ROOT_DIR/bin

    aqua version

    $ aqua -v
    aqua version 1.12.0-0 (ccaff1e0366e41a6d6fe34ff07a325b18cf16813)
    

    Environment

    :warning: aqua doesn't support Windows.

    I understand that Windows is not officially supported. I am not an expert on Windows myself. I would be happy if there is anything useful information.

    • OS (Linux, macOS, etc): Windows 11 Pro 22H2 (22621.105)
    • CPU Architecture (amd64, arm64, etc): amd64

    Overview

    How to reproduce

    • aqua.yaml
    • executed command and output

    aqua.yaml should be not partial but complete configuration. Please remove unneeded configuration to reproduce the issue.

    # aqua.yaml
    ---
    # aqua - Declarative CLI Version Manager
    # https://aquaproj.github.io/
    registries:
    - type: standard
      ref: v2.27.0 # renovate: depName=aquaproj/aqua-registry
    packages:
    - name: golang/[email protected]
    - name: golangci/[email protected]
    

    Enable "Developer Mode"[1] and restart the computer to allow non-admin user to create symlink.

    $ cd /path/to/aqua.yaml
    $ aqua i
    # Some symlinks under AQUA_ROOT_DIR/bin exist
    $ dir "$($Env:AQUA_ROOT_DIR)\bin"
    
        ディレクトリ: C:\Users\pudding\.local\share\aquaproj-aqua\bin
    
    Mode                 LastWriteTime         Length Name
    ----                 -------------         ------ ----
    -a---l        2022/06/18     13:30              0 aqua-proxy
    -a---l        2022/06/18     13:30              0 go
    -a---l        2022/06/18     13:30              0 gofmt
    -a---l        2022/06/18     13:30              0 golangci-lint
    
    #  AQUA_ROOT_DIR/bin is added to PATH
    $ $Env:Path -Split ";" | Select-String aquaproj-aqua
    
    C:\Users\pudding\.local\share\aquaproj-aqua\bin
    

    There is no executable binary named go without the symlink created by aqua.

    Debug Output

    $ $Env:AQUA_LOG_LEVEL
    debug
    
    $ aqua i
    time="2022-06-18T13:30:45+09:00" level=debug msg="install the proxy" aqua_version=1.12.0-0 env=windows/amd64 package_name=aqua-proxy package_version=v1.1.2 program=aqua registry=
    time="2022-06-18T13:30:45+09:00" level=debug msg="check if aqua-proxy is already installed" aqua_version=1.12.0-0 env=windows/amd64 package_name=aqua-proxy package_version=v1.1.2 program=aqua registry=
    time="2022-06-18T13:30:45+09:00" level=debug msg="check if the package is already installed" aqua_version=1.12.0-0 env=windows/amd64 package_name=aqua-proxy package_version=v1.1.2 program=aqua registry=
    time="2022-06-18T13:30:45+09:00" level=info msg="download and unarchive the package" aqua_version=1.12.0-0 env=windows/amd64 package_name=aqua-proxy package_version=v1.1.2 program=aqua registry=
    time="2022-06-18T13:30:57+09:00" level=info msg="create a symbolic link" aqua_version=1.12.0-0 env=windows/amd64 link_file="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\bin\\aqua-proxy" new="..\\pkgs\\github_release\\github.com\\aquaproj\\aqua-proxy\\v1.1.2\\aqua-proxy_windows_amd64.tar.gz\\aqua-proxy.exe" package_name=aqua-proxy package_version=v1.1.2 program=aqua registry=
    time="2022-06-18T13:30:57+09:00" level=info msg="create a symbolic link" aqua_version=1.12.0-0 env=windows/amd64 link_file="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\bin\\go" new=aqua-proxy package_name=golang/go package_version=go1.18.3 program=aqua registry=standard registry_ref=v2.27.0
    time="2022-06-18T13:30:57+09:00" level=info msg="create a symbolic link" aqua_version=1.12.0-0 env=windows/amd64 link_file="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\bin\\gofmt" new=aqua-proxy package_name=golang/go package_version=go1.18.3 program=aqua registry=standard registry_ref=v2.27.0
    time="2022-06-18T13:30:57+09:00" level=info msg="create a symbolic link" aqua_version=1.12.0-0 env=windows/amd64 link_file="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\bin\\golangci-lint" new=aqua-proxy package_name=golangci/golangci-lint package_version=v1.46.2 program=aqua registry=standard registry_ref=v2.27.0
    time="2022-06-18T13:30:57+09:00" level=debug msg="install the package" aqua_version=1.12.0-0 env=windows/amd64 package_name=golangci/golangci-lint package_version=v1.46.2 program=aqua registry=standard
    time="2022-06-18T13:30:57+09:00" level=debug msg="install the package" aqua_version=1.12.0-0 env=windows/amd64 package_name=golang/go package_version=go1.18.3 program=aqua registry=standard
    time="2022-06-18T13:30:57+09:00" level=debug msg="check if the package is already installed" aqua_version=1.12.0-0 env=windows/amd64 package_name=golangci/golangci-lint package_version=v1.46.2 program=aqua registry=standard
    time="2022-06-18T13:30:57+09:00" level=info msg="download and unarchive the package" aqua_version=1.12.0-0 env=windows/amd64 package_name=golangci/golangci-lint package_version=v1.46.2 program=aqua registry=standard
    time="2022-06-18T13:30:57+09:00" level=debug msg="check if the package is already installed" aqua_version=1.12.0-0 env=windows/amd64 package_name=golang/go package_version=go1.18.3 program=aqua registry=standard
    time="2022-06-18T13:30:57+09:00" level=info msg="download and unarchive the package" aqua_version=1.12.0-0 env=windows/amd64 package_name=golang/go package_version=go1.18.3 program=aqua registry=standard
    time="2022-06-18T13:30:58+09:00" level=debug msg="check the permission" aqua_version=1.12.0-0 env=windows/amd64 file_name=golangci-lint package_name=golangci/golangci-lint package_version=v1.46.2 program=aqua registry=standard
    time="2022-06-18T13:30:58+09:00" level=debug msg="add the permission to execute the command" aqua_version=1.12.0-0 env=windows/amd64 file_name=golangci-lint package_name=golangci/golangci-lint package_version=v1.46.2 program=aqua registry=standard
    time="2022-06-18T13:31:11+09:00" level=debug msg="check the permission" aqua_version=1.12.0-0 env=windows/amd64 file_name=go package_name=golang/go package_version=go1.18.3 program=aqua registry=standard
    time="2022-06-18T13:31:11+09:00" level=debug msg="add the permission to execute the command" aqua_version=1.12.0-0 env=windows/amd64 file_name=go package_name=golang/go package_version=go1.18.3 program=aqua registry=standard
    time="2022-06-18T13:31:11+09:00" level=debug msg="check the permission" aqua_version=1.12.0-0 env=windows/amd64 file_name=gofmt package_name=golang/go package_version=go1.18.3 program=aqua registry=standard
    time="2022-06-18T13:31:11+09:00" level=debug msg="add the permission to execute the command" aqua_version=1.12.0-0 env=windows/amd64 file_name=gofmt package_name=golang/go package_version=go1.18.3 program=aqua registry=standard
    

    Execute go command with AQUA_LOG_LEVEL=debug does not show any logs.

    Expected Behaviour

    Either of the following methods will produce the correct results.

    $ go version
    
    $ aqua exec -- go version
    

    Actual Behaviour

    Execute go command, then "How to open the file" window is shown.

    $ go version
    

    I am a Japanese user so the UI is displayed in Japanese. Sorry.

    image

    The same result was obtained when executed with an absolute path.

    $ C:\Users\pudding\.local\share\aquaproj-aqua\bin\go
    

    Important Factoids

    aqua-proxy under the $AQUA_ROOT_DIR\bin is executable (and it exit immediately).

    time="2022-06-18T13:56:41+09:00" level=fatal msg="aqua failed" aqua_version=1.12.0-0 env=windows/amd64 error="command is not found" exe_name=aqua-proxy.exe program=aqua
    
    [プロセスはコード 1 (0x00000001) で終了しました]
    

    This may be unrelated, but some errors are shown when exec the command by aqua exec.

    $ aqua exec -- go version
    time="2022-06-18T13:40:16+09:00" level=debug msg="install the package" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go package_name=golang/go package_version=go1.18.3 program=aqua registry=standard
    time="2022-06-18T13:40:16+09:00" level=debug msg="check if the package is already installed" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go package_name=golang/go package_version=go1.18.3 program=aqua registry=standard
    time="2022-06-18T13:40:16+09:00" level=debug msg="check the permission" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" file_name=go package=golang/go package_name=golang/go package_version=go1.18.3 program=aqua registry=standard
    time="2022-06-18T13:40:16+09:00" level=debug msg="add the permission to execute the command" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" file_name=go package=golang/go package_name=golang/go package_version=go1.18.3 program=aqua registry=standard
    time="2022-06-18T13:40:16+09:00" level=debug msg="check the permission" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" file_name=gofmt package=golang/go package_name=golang/go package_version=go1.18.3 program=aqua registry=standard
    time="2022-06-18T13:40:16+09:00" level=debug msg="add the permission to execute the command" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" file_name=gofmt package=golang/go package_name=golang/go package_version=go1.18.3 program=aqua registry=standard
    time="2022-06-18T13:40:16+09:00" level=debug msg="check if exec file exists" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua
    time="2022-06-18T13:40:16+09:00" level=debug msg="command isn't found. wait for lazy install" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua retry_count=1
    time="2022-06-18T13:40:16+09:00" level=debug msg="check if exec file exists" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua
    time="2022-06-18T13:40:16+09:00" level=debug msg="command isn't found. wait for lazy install" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua retry_count=2
    time="2022-06-18T13:40:16+09:00" level=debug msg="check if exec file exists" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua
    time="2022-06-18T13:40:16+09:00" level=debug msg="command isn't found. wait for lazy install" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua retry_count=3
    time="2022-06-18T13:40:16+09:00" level=debug msg="check if exec file exists" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua
    time="2022-06-18T13:40:16+09:00" level=debug msg="command isn't found. wait for lazy install" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua retry_count=4
    time="2022-06-18T13:40:16+09:00" level=debug msg="check if exec file exists" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua
    time="2022-06-18T13:40:16+09:00" level=debug msg="command isn't found. wait for lazy install" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua retry_count=5
    time="2022-06-18T13:40:16+09:00" level=debug msg="check if exec file exists" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua
    time="2022-06-18T13:40:16+09:00" level=debug msg="command isn't found. wait for lazy install" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua retry_count=6
    time="2022-06-18T13:40:16+09:00" level=debug msg="check if exec file exists" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua
    time="2022-06-18T13:40:16+09:00" level=debug msg="command isn't found. wait for lazy install" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua retry_count=7
    time="2022-06-18T13:40:16+09:00" level=debug msg="check if exec file exists" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua
    time="2022-06-18T13:40:16+09:00" level=debug msg="command isn't found. wait for lazy install" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua retry_count=8
    time="2022-06-18T13:40:16+09:00" level=debug msg="check if exec file exists" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua
    time="2022-06-18T13:40:16+09:00" level=debug msg="command isn't found. wait for lazy install" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua retry_count=9
    time="2022-06-18T13:40:16+09:00" level=debug msg="check if exec file exists" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua
    time="2022-06-18T13:40:16+09:00" level=debug msg="command isn't found. wait for lazy install" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua retry_count=10
    time="2022-06-18T13:40:16+09:00" level=debug msg="execute the command" aqua_version=1.12.0-0 env=windows/amd64 exe_path="C:\\Users\\pudding\\.local\\share\\aquaproj-aqua\\pkgs\\http\\golang.org\\dl\\go1.18.3.windows-amd64.zip\\go\\bin\\go.exe" package=golang/go program=aqua
    go version go1.18.3 windows/amd64
    

    The file actually exists.

    $ dir C:\Users\pudding\.local\share\aquaproj-aqua\pkgs\http\golang.org\dl\go1.18.3.windows-amd64.zip\go\bin\go.exe
    
    
        ディレクトリ: C:\Users\pudding\.local\share\aquaproj-aqua\pkgs\http\golang.org\dl\go1.18.3.windows-amd64.zip\go\bin
    
    
    Mode                 LastWriteTime         Length Name
    ----                 -------------         ------ ----
    -a----        2022/06/18     13:31       14466560 go.exe
    

    References

    [1] Developer Mode features and debugging

    bug windows 
    opened by pddg 10
  • [Bug Report] Install failed when release is executable file

    [Bug Report] Install failed when release is executable file

    aqua version

    Please use the latest version.

    $ aqua -v
    aqua version 1.5.0 (9d1d73bb167f8cd791e7082852f75dedeb1d9b3d)
    

    Environment

    :warning: aqua doesn't support Windows.

    • OS (Linux, macOS, etc):

    linux (Ubuntu)

    • CPU Architecture (amd64, arm64, etc):

    arm64 (Raspberry Pi)

    Overview

    Auqa failed when relase is single executable file. For example, I added antonmedv/fx to registry. Its release contains only executable files.

    How to reproduce

    • aqua.yaml
    • executed command and output

    aqua.yaml should be not partial but complete configuration. Please remove unneeded configuration to reproduce the issue.

    # aqua.yaml
    ---
    registries:
      - name: local
        type: local
        path: experimental.yaml
    
    packages:
      - name: antonmedv/[email protected]
        registry: local
    
    # experimental.yaml
    ---
    packages:
      # init: a
      - type: github_release
        repo_owner: antonmedv
        repo_name: fx
        asset: 'fx_{{.OS}}_{{.Arch}}'
        description: Terminal JSON viewer
        files:
          - name: fx
            src: 'fx_{{.OS}}_{{.Arch}}'
    
    $ AQUA_CONFIG=./aqua.yaml aqua i --test
    ERRO[0000] install the package                           aqua_version=1.5.0 error="check file_src is correct: exe_path isn't found: stat /home/hibiki/.local/share/aquaproj-aqua/pkgs/github_release/github.com/antonmedv/fx/22.0.10/fx_linux_arm64/fx_linux_arm64: no such file or directory" file_name=fx package_name=antonmedv/fx package_version=22.0.10 program=aqua registry=local
    FATA[0000] aqua failed                                   aqua_version=1.5.0 error="it failed to install some packages" program=aqua
    

    Debug Output

    Please set the environment variable AQUA_LOG_LEVEL=debug and run aqua and tell us the debug output.

    $ AQUA_CONFIG=./aqua.yaml AQUA_LOG_LEVEL=debug aqua i --test
    DEBU[0000] install the proxy                             aqua_version=1.5.0 package_name=aqua-proxy package_version=v1.0.0 program=aqua registry=
    DEBU[0000] check if aqua-proxy is already installed      aqua_version=1.5.0 package_name=aqua-proxy package_version=v1.0.0 program=aqua registry=
    DEBU[0000] install the package                           aqua_version=1.5.0 package_name=antonmedv/fx package_version=22.0.10 program=aqua registry=local
    DEBU[0000] check if the package is already installed     aqua_version=1.5.0 package_name=antonmedv/fx package_version=22.0.10 program=aqua registry=local
    ERRO[0000] install the package                           aqua_version=1.5.0 error="check file_src is correct: exe_path isn't found: stat /home/hibiki/.local/share/aquaproj-aqua/pkgs/github_release/github.com/antonmedv/fx/22.0.10/fx_linux_arm64/fx_linux_arm64: no such file or directory" file_name=fx package_name=antonmedv/fx package_version=22.0.10 program=aqua registry=local
    FATA[0000] aqua failed                                   aqua_version=1.5.0 error="it failed to install some packages" program=aqua
    

    Expected Behaviour

    Aqua should be success to install

    Actual Behaviour

    Aqua failed.

    Important Factoids

    I tried to remove files property, but it also failed.

    References

    opened by 4513ECHO 9
  • AQUA_GLOBAL_CONFIG is not working

    AQUA_GLOBAL_CONFIG is not working

    aqua version

    Please use the latest version.

    $ aqua -v
    aqua version 0.10.2 (67b6b2275c891af25b7182ff74c6745303c390f9)
    
    

    Environment

    :warning: aqua doesn't support Windows.

    • OS (Linux, macOS, etc): Ubuntu 20.04
    • CPU Architecture (amd64, arm64, etc): amd64

    Overview

    How to reproduce

    I did this: https://aquaproj.github.io/docs/tutorial-basics/global-config. When I do aqua commands, it gives me this error:

     aqua g
    FATA[0000] aqua failed                                   aqua_version=0.10.2 error="configuration file isn't found" program=aqua
    
    

    Expected Behaviour

    Actual Behaviour

    Important Factoids

    References

    documentation 
    opened by budimanjojo 9
  • Add `supported_envs` instead of `supported_if`

    Add `supported_envs` instead of `supported_if`

    Feature Overview

    Add a field supported_envs instead of supported_if. You can specify the list of supported environments (GOOS and GOARCH) in supported_envs.

    Why is the feature needed?

    Please explain the problem you want to solve.

    supported_if has two problems.

    1. Complicated. There are multiple ways to express the same environments. The expression is too flexible
    2. Performance. aqua has to compile and evaluate the expression per tool. It may affect the performance although we should do the performance test

    Does the feature include Breaking Changes?

    No.

    We keep supporting supported_if. But when we replace the standard registry's supported_if to supported_envs, it means the breaking change.

    Example Code

    command and configuration

    AS IS

    packages:
      - type: github_release
        repo_owner: gruntwork-io
        repo_name: terragrunt
        asset: "terragrunt_{{.OS}}_{{.Arch}}"
        supported_if: not (GOOS == "windows" and GOARCH == "arm64")
    

    TO BE

    packages:
      - type: github_release
        repo_owner: gruntwork-io
        repo_name: terragrunt
        asset: "terragrunt_{{.OS}}_{{.Arch}}"
        supported_envs:
          - windows/amd64
          - darwin
          - linux
    

    The following patterns are supported.

    • <GOOS>
    • <GOOS>/<GOARCH>
    enhancement 
    opened by suzuki-shunsuke 8
  • [Feature Request] Add option to control colored output

    [Feature Request] Add option to control colored output

    Feature Overview

    Add --color={never|auto|always} option to control colored output.

    Why is the feature needed?

    Please explain the problem you want to solve.

    Sometimes I want non-colored log to process for example writing to files or editing with awk/sed. Also, I want to see colored log on GitHub Action, but aqua automatically disable colored output. I want to control colored output.

    Does the feature include Breaking Changes?

    No.

    Example Code

    command and configuration

    maybe global option is useful than environmet variable
    $ aqua --color=always install --test
    
    
    
    enhancement 
    opened by 4513ECHO 7
  • [Feature Request] Add option to avoid showing progress bar

    [Feature Request] Add option to avoid showing progress bar

    Feature Overview

    Add --no-progress-bar ( --no-progress ) option to avoid showing progress bar in package installation.

    Why is the feature needed?

    Please explain the problem you want to solve.

    Progress bar is useful in usual using on terminal, but it is sometimes obstructed a bit such as on test log of GitHub Action. Also, progress bar uses some escape sequences, and it sometimes broken. I don't always want progress bar.

    Does the feature include Breaking Changes?

    No.

    Example Code

    command and configuration

    `install` subcommand option
    $ aqua install --no-progress-bar
    $ aqua install --no-progress
    global option
    $ aqua --no-progress-bar install
    $ aqua --no-progress install
    
    
    

    Reference

    • https://github.com/aquaproj/aqua/releases/tag/v1.15.0
    • https://github.com/aquaproj/aqua/pull/963
    enhancement 
    opened by 4513ECHO 7
  • Scaffold Registry Configuration

    Scaffold Registry Configuration

    Feature Overview

    Add a subcommand to scaffold the Registry Configuration.

    Why is the feature needed?

    Please explain the problem you want to solve.

    This feature allows you to add packages to Registries easily. New contributors can contribute to the Standard Registry easily. And it decreases the burden to add many packages to a Registry.

    Recently, I've added many packages to the Standard Registry, but it was very bothersome.

    https://github.com/aquaproj/aqua-registry/releases/tag/v3.1.0

    And we will also have to add many packages.

    https://github.com/aquaproj/aqua-registry/issues/4181

    We would like to achieve the task easily.

    Does the feature include Breaking Changes?

    No.

    Example Code

    command and configuration

    $ aqua generate-registry cli/cli # Outputs the registry configuration.
    packages:
      - type: github_release
        repo_owner: cli
        repo_name: cli
        description: GitHub’s official command line tool
        supported_envs:
          - linux
          - darwin
          - amd64
        rosetta2: true
        asset: "gh_{{trimV .Version}}_{{.OS}}_{{.Arch}}.{{.Format}}"
        replacements:
          darwin: macOS
        format: tar.gz
    

    aqua-registry

    scaffold.sh

    #!/usr/bin/env bash
    
    set -eux
    set -o pipefail
    
    if [ $# -ne 1 ]; then
      echo "usage: $ bash scaffold.sh <pkgname>" >&2
      echo "e.g. $ bash scaffold.sh cli/cli" >&2
      exit 1
    fi
    
    pkg=$1
    
    mkdir -p "pkgs/$pkg"
    aqua gr "$pkg" > "pkgs/$pkg/registry.yaml"
    bash generate-registry.sh
    aqua g -i "$pkg"
    echo "packages:" > "pkgs/$pkg/pkg.yaml"
    echo "  $(aqua g "$pkg")" >> "pkgs/$pkg/pkg.yaml"
    test -f aqua.yaml || cp aqua.yaml.tmpl aqua.yaml
    aqua i
    
    $ bash scaffold.sh cli/cli
    
    enhancement 
    opened by suzuki-shunsuke 7
  • Support checksum algorithm MD5

    Support checksum algorithm MD5

    Feature Overview

    Why is the feature needed?

    Please explain the problem you want to solve.

    • https://github.com/mattermost/mmctl/releases/tag/v7.1.3
    • https://github.com/aquaproj/aqua-registry/pull/6158

    Does the feature include Breaking Changes?

    No.

    Example Code

    command and configuration

    $ 
    
    
    
    enhancement 
    opened by suzuki-shunsuke 0
  • feat: wildcard support for aqua cp

    feat: wildcard support for aqua cp

    Feature Overview

    Would be nice to support wildcard * in aqua cp.

    Why is the feature needed?

    Install 3rd party binaries for OSs, similar to asdf-vm, useful when one is using more than one client device.

    Does the feature include Breaking Changes?

    No

    Example Code

    $ aqua cp * -o /usr/local/bin/
    

    Reference

    • https://github.com/aquaproj/aqua/issues/1042#issuecomment-1237169166
    enhancement 
    opened by lukasmrtvy 1
  • aqua gr: set `complete_windows_ext: false`

    aqua gr: set `complete_windows_ext: false`

    aqua version

    Please use the latest version.

    $ aqua -v
    aqua version 1.20.0-4-checksum (5c54b84c80f080ca9815033a2bcbfc62bf030c33)
    

    Environment

    • OS (Windows, Linux, macOS, etc): darwin
    • CPU Architecture (amd64, arm64, etc): arm64

    Overview

    How to reproduce

    • aqua.yaml
    • executed command and output

    aqua.yaml should be not partial but complete configuration. Please remove unneeded configuration to reproduce the issue.

    # aqua.yaml
    
    
    $ aqua gr nuclio/nuclio
    packages:
      - type: github_release
        repo_owner: nuclio
        repo_name: nuclio
        asset: nuctl-{{.Version}}-{{.OS}}-{{.Arch}}
        format: raw
        description: High-Performance Serverless event and data processing platform
        supported_envs:
          - darwin
          - linux
          - amd64
        rosetta2: true
    

    https://github.com/nuclio/nuclio/releases/tag/1.10.4

    Debug Output

    Please set the environment variable AQUA_LOG_LEVEL=debug and run aqua and tell us the debug output.

    $ 
    

    Expected Behaviour

    complete_windows_ext: false is set.

    Actual Behaviour

    complete_windows_ext: false isn't set.

    Important Factoids

    References

    • https://github.com/aquaproj/aqua-registry/pull/6007#issuecomment-1236500786
    bug 
    opened by suzuki-shunsuke 0
  • Support changing template engine for performance

    Support changing template engine for performance

    Feature Overview

    aqua uses text/template at the moment. I propose to support changing template engine for performance.

    Why is the feature needed?

    Please explain the problem you want to solve.

    To improve the performance.

    Does the feature include Breaking Changes?

    No.

    Example Code

    command and configuration

    registry.yaml

    template_engine:
      type: pongo2 # By default, text/template
    packages:
      - type: github_release
        # ...
        asset: genact-{{Version}}-{{OS}}-{{Arch}}
    

    Note

    It makes the merge of registry files difficult. I don't have a strong motivation to support this feature at the moment. But I'm interested in how this feature improves the performance.

    Reference

    • https://blog.logrocket.com/golang-template-libraries-performance-comparison/
    enhancement 
    opened by suzuki-shunsuke 0
Releases(v1.20.0-5-checksum)
Owner
Shunsuke Suzuki
DevOps / Go / Tool maker / OSS contributor
Shunsuke Suzuki
A wrapper of aliyun-cli subcommand alidns, run aliyun-cli in Declarative mode.

aliyun-dns A wrapper of aliyun-cli subcommand alidns, run aliyun-cli in Declarative mode. Installation Install aliyun-cli. Usage $ aliyun-dns -h A wra

许嘉华 0 Dec 21, 2021
kcon is a simple CLI tool to switch the context of your Kubeconfig file.

kcon kcon is a simple CLI tool to switch the context of your Kubeconfig file. Scope The code published here is educational only. Usage Usage of kcon:

Alexander Teves 0 Oct 14, 2021
ets2-dlc-repacker is a Windows / Linux / MacOS CLI util to automatically repack older DLC archives for compatibility with newer versions.

ets2-dlc-repacker is a Windows / Linux / MacOS CLI util to automatically repack older DLC archives for compatibility with newer versions.

Daniel 0 Dec 26, 2021
Utility CLI to convert Spring Boot Yaml configuration into external configuration

boot-config-export Utility CLI to convert Spring Boot Yaml configuration into external configuration (as environment variables). The variables are tra

Lucian 0 Nov 17, 2021
CLI for SendGrid, which helps in managing SSO users, can install and update users from yaml config

Sendgrid API This script is needed to add new users to SendGrid as SSO teammates. Previously, all users were manually added and manually migrating the

ANNA 4 Jul 20, 2022
painless task queue manager for shell commands with an intuitive cli interface (execute shell commands in distributed cloud-native queue manager).

EXEQ DOCS STILL IN PROGRESS. Execute shell commands in queues via cli or http interface. Features Simple intuitive tiny cli app. Modular queue backend

Mohammed Al Ashaal 12 Jan 29, 2022
Library for easy named formatting strings

go-celsium Library for easy named formatting translations Documentation All translations with named parameters are stored in next format: Hello, {name

Freon Service 4 Apr 12, 2021
Named csv reader for go

Named csv reader Package named csv reader provides methods to easly read csv files and parse columsn to basic types. This package is not a CSV parser,

Dylan van Gils 0 Nov 28, 2021
Command-line tool for listening log file of game named as

Path of Exile Trade Notifier Command-line tool for listening log file of game named as "Path of Exile" and looking for buy message and send it to Tele

null 1 Apr 15, 2022
A youtube library for retrieving metadata, and obtaining direct links to video-only/audio-only/mixed versions of videos on YouTube in Go.

A youtube library for retrieving metadata, and obtaining direct links to video-only/audio-only/mixed versions of videos on YouTube in Go. Install go g

José Pastor 4 Sep 2, 2022
Helper tool to create and assign fix versions in Jira

Jira Helper Helper tool to interact with Jira from CI/CD scripts. Its main purpose is to create and assign version based on GitHub releases to Jira ti

Marcel Blijleven 3 Jun 5, 2022
It is an easy and fast tool to install your packages with just one command.

Trouxa It is an easy and fast tool to install your packages with just one command. What means "Trouxa"? In portuguese, Trouxa means something like a "

Baianoware 7 Feb 13, 2022
Download and install binaries from GitHub Releases, interactively.

bget Download and install binary files from GitHub Releases. Preview Install For Mac/Linux users, you can use Homebrew to install it: brew install ego

EGOIST 216 Aug 24, 2022
Command not found? Install it right there!

Tii On most GNU/Linux systems, when a command is not found, a message showing what can be run to install the command is printed.

Ishan Goel 32 Aug 10, 2022
A command tool to help user install oh-my-zsh plugins fast in a comfortable way

zshx A command tool to help user install oh-my-zsh plugins fast in a comfortable way. in other way, it is a zsh plugin package manager. How to use the

xylon 6 Feb 11, 2022
Instal - Install any binary app from a script URL

??️ Install any binary app from a script URL. this cli app is an alternative to

Abdfn 13 Jun 30, 2022
dots is CLI tool to build, version and publish config file bundles.

dots-cli dots is CLI tool to build, version and publish config file bundles. TODO (shared): Writing comprehensive documentation Designing landing page

Alvan Rahimli 11 Aug 24, 2022
🎨 Terminal color rendering library, support 8/16 colors, 256 colors, RGB color rendering output, support Print/Sprintf methods, compatible with Windows.

?? Terminal color rendering library, support 8/16 colors, 256 colors, RGB color rendering output, support Print/Sprintf methods, compatible with Windows. GO CLI 控制台颜色渲染工具库,支持16色,256色,RGB色彩渲染输出,使用类似于 Print/Sprintf,兼容并支持 Windows 环境的色彩渲染

Gookit 1.2k Sep 26, 2022
A dead simple CLI tool that prints the next semantic version based on the last tag of your git repository

nextver A dead simple CLI tool that prints the next semantic version based on the last tag of your git repository. Install go install github.com/junk1

Tom 2 Sep 16, 2022