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

# exec

> Run a script with the Base44 SDK pre-authenticated

Run a TypeScript or JavaScript script with the Base44 SDK pre-authenticated as the current user. The SDK is available as a global `base44` variable. Scripts are executed locally using Deno.

For a full walkthrough, use cases, and prerequisites, see the [Standalone scripts](/developers/backend/overview/run-scripts) guide.

## Usage

Pipe a script file to exec:

```bash theme={null}
cat ./script.ts | base44 exec
```

Or pass inline code:

```bash theme={null}
echo "console.log(await base44.entities.Tasks.list())" | base44 exec
```

## See also

* [Standalone scripts](/developers/backend/overview/run-scripts): Full guide with use cases and prerequisites
