# Import from Teamocil

Source: https://libtmux.org/en/ts/latest/workspace/cli/import-teamocil/

> Translate Teamocil windows and pane commands into a workspace document.

**Workspace Manager concept example** A working example of the core library. It can change without notice.



Import a Teamocil file without starting tmux. Save this source as `teamocil.yaml`:

```yaml title="teamocil.yaml"
session:
  name: imported-team
  windows:
    - name: editor
      layout: even-horizontal
      panes:
        - commands: [printf ready]
        - commands: [printf second]
```

## Preview the translation

```console
$ tmux-workspace import teamocil --json ./teamocil.yaml
```

The translated document preserves window and pane order. Several commands in
one Teamocil [`commands`](<https://libtmux.org/en/ts/latest/workspace/reference/operation_options-applyworkspaceoptions-commands/>) list become one semicolon-separated shell input in that
pane. Review the absolute working directories selected by the import.

## Save the workspace

```console
$ tmux-workspace import teamocil \
    --json \
    --workspace-format yaml \
    --save-to imported-teamocil.yaml \
    ./teamocil.yaml
```

Use `--force` only to replace an existing destination deliberately. Unsupported
fields, such as pane widths and filters, fail before saving. Conversion does
not prove that a command or directory will be available when you
[load](https://libtmux.org/en/ts/latest/workspace/cli/load/) the result.

[CLI source](https://github.com/libtmux/libtmux-ts/blob/f36d692552bb9a373b45338bb5fece854e57cc3d/packages/workspace-cli/README.md).
