Skip to main content
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 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 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.
1

Write a script

Create a script file that uses the base44 global variable. No imports or setup are needed. For example:
// 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})`);
}
2

Run it

Run the script from your project directory:
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.
For quick one-liners, pipe inline code directly:
echo "console.log(await base44.entities.Task.list())" | base44 exec

See also

  • exec: Full command reference
  • Backend functions: Write serverless functions that run on Base44’s infrastructure
  • JavaScript SDK: SDK reference for entities, auth, functions, and integrations