> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itential.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server.

# Run an executable service

> Execute an executable service using the iagctl CLI, with or without runtime arguments.

After you create an executable service, you can run it to execute your script or application. You can also pass runtime arguments to customize each execution.

## Run an executable service

Use the `iagctl run service` executable command to execute an executable service.

**Syntax:**

```bash
iagctl run service executable <service-name>
```

**Example:**

```bash
iagctl run service executable simple-executable
```

This command executes the service using the configuration you defined when you created it.

## Run an executable service with arguments

You can pass runtime arguments to your script when you run the service. Itential Gateway formats these arguments according to the `--arg-format` you specified when you created the service.

**Syntax:**

```bash
iagctl run service executable <service-name> \
  --set key1=value1 \
  --set key2=value2
```

**Example:**

```bash
iagctl run service executable simple-executable \
  --set environment=production \
  --set region=us-east
```

If you configured the service with `--arg-format "{{.Key}} {{.Value}}"`, Gateway passes these arguments to your script as:

```text
environment production region us-east
```

If you configured the service with `--arg-format "{{.Key}}={{.Value}}"`, Gateway passes these arguments to your script as:

```text
environment=production region=us-east
```