> ## Documentation Index
> Fetch the complete documentation index at: https://10play-session-status-checl.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Unsafe commands

> Commands that execute arbitrary text or end the session.

<Warning>
  These commands execute arbitrary text or end the session. A typed wrapper
  around `do` is a typed wrapper around "run anything"; treat them as a
  separate, guarded surface.
</Warning>

### cmd.alias

"alias" binds routinely-used command inputs to a new command keyword.

| Parameter | Type     | Default | Description                                          |
| --------- | -------- | ------- | ---------------------------------------------------- |
| `name`    | `string` |         | new keyword                                          |
| `command` | `string` |         | literal input with commands separated by semicolons. |

**See also:** `cmd.extend`, `api`

### cmd.do

"do" makes it possible for python programs to issue simple PyMOL commands as if they were entered on the command line.

| Parameter  | Type | Default | Description |
| ---------- | ---- | ------- | ----------- |
| `commands` |      |         |             |
| `log`      |      | `1`     |             |
| `echo`     |      | `1`     |             |
| `flush`    |      | `0`     |             |

### cmd.extend

"extend" is an API-only function which binds a new external function as a command into the PyMOL scripting language.

| Parameter  | Type | Default | Description |
| ---------- | ---- | ------- | ----------- |
| `name`     |      |         |             |
| `function` |      | `None`  |             |

**See also:** `alias`, `api`

### cmd.new\_command

| Parameter  | Type | Default | Description |
| ---------- | ---- | ------- | ----------- |
| `name`     |      |         |             |
| `function` |      | `None`  |             |

### cmd.quit

"quit" terminates the program.

| Parameter | Type  | Default | Description                                           |
| --------- | ----- | ------- | ----------------------------------------------------- |
| `code`    | `int` | `0`     | exit the application with status "code" \{default: 0} |

### cmd.run

"run" executes an external Python script in a local name space, the main Python namespace, the global PyMOL namespace, or in its own namespace (as a module).

| Parameter   | Type | Default    | Description |
| ----------- | ---- | ---------- | ----------- |
| `filename`  |      |            |             |
| `namespace` |      | `'global'` |             |
| `_spawn`    |      | `0`        |             |

**See also:** `spawn`

### cmd.system

"system" executes a command in a subshell under Unix or Windows.

| Parameter | Type | Default | Description |
| --------- | ---- | ------- | ----------- |
| `command` |      |         |             |
| `async_`  |      | `0`     |             |

**See also:** `ls`, `cd`, `pwd`
