> ## 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.

# Standalone scripts

> Run standalone scripts against your app

You can run standalone scripts that interact with your Base44 app using the `base44 exec` command.

Standalone scripts:

* Require no setup or token management. A pre-authenticated SDK client is available as a global `base44` variable.
* Execute locally using [Deno](https://docs.deno.com/runtime/) and run against the deployed app linked to your current project directory.
* Have full access to your app's entities, functions, and integrations through the SDK.
* Run with your user's permissions, not service-role access.

## Prerequisites

You need to install [Deno](https://docs.deno.com/runtime/getting_started/installation/) to run scripts with exec.

## Use cases

The `exec` command gives you direct access to the full SDK from standalone scripts. Common use cases include:

* **Data migrations:** Reshape, backfill, or transform entity records in bulk.
* **Seed scripts:** Populate your app with sample data for development or staging.
* **Ad-hoc queries:** Quickly inspect or debug your app's data from the terminal.
* **AI and LLM tasks:** Run one-off AI operations like summarizing data, generating content, or enriching records.
* **Function testing:** Invoke backend functions with real data to test them outside the app.
* **Automation:** Run scripts in CI pipelines or scheduled jobs to perform maintenance tasks.

## Get started

To get started, create a script file and pipe it to exec.

<Steps>
  <Step title="Write a script">
    Create a script file that uses the `base44` global variable. No imports or setup are needed. For example:

    ```typescript theme={null}
    // list-tasks.ts
    const tasks = await base44.entities.Task.list();
    console.log(`Found ${tasks.length} tasks:`);
    for (const task of tasks) {
      console.log(`  - ${task.title} (${task.status})`);
    }
    ```
  </Step>

  <Step title="Run it">
    Run the script from your project directory:

    ```bash theme={null}
    cat ./list-tasks.ts | base44 exec
    ```

    The CLI authenticates as your current user, starts a Deno process, and runs your script with the `base44` SDK client ready to use.

    <Tip>
      For quick one-liners, pipe inline code directly:

      ```bash theme={null}
      echo "console.log(await base44.entities.Task.list())" | base44 exec
      ```
    </Tip>
  </Step>
</Steps>

## See also

* [`exec`](/developers/references/cli/commands/exec): Full command reference
* [Backend functions](/developers/backend/resources/backend-functions/overview): Write serverless functions that run on Base44's infrastructure
* [JavaScript SDK](/developers/references/sdk/getting-started/overview): SDK reference for entities, auth, functions, and integrations
