Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Getting Started

Basic Usage

Format a file (in-place):

qasmfmt input.qasm

Format multiple files:

qasmfmt *.qasm

Format from stdin:

cat input.qasm | qasmfmt

Check Mode

Check if files are already formatted (useful for CI):

qasmfmt --check input.qasm

Exit codes:

  • 0: File is formatted
  • 1: File needs formatting
  • 2: Error (parse error, file not found, etc.)

Show Diff

Preview changes without modifying files:

qasmfmt --diff input.qasm