# faros sandbox exec

Run a command in the component and exit with its exit code

Source: https://faros.sh/docs/reference/cli/commands/sandbox-exec/

<!-- Generated by scripts/sync-cli-docs.py from faroshq/faros docs/cli. Do not edit by hand; run `make sync-cli-docs`. -->

## Synopsis

Run argv (no shell) against the component's last authoritative sync, print its
stdout and stderr, and exit with its exit code. Run 'faros sandbox sync' first
(for an App Studio \<project>-dev instance, 'faros app sync \<project>').
The command gets PORT (the component's dev server port, so it can reach the
running app) and FAROS_COMPONENT, but not the app's own environment or
secrets (DATABASE_URL and the like).

```bash
faros sandbox exec <instance> <component> -- <argv...> [flags]
```

## Options

```text
  -h, --help               help for exec
      --timeout duration   Command timeout (at most 120s) (default 2m0s)
      --workdir string     Working directory relative to the component workspace
```

## Inherited options

```text
      --insecure-skip-tls-verify   Skip TLS certificate verification when talking to the hub
      --kubeconfig string          Path to the kubeconfig file (default: $KUBECONFIG, then ~/.kube/config)
      --org string                 Organization display name or UUID (default: the org that owns the kubeconfig's workspace)
      --workspace string           Workspace display name or UUID (default: the workspace the kubeconfig points at)
```

## See also

- [faros sandbox](https://faros.sh/docs/reference/cli/commands/sandbox/) — Drive a development-mode instance: sync, exec, logs, restart, status
