stty
Inspect or modify terminal device settings like baud rate, line discipline, and control characters. Returns JSON with configuration to check terminal state before dependent operations.
Instructions
Inspect or modify terminal device settings (baud rate, line discipline, control characters). Can change terminal behavior if --allow_change is enabled; defaults to read-only inspection. Returns JSON with terminal configuration. Use to query terminal state before operations that depend on it. Not for simple TTY detection — use 'tty' to check if stdin is a terminal. See also 'tty'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | Write a compact status line without a JSON envelope. | |
| device | No | Terminal device to inspect or change. | |
| dry_run | No | Report planned settings without changing the terminal. | |
| settings | No | Settings such as raw, sane, echo, or -echo. | |
| allow_change | No | Allow applying supported terminal changes. |