Back to Hooks

Non Interactive Env

Prevents shell commands from hanging by injecting environment variables that force non-interactive mode. This is particularly useful for tools like gi...

Non-Interactive Env

Description

Prevents shell commands from hanging by injecting environment variables that force non-interactive mode. This is particularly useful for tools like git or package managers that might otherwise prompt for user input (e.g., pagination, credentials).

Features

  • Env Injection: Prepends export CI=true DEBIAN_FRONTEND=noninteractive ... to commands.
  • Git Specific: Targets git commands specifically to avoid modifying unrelated shell calls.
  • Banned Command Detection: Warns if known interactive-only commands (like vi, nano, less) are attempted.

Trigger Events

  • tool.execute.before: Inspects bash tool calls.

Configuration

Default Variables:

  • CI=true
  • DEBIAN_FRONTEND=noninteractive
  • GIT_TERMINAL_PROMPT=0
  • GCM_INTERACTIVE=never