---
title: "Commands"
description: "A command belongs to its sandbox, not to the request that started it: it has an id, runs on when the caller goes away, and its output can be read from any position. `run` starts one and waits for the result; `exec` starts one and returns its handle."
---

> Documentation Index
> Fetch the complete documentation index at: https://glac.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Glac API › Sandboxes

A command belongs to its sandbox, not to the request that started it: it has an id, runs on when the caller goes away, and its output can be read from any position. `run` starts one and waits for the result; `exec` starts one and returns its handle.

## Operations

- [Run a command and wait for its result](/docs/api/sandboxes/run-command/)
- [List a sandbox's commands](/docs/api/sandboxes/list-commands/)
- [Start a command and return at once](/docs/api/sandboxes/start-command/)
- [How a command stands, with the end of its output](/docs/api/sandboxes/get-command/)
- [Follow a command's output](/docs/api/sandboxes/stream-command-output/)
- [Send input to a command](/docs/api/sandboxes/write-command-stdin/)
- [Send a command a signal](/docs/api/sandboxes/signal-command/)
- [Join a command's terminal (WebSocket)](/docs/api/sandboxes/open-terminal/)


Source: https://glac.ai/docs/api/tags/commands/index.md
