Base44: `exec` Command for Running Pre-Authenticated Scripts

Base44

Base44 introduced the exec CLI command, enabling developers to run standalone TypeScript or JavaScript scripts with the Base44 SDK pre-authenticated and available as a global base44 variable. Scripts execute locally via the Deno runtime, giving developers full access to entities, backend functions, and integrations without managing authentication tokens. The exec command is designed for data operations, debugging, CI pipelines, and one-off AI tasks β€” bridging the gap between the live application backend and a developer's local terminal.

Sources & Mentions

1 external resource covering this update


Overview

Base44 introduced the exec command as part of its CLI (v0.0.47, released March 18, 2026), adding a powerful new capability for developers who need to run scripts against their live Base44 applications without leaving the terminal.

The command pipes TypeScript or JavaScript directly to the CLI, which then executes the script locally using the Deno runtime β€” with the Base44 SDK already authenticated and available as a global base44 variable. No manual token management, no boilerplate imports: the script starts with immediate access to the application's full data layer and backend capabilities.

How It Works

Using exec requires Deno to be installed locally. Once that prerequisite is met, developers can pipe scripts directly to the CLI in two ways:

From a file:

cat ./list-tasks.ts | base44 exec

As an inline command:

echo "console.log(await base44.entities.Tasks.list())" | base44 exec

The global base44 variable exposes the complete SDK surface β€” entities, backend functions, and integrations β€” running with the authenticated user's permissions rather than elevated service-role credentials. This makes scripts safe by default: they operate exactly as the developer's account would, with the same access boundaries.

Use Cases

The exec command covers a wide range of developer workflows that previously required custom tooling or workarounds:

  • Data operations: Bulk reshaping, backfilling, or transforming entity records across the entire dataset
  • Development setup: Populating an application with realistic sample or seed data
  • Debugging: Running terminal-based queries to inspect live application state without opening the web UI
  • AI operations: Executing one-off tasks such as data summarization or content generation at scale
  • Testing: Invoking backend functions with real production data to verify behavior
  • CI/CD maintenance: Running scripts as part of automated pipelines or scheduled jobs

Why This Matters

Before exec, developers who needed to perform bulk data operations or run diagnostic queries against their Base44 backend had to either build a temporary UI for those tasks or write dedicated backend functions. The exec command eliminates that friction entirely β€” a script that would otherwise require deploying a function can now be written inline, run once, and discarded.

The choice of Deno as the runtime is notable: it provides native TypeScript execution, a secure sandbox by default, and no need for a node_modules setup, which aligns with Base44's philosophy of minimal configuration overhead.


Mentioned onGitHub