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/kustomize@kustomize/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
  • Verify the checksum

    Verify the checksum

    ref. https://zenn.dev/shunsuke_suzuki/scraps/7cfc2d3a5c6d04

    Overview

    Verify the checksum of downloaded file, and if the checksum is wrong make the installation failure.

    Motivation

    Make aqua secure. Prevent the supply chain atack.

    Consideration

    We have to keep aqua simple. We should avoid making aqua complicated by introducing checksum verification.

    Proposal of Specification

    When a tool is installed, aqua verifies the checksum as the following.

    1. Download the file in the temporal directory
    2. Calculate the checksum from the downloaded file
    3. Read the file .aqua-checksums.json on the same directory as aqua configuration file. If .aqua-checksums.json isn't found, aqua treats the file is empty
    4. Get the expected checksum of downloaded file from .aqua-checksums.json
    5. If the actual checksum is different from the expected checksum, make the installation failure. If the checksum isn't found in .aqua-checksums.json, the actual checksum is added to .aqua-checksums.json
    6. Install the file

    :warning: Note

    If the file is falsified before the correct checksum is added to .aqua-checksums.json, it is difficult to detect the falsification.

    :bulb: Ignore the specific checksum verification

    If you would like to ignore the specific checksum verification, you can do it by removing the checksum from .aqua-checksums.json.

    .aqua-checksums.json

    Pairs of package id and checksum are recorded.

    e.g.

    {
      "github_archive/github.com/tfutils/tfenv/v2.2.3": "0b42330aeed675ad3e5dd6063dbd1daabecb36180e515cca1c6e105dd7a1fa49"
    }
    

    This file is created and updated by aqua automatically, so you don't have to update this file manually.

    Question: Should .aqua-checksums.json be managed with Git?

    Coming soon

    Algorithm to calculate checksums

    sha256 is used for goreleaser by default, so aqua would also support sha256 by default. In future, aqua may support other algorithms too.

    Idea: command to update .aqua-checksums.json like terraform providers lock

    Coming soon

    Future work

    • Verify Registry
    • Verify aqua-proxy
    • Support checksum algorithm other than sha256
    • Get checksums from GitHub Releases's file

    Implementation

    • https://github.com/aquaproj/aqua/pull/794

    Reference

    • https://news.ycombinator.com/item?id=29437903
    • https://pkg.go.dev/crypto/sha256
    enhancement security checksum verification 
    opened by suzuki-shunsuke 33
  • 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
  • Proposal: selector for applications to be installed

    Proposal: selector for applications to be installed

    I use aqua to bootstrap my deveopment environment which be cleaned up periodically. I don't want take a time to bootstrap, so I install applications in advance which I want to use them immediately, but I install the others lazily.

    To achieve this, I have two aqua.yaml files, one is to be used to install in advance, another is to be used to install lazily.

    $ aqua --config=/path/to/aqua_in_advance.yaml install
    $ aqua --config=/path/to/aqua_lazy.yaml install --only-links
    

    Then, I use AQUA_GLOBAL_CONFIG to merge them. If aqua would be able to select applications to be installed, I can manage applications in one configuration file, and I don't have to use AQUA_GLOBAL_CONFIG to merge it.

    However, I also understand that this is not a common situation.

    So, If there are a lot of usecases to select applications to install like I do, I would like you to consider it. In this Issue, I would like to collect many such use cases.

    enhancement proposal 
    opened by uesyn 15
  • [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
  • Install Cosign lazily

    Install Cosign lazily

    Feature Overview

    Install Cosign when Cosign is really needed.

    Why is the feature needed?

    Please explain the problem you want to solve.

    To avoid unneeded installation of Cosign.

    Does the feature include Breaking Changes?

    No.

    Example Code

    command and configuration

    $ 
    
    
    
    enhancement 
    opened by suzuki-shunsuke 0
  • aqua gr: Support generating slsa_provenance

    aqua gr: Support generating slsa_provenance

    Feature Overview

    Generate the setting slsa_provenance.

    aqua gr
    

    Why is the feature needed?

    Please explain the problem you want to solve.

    Does the feature include Breaking Changes?

    No.

    Example Code

    command and configuration

    $ 
    
    
    
    enhancement 
    opened by suzuki-shunsuke 0
  • Prevent too huge files from being downloaded

    Prevent too huge files from being downloaded

    Feature Overview

    Prevent too huge files from being downloaded. If a downloaded file is too huge, the download is canceled and the installation fails.

    Why is the feature needed?

    Please explain the problem you want to solve.

    It is required to prevent the attack that let too huge files being downloaded.

    Does the feature include Breaking Changes?

    Basically No.

    Example Code

    registry.yaml

    max_asset_size is added.

    packages:
      - type: github_release
        repo_owner: suzuki-shunsuke
        repo_name: tfcmt
        asset: tfcmt_{{.OS}}_{{.Arch}}.tar.gz
        max_asset_size: 10 # 10MB. By default, 1GB 
        checksum:
          type: github_release
          max_asset_size: 1 # 1MB. By default, 1MB
          asset: tfcmt_{{trimV .Version}}_checksums.txt
          file_format: regexp
          algorithm: sha256
          pattern:
            checksum: "^(\\b[A-Fa-f0-9]{64}\\b)"
            file: "^\\b[A-Fa-f0-9]{64}\\b\\s+(\\S+)$"
    
    enhancement security 
    opened by suzuki-shunsuke 0
  • breaking changes for v2

    breaking changes for v2

    • https://github.com/aquaproj/aqua/issues/1408
    • https://github.com/aquaproj/aqua/issues/1409
    • https://github.com/aquaproj/aqua/issues/1411
    • ~https://github.com/aquaproj/aqua/issues/1412~
    • https://github.com/aquaproj/aqua/issues/1410
    • https://github.com/aquaproj/aqua/issues/1404
    breaking change 
    opened by suzuki-shunsuke 2
  • Remove `supported_if`

    Remove `supported_if`

    What is changed

    Remove supported_if.

    Why this change is needed

    From aqua v1.12.0 or later, we strongly recommend supported_envs instead of supported_if. supported_envs is simpler than supported_if, and better in terms of the performance.

    breaking change 
    opened by suzuki-shunsuke 0
  • When AQUA_CONFIG or -c option is set, aqua shouldn't search configuration files

    When AQUA_CONFIG or -c option is set, aqua shouldn't search configuration files

    https://aquaproj.github.io/docs/reference/config#configuration-file-path

    What is changed

    When AQUA_CONFIG or -c option is set, aqua shouldn't search configuration files.

    Why this change is needed

    When we specify the configuration file path explicitly, we would like to use the configuration file and shouldn't use other configuration files. The current behaviour is a bit confusing and causes unneeded package installation.

    breaking change 
    opened by suzuki-shunsuke 0
Releases(v1.29.0)
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
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
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
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 13 Dec 14, 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 5 Dec 10, 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 Oct 22, 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 Sep 29, 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
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 29, 2022
The next version of the GitGud CLI

GitGud CLI This repository is cross-platform CLI (Command Line Interface) for th

Helton Reis 1 Jan 4, 2022