Skip to content

CLI Reference

The cuenv CLI provides tools for managing environments, executing tasks, and integrating with your shell.

OptionDescriptionDefault
--level, -lSet logging level (trace, debug, info, warn, error)warn
--jsonEmit JSON envelope regardless of formatfalse

Show version information.

Terminal window
cuenv version [OPTIONS]

Options:

  • --output-format <FORMAT>: Output format (simple, json, env). Default: simple.

Environment variable operations.

Print environment variables from CUE package.

Terminal window
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

Load environment and execute hooks in background.

Terminal window
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

Check hook status and output environment for shell.

Terminal window
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

Execute a task defined in CUE configuration.

Terminal window
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.

Execute a command with CUE environment variables.

Terminal window
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.

Shell integration commands.

Generate shell integration script.

Terminal window
cuenv shell init <SHELL>

Arguments:

  • <SHELL>: Shell type (fish, bash, zsh).

Show hook execution status.

Terminal window
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

Inspect cached hook state for the current config.

Terminal window
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

Run CI pipelines defined in your CUE configuration.

Terminal window
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 only github is supported).

Example:

Terminal window
# Run CI pipeline
cuenv ci
# See what would run without executing
cuenv ci --dry-run
# Generate GitHub Actions workflow
cuenv ci --generate github

Approve configuration for hook execution.

Terminal window
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.

Revoke approval for hook execution.

Terminal window
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.