# Terminal Command

Terminal commands can be used to execute applications or call [X-Callback-URL](/inbox-ai/integrations/x-callback-url.md)'s on your Mac or through SSH (on a remote machine or your own Mac to circumvent the security sandbox).&#x20;

<figure><img src="/files/xYgbsr6U0JlizwAhFxy8" alt=""><figcaption><p>An example Terminal Command</p></figcaption></figure>

The example above calls the `open` command, with some [Action Variables](/inbox-ai/actions/action-variables.md). For more information on how actions work in general, check the [Actions](/inbox-ai/actions.md) page.

## Security Sandbox

{% hint style="danger" %}
In general any here-doc (`<<<`) or piping (`|`) might cause issues with the security sandbox. See below for more information of circumventing these limitations.
{% endhint %}

Most terminal commands will work without a problem, but if you want to write or read information from a file, you will need to allow Inbox AI access to the directory (or the directory above it). To do this, go to "Advanced", and select the sandbox folder.

<figure><img src="/files/nzMTP2BCBWXOJeyNvOUD" alt=""><figcaption><p>Set the Terminal Command Sandbox</p></figcaption></figure>

You have access to some useful [Templating](/inbox-ai/templating.md) options like `{{ run.id }}` and `{{ dir.tmp }}` for advanced use cases.

Note a powerful use case for terminal commands is running [AppleScript](/inbox-ai/integrations/applescript.md).

### Circumventing the Sandbox

{% hint style="danger" %}
Circumventing the sandbox opens you up to more risk as the AI can access deeper features on your computer. As a general note, we recommend against given the AI full access to your terminal by giving it blanket access to your terminal, but if you want, you can. Rather, make multiple more confined commands.
{% endhint %}

Porting your terminal commands through SSH will circumvent the sandbox. Enable the SSH option, fill in your machine's username/password and hostname (localhost for your own machine). Make sure you have enabled "remote login" under system settings on your mac.

<figure><img src="/files/NgmWsymrfR61Gxi8ZNPC" alt=""><figcaption><p>In System Settings, under Sharing, Enable Remote Login.</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dreetje-1.gitbook.io/inbox-ai/actions/custom-actions/terminal-command.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
