# tmuxp.cli.shell.command_shell

- **Module:** tmuxp.cli.shell
- **Package:** tmuxp
- **Language:** Python
- **Kind:** function
- **Source:** https://github.com/tmux-python/tmuxp/blob/153acdf6ff1268b14d3d03ed488f545a7123c8f1/src/tmuxp/cli/shell.py#L175
- **Page:** https://libtmux.org/en/py/stable/workspace/reference/tmuxp-cli-shell-command_shell/

```
tmuxp.cli.shell.command_shell(
    args: CLIShellNamespace,
    parser: argparse.ArgumentParser | None = None,
) -> None
```

Entrypoint for ``tmuxp shell`` for tmux server, session, window and pane.

Priority given to loaded session/window/pane objects:

- session_name and window_name arguments
- current shell: envvar ``TMUX_PANE`` for determining window and session
- :attr:`libtmux.Server.attached_sessions`, :attr:`libtmux.Session.active_window`,
  :attr:`libtmux.Window.active_pane`

## Parameters

- `args` (`CLIShellNamespace`)
- `parser` (`argparse.ArgumentParser | None`)
