---
id: "P:cAlgo.API.Plugin.Commands"
kind: "property"
type: "T:cAlgo.API.Plugin"
url: "https://help.ctrader.com/ctrader-algo/references/General/Plugin/Commands/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# Plugin.Commands

Member of [Plugin](https://help.ctrader.com/ctrader-algo/references/General/Plugin/index.md).

## Commands

Provides access to commands.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Plugins cannot run in the CLI: ctrader-cli runs cBots only.
- Cloud: Plugins cannot run in the cloud: it runs cBots only.

C#:

```csharp
public Commands Commands {get;}
```

Python:

```python
api.Commands: Commands
```

### Returns

`Commands` — 

### Examples

C#:

```csharp
var command = Commands.Add(CommandType.ChartContainerToolbar, args => Print("Command {0} executed", args.Command.Id));
command.ToolTip = "Run my plugin command";
```

Python:

```python
from System import Action
command = api.Commands.Add(CommandType.ChartContainerToolbar, Action[CommandArgs](lambda args: api.Print(f"Command {args.Command.Id} executed")))
command.ToolTip = "Run my plugin command"
```

