# Tape Commands

URL: https://tuios.dev/docs/cli-reference/tape-commands

> Tape Commands: part of the CLI Reference of TUIOS.

This page is one part of `docs/CLI_REFERENCE.md` of the [tuios repository](https://github.com/Gaurav-Gosain/tuios/blob/f32fbfd7faca14e5260a1d711262cb81c49f68a6/docs/CLI_REFERENCE.md). The [CLI Reference](https://tuios.dev/docs/cli-reference) page lists every part.

## Tape Commands

### `tuios tape`&#x20;

Run and manage tape scripts. See [TAPE\_SCRIPTING.md](https://github.com/Gaurav-Gosain/tuios/blob/f32fbfd7faca14e5260a1d711262cb81c49f68a6/docs/TAPE_SCRIPTING.md).

| Command                           | What it does                                                                                                          |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `tuios tape play <file.tape>`     | Run a tape file in interactive mode                                                                                   |
| `tuios tape exec <file.tape>`     | Execute a tape file in a running session                                                                              |
| `tuios tape validate <file.tape>` | Validate a tape file without running it                                                                               |
| `tuios tape list`                 | List all saved tape recordings (`--json` for a script: `dir`, and `tapes` with `name`, `path`, `size` and `modified`) |
| `tuios tape show <name>`          | Display the contents of a tape file                                                                                   |
| `tuios tape delete <name>`        | Delete a tape recording                                                                                               |
| `tuios tape dir`                  | Show the tape recordings directory path                                                                               |

`tape play` takes the interface flags of the root command.

`tape exec` sends the tape to a running session. The session needs an attached
client, which plays the tape. The command returns when the tape ends. It exits
non-zero, with the file and the line, when the tape has an error or a command
fails, such as a `WaitFor` that times out. `--timeout` sets how long it waits.
The default is 30 minutes. For one command, use
[`tuios run-command`](https://tuios.dev/docs/cli-reference/remote-control-commands#tuios-run-command).

```bash
tuios tape play demo.tape
tuios tape exec --session work demo.tape
tuios tape validate demo.tape
```
