From 40eb24b35ce49bfa52fd3c6302552bbb5cf25060 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 09:25:51 +0000 Subject: [PATCH] Sync base44-cli skill to v0.1.6 Documents the changes between v0.1.5 and v0.1.6: a shared confirmPush guard (with -y/--yes) added to entities/agents/connectors push, new exec --local/--port/--privileged/--data-env flags, link listing editor-created apps, and base44 dev's new workerd/Miniflare local function runtime. Co-Authored-By: Claude Sonnet 5 --- CLI_VERSION | 2 +- skills/base44-cli/SKILL.md | 20 ++++++------- skills/base44-cli/references/agents-push.md | 21 ++++++++++++- .../base44-cli/references/connectors-push.md | 22 ++++++++++++-- skills/base44-cli/references/dev.md | 4 +++ skills/base44-cli/references/entities-push.md | 21 ++++++++++++- skills/base44-cli/references/exec.md | 30 +++++++++++++++++-- skills/base44-cli/references/link.md | 2 ++ 8 files changed, 105 insertions(+), 17 deletions(-) diff --git a/CLI_VERSION b/CLI_VERSION index 027a383..82942c3 100644 --- a/CLI_VERSION +++ b/CLI_VERSION @@ -1 +1 @@ -v0.1.5 +v0.1.6 diff --git a/skills/base44-cli/SKILL.md b/skills/base44-cli/SKILL.md index 401302b..9eb183d 100644 --- a/skills/base44-cli/SKILL.md +++ b/skills/base44-cli/SKILL.md @@ -4,7 +4,7 @@ description: "The base44 CLI is used for EVERYTHING related to base44 projects: metadata: sourcePackage: name: base44 - version: 0.1.5 + version: 0.1.6 --- # Base44 CLI @@ -487,14 +487,14 @@ Run one-off scripts against your app with the Base44 SDK pre-authenticated. Use ``` Or deploy individual resources: -- `npx base44 entities push` - Push entities only +- `npx base44 entities push -y` - Push entities only - `npx base44 functions deploy` - Deploy functions only - `npx base44 functions delete ` - Delete a deployed function - `npx base44 functions list` - List all deployed functions - `npx base44 functions pull` - Pull deployed functions to local files -- `npx base44 agents push` - Push agents only +- `npx base44 agents push -y` - Push agents only - `npx base44 connectors pull` - Pull connectors from Base44 -- `npx base44 connectors push` - Push connectors only +- `npx base44 connectors push -y` - Push connectors only - `npx base44 auth pull` - Pull auth config from Base44 - `npx base44 auth push` - Push auth config only - `npx base44 site deploy -y` - Deploy site only @@ -546,8 +546,8 @@ This creates `base44/.types/types.d.ts` with typed registries for the `@base44/s ### Deploying Individual Resources ```bash -# Push only entities -npx base44 entities push +# Push only entities (destructive - replaces remote entities, so -y skips the confirmation prompt) +npx base44 entities push -y # Deploy only functions (all) npx base44 functions deploy @@ -556,14 +556,14 @@ npx base44 functions deploy my-function other-function # Deploy and prune removed functions npx base44 functions deploy --force -# Push only agents -npx base44 agents push +# Push only agents (destructive - replaces remote agents, so -y skips the confirmation prompt) +npx base44 agents push -y # Pull connectors from Base44 npx base44 connectors pull -# Push only connectors -npx base44 connectors push +# Push only connectors (destructive - overwrites remote connectors, so -y skips the confirmation prompt) +npx base44 connectors push -y # Deploy only site npx base44 site deploy -y diff --git a/skills/base44-cli/references/agents-push.md b/skills/base44-cli/references/agents-push.md index c2d2a8d..8f711a7 100644 --- a/skills/base44-cli/references/agents-push.md +++ b/skills/base44-cli/references/agents-push.md @@ -5,9 +5,15 @@ Push local AI agent configurations to Base44. Agents are conversational AI assis ## Syntax ```bash -npx base44 agents push +npx base44 agents push [options] ``` +## Options + +| Option | Description | Required | +|--------|-------------|----------| +| `-y, --yes` | Skip the confirmation prompt | No | + ## Authentication **Required**: Yes. If not authenticated, you'll be prompted to login first. @@ -50,6 +56,19 @@ The push operation synchronizes your local agents with Base44: **Warning**: This is a full sync operation. Agents removed locally will be deleted from Base44. +## Confirmation Prompt + +Because push replaces remote agent configs with your local agents (deleting any not present locally), the CLI asks for confirmation before proceeding: + +```bash +$ npx base44 agents push + +This will replace all remote agent configs with your local agents and delete any not present locally. +? Are you sure you want to continue? › (y/N) +``` + +Pass `-y`/`--yes` to skip the prompt. **In non-interactive mode, `--yes` is required** — without it, the command throws instead of hanging on a prompt. + ## Error Handling If no agents are found in your project: diff --git a/skills/base44-cli/references/connectors-push.md b/skills/base44-cli/references/connectors-push.md index 4ea594a..6883fb0 100644 --- a/skills/base44-cli/references/connectors-push.md +++ b/skills/base44-cli/references/connectors-push.md @@ -5,7 +5,7 @@ Push local connector configurations to Base44, synchronizing scopes and handling ## Usage ```bash -npx base44 connectors push [--dir ] +npx base44 connectors push [--dir ] [-y|--yes] ``` ## Options @@ -13,6 +13,20 @@ npx base44 connectors push [--dir ] | Option | Description | Required | |--------|--------------|----------| | `--dir ` | Directory to read connector files from. Only used with `--app-id` (no local project); defaults to `./connectors` | No | +| `-y, --yes` | Skip the confirmation prompt | No | + +## Confirmation Prompt + +Because push overwrites your app's connectors with your local copy (removing any not present locally), the CLI asks for confirmation before proceeding: + +```bash +$ npx base44 connectors push + +This will overwrite your app's connectors with your local copy and remove any not present locally. +? Are you sure you want to continue? › (y/N) +``` + +Pass `-y`/`--yes` to skip the prompt. **In non-interactive mode, `--yes` is required** — without it, the command throws instead of hanging on a prompt (this check runs before the OAuth flow, which is skipped separately in non-interactive mode — see below). ## Projectless Mode @@ -110,7 +124,11 @@ Summary: ## CI/CD Environments -In non-interactive environments (no TTY, such as CI/CD pipelines), the OAuth flow is skipped automatically: +In non-interactive environments (no TTY, such as CI/CD pipelines), you must pass `-y`/`--yes` or the push confirmation throws. The OAuth flow is skipped automatically: + +```bash +npx base44 connectors push --yes +``` ``` Skipped OAuth in non-interactive mode. Run 'base44 connectors push' locally or open the links above to authorize. diff --git a/skills/base44-cli/references/dev.md b/skills/base44-cli/references/dev.md index 6549d5a..ea9e15f 100644 --- a/skills/base44-cli/references/dev.md +++ b/skills/base44-cli/references/dev.md @@ -64,6 +64,10 @@ npx base44 dev npx base44 dev --port 4500 ``` +## Local Function Runtime + +Backend functions run locally against **workerd** (via Miniflare) by default — the same runtime Base44 uses in production, so `base44:runtime` APIs (`secrets`, `waitUntil`) behave the same locally as when deployed. It falls back to a Deno subprocess when workerd can't be loaded (e.g. the standalone binary distribution, which can't embed workerd's native executable) or when forced with `B44_DEV_FUNCTIONS_RUNTIME=deno`. + ## Notes - Use this from a linked local project, not with `--app-id` diff --git a/skills/base44-cli/references/entities-push.md b/skills/base44-cli/references/entities-push.md index 63b92d7..e9090d9 100644 --- a/skills/base44-cli/references/entities-push.md +++ b/skills/base44-cli/references/entities-push.md @@ -5,9 +5,15 @@ Push local entity definitions to Base44. ## Syntax ```bash -npx base44 entities push +npx base44 entities push [options] ``` +## Options + +| Option | Description | Required | +|--------|-------------|----------| +| `-y, --yes` | Skip the confirmation prompt | No | + ## Authentication **Required**: Yes. If not authenticated, you'll be prompted to login first. @@ -48,6 +54,19 @@ The push operation synchronizes your local entity schema with Base44: - **Updated**: Existing entities with modified schema or configuration - **Deleted**: Entities that were removed from your local configuration +## Confirmation Prompt + +Since push replaces remote entities with your local copy (deleting any not present locally), the CLI asks for confirmation before proceeding: + +```bash +$ npx base44 entities push + +This will overwrite your app's entities with your local copy and delete any not present locally. +? Are you sure you want to continue? › (y/N) +``` + +Pass `-y`/`--yes` to skip the prompt. **In non-interactive mode, `--yes` is required** — without it, the command throws instead of hanging on a prompt. + ## Error Handling If no entities are found in your project: diff --git a/skills/base44-cli/references/exec.md b/skills/base44-cli/references/exec.md index 86d240c..1cfdab0 100644 --- a/skills/base44-cli/references/exec.md +++ b/skills/base44-cli/references/exec.md @@ -5,14 +5,25 @@ Run a script with the Base44 SDK pre-authenticated as the current user. Reads th ## Syntax ```bash -cat ./script.ts | npx base44 exec -echo "" | npx base44 exec +cat ./script.ts | npx base44 exec [options] +echo "" | npx base44 exec [options] ``` +## Options + +| Option | Description | Required | Default | +|--------|-------------|----------|---------| +| `--local` | Run against the local `base44 dev` server instead of the deployed app | No | `false` | +| `--port ` | Port the local dev server is on (only valid with `--local`) | No | 4400 | +| `--privileged` | Run with admin privileges, bypassing RLS. Requires app owner/editor role | No | `false` | +| `--data-env ` | Data environment to run against (e.g. `dev`, `prod`) | No | - | + ## How It Works The `exec` command reads a script from stdin and runs it server-side with the Base44 SDK pre-authenticated as the currently logged-in user. This allows you to run one-off scripts against your app's data without writing a full function. +By default the script runs against the deployed app. With `--local`, it runs against a `base44 dev` server that must already be running: the SDK is pointed at `http://localhost:` and authenticated with a locally-minted token for the current user (the dev server decodes but does not verify this token, so it matches whichever user's session `base44 dev` seeded). + ## Available Globals > **`base44`** — a preinitialized SDK client, available as a global variable in every exec script. You do not need to import or configure it — it is ready to use immediately. @@ -38,6 +49,18 @@ cat ./script.ts | npx base44 exec --app-id app_123 # Or resolve the app from the environment BASE44_APP_ID=app_123 npx base44 exec < ./script.ts + +# Against the local dev server (base44 dev must be running) +echo "await base44.entities.Task.create({ title: 'seed' })" | npx base44 exec --local + +# Against the local dev server on a non-default port +echo "..." | npx base44 exec --local --port 4500 + +# With privileged access (bypass RLS) +echo "const all = await base44.entities.Task.list()" | npx base44 exec --privileged + +# Against a specific data environment +echo "..." | npx base44 exec --data-env prod ``` ## Requirements @@ -48,6 +71,7 @@ BASE44_APP_ID=app_123 npx base44 exec < ./script.ts - with `--app-id `, or - with `BASE44_APP_ID` set - Script must be piped via stdin (non-interactive mode) +- `--port` requires `--local` — passing `--port` without `--local` is an error ## Notes @@ -55,3 +79,5 @@ BASE44_APP_ID=app_123 npx base44 exec < ./script.ts - `--app-id` is useful when you want to inspect app data without switching into a linked local project - Exit code from the script is forwarded as the CLI process exit code - This command requires stdin to be piped (it does not accept input in interactive TTY mode) +- `--privileged` adds an `X-Bypass-RLS` header, bypassing row-level security — requires the app owner/editor role +- `--data-env ` adds an `X-Data-Env` header to target a specific data environment diff --git a/skills/base44-cli/references/link.md b/skills/base44-cli/references/link.md index 1c21d4a..491adcb 100644 --- a/skills/base44-cli/references/link.md +++ b/skills/base44-cli/references/link.md @@ -73,6 +73,8 @@ npx base44 link --create --name my-app --workspace 507f1f77bcf86cd799439011 - Links to an existing app (with `--app-id` or interactive selection) 4. Writes the app ID to `base44/.app.jsonc` +The interactive selection (and `--app-id` validation) lists **all** of your Base44 apps, including ones created in the visual editor — not just apps previously created via the CLI. + ## Requirements - Must have `base44/config.jsonc` in the project