Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.1.5
v0.1.6
20 changes: 10 additions & 10 deletions skills/base44-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 <name>` - 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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
21 changes: 20 additions & 1 deletion skills/base44-cli/references/agents-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down
22 changes: 20 additions & 2 deletions skills/base44-cli/references/connectors-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,28 @@ Push local connector configurations to Base44, synchronizing scopes and handling
## Usage

```bash
npx base44 connectors push [--dir <path>]
npx base44 connectors push [--dir <path>] [-y|--yes]
```

## Options

| Option | Description | Required |
|--------|--------------|----------|
| `--dir <path>` | 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

Expand Down Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions skills/base44-cli/references/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
21 changes: 20 additions & 1 deletion skills/base44-cli/references/entities-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down
30 changes: 28 additions & 2 deletions skills/base44-cli/references/exec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<code>" | npx base44 exec
cat ./script.ts | npx base44 exec [options]
echo "<code>" | 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 <number>` | 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 <environment>` | 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:<port>` 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.
Expand All @@ -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
Expand All @@ -48,10 +71,13 @@ BASE44_APP_ID=app_123 npx base44 exec < ./script.ts
- with `--app-id <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

- The script runs with the Base44 SDK pre-authenticated — you can use `base44.entities`, `base44.functions`, etc. directly
- `--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 <environment>` adds an `X-Data-Env` header to target a specific data environment
2 changes: 2 additions & 0 deletions skills/base44-cli/references/link.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading