CLI Reference
The cuenv CLI provides tools for managing environments, executing tasks, and integrating with your shell.
Global Options
Section titled “Global Options”| Option | Description | Default |
|---|---|---|
--level, -l | Set logging level (trace, debug, info, warn, error) | warn |
--json | Emit JSON envelope regardless of format | false |
Commands
Section titled “Commands”cuenv version
Section titled “cuenv version”Show version information.
cuenv version [OPTIONS]Options:
--output-format <FORMAT>: Output format (simple, json, env). Default: simple.
cuenv env
Section titled “cuenv env”Environment variable operations.
cuenv env print
Section titled “cuenv env print”Print environment variables from CUE package.
cuenv env print [OPTIONS]Options:
-p, --path <PATH>: Path to directory containing CUE files. Default:.--package <PACKAGE>: Name of the CUE package to evaluate. Default:cuenv--output-format <FORMAT>: Output format (env, json, simple). Default:env
cuenv env load
Section titled “cuenv env load”Load environment and execute hooks in background.
cuenv env load [OPTIONS]Options:
-p, --path <PATH>: Path to directory containing CUE files. Default:.--package <PACKAGE>: Name of the CUE package to evaluate. Default:cuenv
cuenv env check
Section titled “cuenv env check”Check hook status and output environment for shell.
cuenv env check [OPTIONS]Options:
-p, --path <PATH>: Path to directory containing CUE files. Default:.--package <PACKAGE>: Name of the CUE package to evaluate. Default:cuenv--shell <SHELL>: Shell type for export format (bash, zsh, fish). Default:bash
cuenv task
Section titled “cuenv task”Execute a task defined in CUE configuration.
cuenv task [NAME] [OPTIONS]Arguments:
[NAME]: Name of the task to execute. If not provided, lists available tasks.
Options:
-p, --path <PATH>: Path to directory containing CUE files. Default:.--package <PACKAGE>: Name of the CUE package to evaluate. Default:cuenv-e, --env <ENVIRONMENT>: Apply environment-specific overrides (e.g., development, production).--materialize-outputs <DIR>: Materialize cached outputs to this directory on cache hit.--show-cache-path: Print the cache path for this task key.
cuenv exec
Section titled “cuenv exec”Execute a command with CUE environment variables.
cuenv exec [OPTIONS] -- <COMMAND> [ARGS]...Options:
-p, --path <PATH>: Path to directory containing CUE files. Default:.--package <PACKAGE>: Name of the CUE package to evaluate. Default:cuenv-e, --env <ENVIRONMENT>: Apply environment-specific overrides.
cuenv shell
Section titled “cuenv shell”Shell integration commands.
cuenv shell init
Section titled “cuenv shell init”Generate shell integration script.
cuenv shell init <SHELL>Arguments:
<SHELL>: Shell type (fish, bash, zsh).
cuenv env status
Section titled “cuenv env status”Show hook execution status.
cuenv env status [OPTIONS]Options:
-p, --path <PATH>: Path to directory containing CUE files. Default:.--package <PACKAGE>: Name of the CUE package to evaluate. Default:cuenv--wait: Wait for hooks to complete before returning.--timeout <SECONDS>: Timeout in seconds for waiting. Default:300--output-format <FORMAT>: Output format (text, short, starship). Default:text
cuenv env inspect
Section titled “cuenv env inspect”Inspect cached hook state for the current config.
cuenv env inspect [OPTIONS]Options:
-p, --path <PATH>: Path to directory containing CUE files. Default:.--package <PACKAGE>: Name of the CUE package to evaluate. Default:cuenv
cuenv ci
Section titled “cuenv ci”Run CI pipelines defined in your CUE configuration.
cuenv ci [OPTIONS]Options:
--dry-run: Show what would be executed without running it.--pipeline <NAME>: Force a specific pipeline to run.--generate <PROVIDER>: Generate CI workflow file (currently onlygithubis supported).
Example:
# Run CI pipelinecuenv ci
# See what would run without executingcuenv ci --dry-run
# Generate GitHub Actions workflowcuenv ci --generate githubSecurity Commands
Section titled “Security Commands”cuenv allow
Section titled “cuenv allow”Approve configuration for hook execution.
cuenv allow [OPTIONS]Options:
-p, --path <PATH>: Path to directory containing CUE files. Default:.--package <PACKAGE>: Name of the CUE package to evaluate. Default:cuenv--note <NOTE>: Optional note about this approval.-y, --yes: Approve without prompting.
cuenv deny
Section titled “cuenv deny”Revoke approval for hook execution.
cuenv deny [OPTIONS]Options:
-p, --path <PATH>: Path to directory containing CUE files. Default:.--package <PACKAGE>: Name of the CUE package to evaluate. Default:cuenv--all: Revoke all approvals for this directory.