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

# toolshed run

> Execute a TypeScript script in the Toolshed sandbox.

<Snippet file="partial-warning.mdx" />

## Usage

```bash theme={null}
toolshed run <script>
```

| Argument | Description                             |
| -------- | --------------------------------------- |
| `script` | TypeScript code or path to a `.ts` file |

## Environment variables

| Variable               | Default                 | Description                           |
| ---------------------- | ----------------------- | ------------------------------------- |
| `TOOLSHED_SERVER`      | `http://localhost:3000` | Toolshed API server URL               |
| `TOOLSHED_RUNTIME`     | `local`                 | Runtime backend (`local` or `vercel`) |
| `VERCEL_TEAM_ID`       | --                      | Required for Vercel runtime           |
| `VERCEL_PROJECT_ID`    | --                      | Required for Vercel runtime           |
| `VERCEL_TOKEN`         | --                      | Required for Vercel runtime           |
| `TOOLSHED_SNAPSHOT_ID` | --                      | Optional Vercel snapshot ID           |

## What works

* Creates a runtime (local or Vercel) based on `TOOLSHED_RUNTIME`
* Executes the provided script string
* Prints the `ExecutionResult` as JSON

## What's not yet wired up

* Loading config from `~/.toolshed/config.json`
* Fetching role and tool catalog from the server
* Wiring invoke callbacks to the server's token vending endpoint
* Audit logging
