Skip to content

current-sha

get current-sha - Get current commit SHA with auto-detection

Returns the current commit SHA using smart detection.

Detection order: 1. --sha flag (explicit override) 2. GITHUB_SHA environment variable (GitHub Actions CI) 3. origin/main HEAD after fetch (local devbox)

Output formats: default: Just the SHA --format shell: SHA="..." SOURCE="ci|devbox|explicit"

Flags

Flag Description
--sha Override with explicit SHA
--format Output format (default, shell)

Examples

get current-sha                    # Auto-detect
get current-sha --sha abc123       # Explicit
get current-sha --format shell     # For eval

See Also


Tutorials | How-to Guides | Explanation | Reference

You are here: Reference — information-oriented technical descriptions of the system.