Aqua CLI Configuration Options: A Complete Guide to Global and Command-Specific Flags
Aqua CLI configuration options include global flags like --config, --log-level, and security verification toggles, plus command-specific options for init, install, generate, update, and other subcommands.
The aqua CLI from the aquaproj/aqua repository uses a dual-layer configuration system. Global flags control universal behaviors such as logging and security verification, while command-specific options fine-tune individual operations like package installation and registry generation. Understanding these aqua CLI configuration options allows you to customize the tool's behavior for both local development and CI/CD pipelines.
Global Configuration Options
Global flags apply to every subcommand in the aqua CLI. These options are defined in website/docs/reference/usage.md and wired through cmd/aqua/main.go.
--config <string> or -c <string> overrides the default search algorithm to specify a custom path to aqua.yaml.
--log-level <string> controls verbosity, accepting values like debug, info, or error.
Security verification toggles allow you to disable specific attestation checks:
--disable-cosignturns off Cosign signature verification--disable-slsadisables SLSA provenance verification--disable-github-artifact-attestationskips GitHub Artifact Attestation verification--disable-github-immutable-releasebypasses immutable GitHub Release attestation checks
Debugging flags include --trace <string> to write execution traces to a file and --cpu-profile <string> to generate pprof-compatible CPU profiles.
Standard help and version flags (-h, --help, -v, --version) are also available globally.
Command-Specific Configuration Options
Each subcommand registers its own flags in the pkg/cli/ directory (e.g., init.go, install.go, update.go). These options refine behavior for specific workflows.
aqua init Options
When bootstrapping a new configuration, the init command supports:
--use-import-diror-ucreatesaqua.yamlusing animport_dirstructure instead of a flatpackages:list--import-dir <string>or-i <string>specifies the target directory for imports--create-diror-dcreates anaqua/subdirectory and places the configuration ataqua/aqua.yaml
aqua install Options
The install command (aliased as i) provides filtering and linking controls:
--only-linkor-lcreates symlinks only, skipping binary downloads--allor-ainstalls packages from both local and global configurations--tags <string>or-t <string>filters installation to packages matching specific tags--exclude-tags <string>omits packages with the specified tags
aqua generate Options
The generate command (aliased as g) configures how package entries are created:
-f <string>reads package lists from a file (use-for stdin)-iinserts generated packages directly into the configuration file--pinpins versions to prevent Renovate from upgrading them automatically-gtargets the globalaqua.yamlinstead of the nearest local file--detailor-dincludes description and link fields in the output-o <string>writes output to a specific file instead of stdout--select-versionor-slaunches an interactive version selector, with--limitor-l <int>controlling the number of displayed versions (default 30)
aqua update Options
The update command (aliased as up) manages version and registry refreshes:
-iopens a fuzzy finder to select specific packages for updating--select-versionor-senables interactive version selection--only-registryor-rupdates only registry definitions--only-packageor-pupdates only package versions--limit <int>or-l <int>limits displayed versions when using-s--tags <string>or-t <string>and--exclude-tags <string>filter the update set by tags
Other Command Options
aqua which supports --version or -v to display the resolved package version instead of the file path.
aqua remove (aliased as rm) accepts:
--allor-ato uninstall all packages--mode <string>or-m <string>with valuesl(links),p(packages), orpl(both) to control deletion scope-ito use a fuzzy finder for package selection
aqua vacuum cleans unused packages:
--initinitializes timestamp files for all configured packages--days <int>or-d <int>sets the expiration threshold (default 60 days)
aqua cp copies executables:
-o <string>specifies the destination directory (defaultdist)--allor-aincludes global configuration packages--tagsand--exclude-tagsfilter which packages to copy
aqua generate-registry (aliased as gr) supports:
--out-testdata <string>for writing test data files--cmd <string>for comma-separated command lists--limit <int>or-l <int>for maximum releases to fetch--initto write a new configuration file instead of stdout output
aqua token provides set and remove subcommands for GitHub token management in the OS keyring.
aqua policy manages policy files through allow, deny, and init subcommands.
Source Code Implementation
The aqua CLI configuration options are implemented across several key files in the aquaproj/aqua repository:
website/docs/reference/usage.mdserves as the central markdown defining CLI help text for both global and command optionscmd/aqua/main.goimplements the urfave/cli command tree where flags are wired to handlerspkg/cli/contains individual command implementations (e.g.,init.go,install.go,update.go) that register specific flagspkg/config/reader.gohandles reading the configuration file referenced by--configpkg/policy/manages thepolicysubcommands (allow,deny,init)
Practical Configuration Examples
Show global help and available commands:
aqua --help
Use a custom configuration file with debug logging:
aqua -c ./my-aqua.yaml --log-level debug list -a
Initialize a new project with import directory support:
aqua init -u -i imports
Install only CI-tagged packages:
aqua i -t ci
Generate a pinned package entry for GitHub CLI:
aqua g cli/cli --pin > aqua.yaml
Update only registry definitions without touching package versions:
aqua update -r
Remove only symlinks while preserving cached binaries:
aqua rm -m l gh
Vacuum packages unused for 90 days:
AQUA_VACUUM_DAYS=90 aqua vacuum
Generate a registry configuration for a specific tool:
aqua gr -o tfcmt.yaml suzuki-shunsuke/tfcmt
Summary
- Global flags like
--config,--log-level, and security toggles (--disable-cosign,--disable-slsa) apply to all aqua CLI operations - Command-specific options allow fine-grained control over
init,install,generate,update, and maintenance commands likevacuumandremove - Configuration discovery follows a default search algorithm unless overridden by
-c, with global configuration accessible via-gon relevant commands - Security verification can be selectively disabled via global flags, though this reduces supply-chain security guarantees
- Source files defining these options include
website/docs/reference/usage.mdfor documentation andcmd/aqua/main.gocombined withpkg/cli/*.gofor implementation
Frequently Asked Questions
How do I specify a custom configuration file path for aqua commands?
Use the global --config or -c flag followed by the file path. For example: aqua -c ./configs/aqua.yaml install. This overrides the default search algorithm that looks for aqua.yaml in the current directory and parent directories.
What is the difference between the --tags and --exclude-tags flags in aqua install?
The --tags or -t flag filters the installation to include only packages matching the specified tags, while --exclude-tags omits packages that have the specified tag. These flags are available in install, update, and cp commands to control which subset of your defined packages get processed.
How can I disable signature verification when installing packages with aqua?
Pass the global --disable-cosign flag to skip Cosign signature verification, --disable-slsa to skip SLSA provenance verification, or --disable-github-artifact-attestation to skip GitHub Artifact Attestation checks. These flags are defined in the global options section of website/docs/reference/usage.md and processed before any package download begins.
Where does aqua store its configuration when using the -g flag?
The -g or --global flag targets the global aqua.yaml file, typically located in the aqua root directory (often ~/.local/share/aquaproj-aqua/ or the directory specified by the AQUA_ROOT_DIR environment variable). This differs from the default behavior which searches for the nearest local aqua.yaml in the current directory tree.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →