Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mux-sidebar-t7ry.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The following environment variables are available in all agent bash tool executions, including init hooks.

Available Variables

VariableDescription
MUX_PROJECT_PATHAbsolute path to the project root on the local machine. Always refers to your local project path, even on SSH workspaces.
MUX_RUNTIMERuntime type: "local", "worktree", "ssh", or "docker"
MUX_WORKSPACE_NAMEName of the workspace (typically the branch name)
MUX_MODEL_STRINGModel identifier (e.g., "anthropic:claude-sonnet-4-20250514")
MUX_THINKING_LEVELReasoning level: "off", "low", "medium", "high", or "xhigh"
MUX_COSTS_USDCumulative session costs in USD, formatted to 2 decimal places (e.g., "1.23")

Usage Example

#!/usr/bin/env bash

echo "Project: $MUX_PROJECT_PATH"
echo "Runtime: $MUX_RUNTIME"
echo "Workspace: $MUX_WORKSPACE_NAME"
echo "Model: $MUX_MODEL_STRING"
echo "Thinking: $MUX_THINKING_LEVEL"
echo "Costs: \$${MUX_COSTS_USD:-0.00}"

# Runtime-specific behavior
if [ "$MUX_RUNTIME" = "ssh" ]; then
  echo "Running on SSH remote"
elif [ "$MUX_RUNTIME" = "docker" ]; then
  echo "Running in Docker container"
else
  echo "Running locally"
fi

Use Cases

  • PR footers: Include model and cost information in automated PR descriptions
  • Conditional logic: Adapt scripts based on runtime environment
  • Logging: Track which model and settings were used for a task
  • Cost monitoring: Check cumulative costs before expensive operations