moon bin command queries the binary/executable path for a specific toolchain managed by moon. This command wraps the underlying proto bin command and is useful for finding where toolchain binaries are installed.
Arguments
<toolchain>
The toolchain must be configured in your workspace’s toolchains.yml or toolchain.yml file.
How it works
The command:- Queries the configured toolchain from your workspace configuration
- Delegates to the underlying
proto bincommand - Returns the absolute path to the toolchain’s binary/executable
- Outputs the path to stdout in quiet mode
- Shell scripts that need to reference toolchain binaries
- CI/CD pipelines requiring explicit binary paths
- Debugging toolchain installation issues
- Integration with other tools that need toolchain paths
Examples
Get Node.js binary path
Get Rust binary path
Use in shell scripts
Check Bun installation
Exit codes
The command returns:0- Successfully retrieved the binary path1or higher - Failed to retrieve the path (toolchain not found or not installed)