# Koshi 0.6.0 — Tab commands (/docs/v0.6/cli/tabs)



`--tab` and `--session` take a generated name or a printed id. A value that
reads as an id is used as an id and never looked up as a name.

<Callout>
  These verbs take `--remote <SERVER>` to act on a session on another machine.
  See [Remote commands](/docs/v0.6/cli/remote).
</Callout>

## `new-tab` [#new-tab]

```bash
koshi new-tab
koshi new-tab --session <NAME_OR_ID>
koshi new-tab --client <CLIENT_ID>
```

Creates one tab with one shell pane. Output contains the tab id first, then the
root pane id. `--client` names the attached terminal that switches to the new
tab. With one terminal attached the flag is optional. With several attached,
name one: `new-tab` without `--client` fails with
`several clients are attached; name the target client`. A session with no
terminal attached refuses `new-tab`.

The first pane starts in the current working directory of the focused pane of
the terminal that switches onto the tab, with the environment the session
process started with plus koshi's own variables.

## `close-tab` [#close-tab]

```bash
koshi close-tab
koshi close-tab --tab <NAME_OR_ID>
koshi close-tab --tab <NAME_OR_ID> --session <NAME_OR_ID> --force
```

Closing a tab closes every pane and process inside it. Closing the last tab
ends the session. `--force` kills every pane's program at once instead of asking
it to stop first.

## Cycle tabs [#cycle-tabs]

```bash
koshi next-tab
koshi previous-tab
koshi next-tab --client <CLIENT_ID>
```

Cycling changes one client's view. `--client` chooses the attached terminal.

## Focus one tab [#focus-one-tab]

```bash
koshi focus-tab --index 0
koshi focus-tab --tab <NAME_OR_ID>
koshi focus-tab --tab <NAME_OR_ID> --client <CLIENT_ID>
```

`--index` is zero-based. Use either `--index` or `--tab`.

## Reorder [#reorder]

```bash
koshi move-tab --index 0
koshi move-tab --tab <NAME_OR_ID> --index 2
```

Moves the chosen tab to a zero-based index without changing its pane layout.
The order belongs to the session, so every attached terminal sees the move.
