Executable

Last updated on November 9, 2026

You can execute shell commands and binaries by specifying a command.

main:
  - name: Flash Firmware
    executable: 
      command: "esptool write_flash 0x0 firmware.bin"

TofuPilot runs commands through sh on Unix/Linux/macOS or powershell on Windows by default.

Shell

You can specify which shell interprets your command.

main:
  - name: Check System
    executable:
      command: "uname -a"
      shell: bash

  - name: Get Windows Info
    executable:
      command: "Get-ComputerInfo"
      shell: powershell

  - name: Legacy Windows Command
    executable:
      command: "dir C:\\"
      shell: cmd

TofuPilot supports bash, sh, zsh, powershell, pwsh (PowerShell Core), and cmd.

Working Directory

You can set the working_directory where your command is executed.

main:
  - name: Build Project
    executable:
      command: "make build"
      working_directory: "./home/user/firmware"

  - name: Run Tests
    executable:
      command: "pytest tests/"
      working_directory: "subproject"

TofuPilot resolves relative paths from the project root. If not specified, commands execute from the project root by default. In a sequence file, both are that file's folder.

Exit Codes

TofuPilot marks the phase as PASS when the exit code is 0, and FAIL for any non-zero exit code.

How is this guide?

On this page